Lime Gag

By IllogicTC on Nov 13, 2010

LimeGag is a simple snippet meant to facilitate gagging someone. It should be compatible with most servers utilizing IRCd.

To use, right-click someone's nick, and select GagTimer to +b them for 10 minutes by default, or type "/tgag in the channel window.

It will +b the nick specified, and automatically -b them after the set time. Additionally, if they leave the channel to try ridding themselves of the +b, the timer pauses, and will resume once they get back in.

NOTE: I know this goes by nickname and not by address, and can be circumvented by leaving, changing nicks, and re-entering. But I can't be bothered to redo this to go by masks right now.

;Lime Gag
;By Illogic
;v1.1 10/13/10

menu nicklist {
  TimeGag: tgag $$1 10
}

alias tgag {
  if (!$1) || (!$2) {
    echo -a Using GagTimer: /tgag <nickname> <time in minutes>
    HALT
  }
  if ($me !isop $chan) echo -a You cannot gag if you are not opped!
  else {
    mode $chan +b $1
    .timer $+ $chan $+ $1 1 $calc($2 * 60) mode $chan -b $1
  }
}

on *:PART:#: {
  if ($timer($+($chan,$nick))) {
    .timer $+ $chan $+ $nick -p
    .timer $+ $chan $+ $nick $+ off 1 600 .timer $+ $chan $+ $nick off
  }
}

on *:JOIN:#: {
  if ($timer($+($chan,$nick))) {
    mode $chan +b $nick
    .timer $+ $chan $+ $nick -r
  }
}

on *:NICK: {
  if ($timer($+($chan,$nick))) {
    timer $+ $chan $+ $newnick 1 $timer($+($chan,$nick)).secs mode $chan -b $1
    timer $+ $chan $+ $nick off
  }
}

Comments

Sign in to comment.
IllogicTC   -  Nov 13, 2010

Updated, now checks that the specific nick is in the specific channel by making the timers for $chan $+ $nick.

 Respond  
_Teen_   -  Nov 13, 2010

unless you gag someone and then /deop?

or someone deop you... by the way, this on join event, will not work, in a specific channel, it will run in all them, so if you have op, in one channel, and then the person who you ''gag'' join in another channel, that you're not opped, it will return an error, unless you has op in all channels that this person join...

 Respond  
IllogicTC   -  Nov 13, 2010

The join and nick assume that you've already gone through the op check to use /tgag in the first place. The timer already exists by then, why do another check for a known fact, unless you gag someone and then /deop?

 Respond  
_Teen_   -  Nov 13, 2010

you know that you need to check, if you're opped or not on events

join and nick... cause if not, will return an error

 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.