Auto Voicer

By Spoof on Jun 20, 2012

Made and tested on mIRC v6.35

Place in a new remote file.
This is a mirc popup menu script and is activated when you right/click your mouse button in a channel
window to pull up your options.
Find [Auto Voicer] in the list and hover the mouse pointer over it. Select Channels/Add to add the channel you wish to
use this script in.

The Users/Add blocks the nick from being auto voiced on join.
Setting a channel to +M would make this script better as enforcing voiced nicks on joins.
And also allow nicks that are not voiced to remain muted.
Note: That fellow ops will not remain muted if they use /ns update and are still on a channels
access list as a channel op.

I also made viewing windows so that the script user may check the current status of whats listed.

Oh Ya... no lame comments like:
why not set a channels auto voice with
/msg ChanServ LEVELS Channel here SET AUTOVOICE -1

I'm not a noob to IRC servers

on *:JOIN:#:{
  if ($me isop $chan) {
    if ($ini(voicelist,chans($chan,2),0) >= 1) || ($readini(voicelist,chans,$chan)) { halt }
    if ($ini(voicelist,$address($nick,2),0) >= 1) || ($readini(voicelist,nicks,$address)) { halt }
    mode # +v $nick
  }
}

menu * {
  [Auto Voicer]
  .Users
  ..Add User:/writeini voicelist $address($1,2) $address($1,2) $1 | writeini voicelist nicks $1 $address($1,2) | echo -a 4 $1 $address($1,2) was added to Voice List.
  ..Del User:/remini voicelist $address($1,2) $address($1,2) $1 | remini voicelist nicks $1 | echo -a 4 $1 $address($1,2) was removed from Voice List.
  ..Read User List:/window @DevoiceList Verdana 13 | echo @DevoiceList The following names will not receive +v on entry. | echo @DevoiceList [Nicks] | var %nicks 1 | while (%nicks <= $ini(voicelist,nicks,0)) { echo @DevoiceList $ini(voicelist,nicks,%nicks) on the ip $readini(voicelist,nicks,$ini(voicelist,nicks,%nicks)) | inc %nicks 1 }
  [Channels]
  ..Add Chan:/writeini voicelist chans $chan $chan | echo -a 4 $chan was added to Voice Channels List. 
  ..Del Chan:/remini voicelist chans $chan $chan | echo -a 4 $chan was removed from Voice Channels List.
  ..Read Chan List:/window @ChannelsList Verdana 13 | echo @ChannelsList The following channels will not voice nicks on joins. | echo @ChannelsList [Chans] | var %chans 1 | while (%chans <= $ini(voicelist,chans,0)) { echo @ChannelsList $readini(voicelist,chans,$ini(voicelist,chans,%chans)) | inc %chans 1 } 
}

Comments

Sign in to comment.
Jethro   -  Jun 21, 2012

Adding to FelicianoX's say, you should make sure the client running the code is opped by using @ prefixed to the text event, rather than the exclamation mark:

on @*:join:#:{

The exclamation mark you've prefixed in front of your join event means exactly the same as $nick != $me or $nick == $me { halt } , so your first if statement serves no purpose but redundancy.

Finally, I don't know nor understand why you chose to write three INI files. It's such a wasteful approach that way.

 Respond  
FelicianoX   -  Jun 21, 2012

In an ON JOIN event, you are always a regular, thus the second part of your first if statement will always return true

The ON JOIN event is triggered before ChanServ gives operator status to the nick.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.