Gag (timed ban)

By Virus on May 05, 2008

This is a simple gag/ungag, or timed ban, script. Type /silence . Easy to use, easy to manipulate. It also deops/devoices the user you have gagged, you must be an op in order for this to work. This is the original, I just modified it so it wouldn't change the access list. http://www.hawkee.com/snippet/4306/

alias silence {
  describe # Hey $$1, I think it's time for you to shut up, you've been gaged for $$2 minute(s).
  if ($left($nick($chan,$$1).pnick,1) == +) { mode $chan -v $$1 }
  if ($left($nick($chan,$$1).pnick,1) == %) { mode $chan -hv $$1 $$1 }
  if ($left($nick($chan,$$1).pnick,1) == @) { mode $chan -ohv $$1 $$1 $$1 }
  if ($left($nick($chan,$$1).pnick,1) == &) { mode $chan -aohv $$1 $$1 $$1 $$1 }
  mode # +b ~q: $+ $address($$1,2)
  var %i = $calc($$2 * 60)
  .timer 1 %i charge.timer $$1
}
alias charge.timer {
  mode # -b ~q: $+ $address($$1,2)
  if ($(% $+ $address($$1,2) $+ shoot,2) == 4) { mode # +v $$1 }
  if ($(% $+ $address($$1,2) $+ shoot,2) == 3) { mode # +h $$1 }
  if ($(% $+ $address($$1,2) $+ shoot,2) == 2) { mode # +o $$1 }
  if ($(% $+ $address($$1,2) $+ shoot,2) == 1) { mode # +a $$1 }
  describe # $$1 ok, you can speak again, now stop talking like an idiot
}

Comments

Sign in to comment.
KilllerX   -  May 14, 2010

well if they have a problem and need help they can post it and ask for help. I figured out my problem and fixed it.

 Respond  
morfina   -  May 01, 2010

@KillerX can you post your edited script, so if others have these problems like you to correct them? xD

 Respond  
KilllerX   -  Apr 29, 2010

ok I am trying to get the one Jethro posted to work. I added an hours and days one to it. but when I type !gag (nick) (time) It comes out as

describe # Hey !gag, I think it's time for you to take some time to reflect on what you have said. $& You've been removed from chat for for (nick) minutes/hours/days(s).

and then it also plays every single one of my commands after that.
so I am just wondering what happened? I checked to see if any brackets are missing and It doesn't say there is.

Ok I changed a few things around and I got it to work. ^^ I am fine now.

 Respond  
morfina   -  Feb 17, 2010

Thanks, works great! :)

 Respond  
Jethro   -  Feb 16, 2010

how can I add it to the bot so I can type !gag from my other mirc so the bot can gag a certain person?

on @*:TEXT:$($+($strip(!gag),*)):#: { 
  if ($2 ison #) && ($3 isnum) && ($nick isop #) silence $2 $3 
  else { .msg $nick Type: !gag <nick> <time in minutes> }
}
alias silence {
  describe # Hey $1, I think it's time for you to shut up. $&
    You've been gaged for $2 minute(s).
  if ($nick(#,$nick,+)) { mode # -v $$1 }
  if ($nick(#,$nick,%)) { mode # -hv $$1 $1 }
  if ($nick(#,$nick,@)) { mode # -ohv $str($$1 $+ $chr(32),3) }
  if ($nick(#,$nick,&)) { mode # -aohv $str($$1 $+ $chr(32),4) }
  mode # +b ~q: $+ $address($$1,2)
  var %i = $calc($2 * 60) | .timer 1 %i charge.timer $$1
}
alias charge.timer {
  mode # -b ~q: $+ $address($$1,2)
  if ($(% $+ $address($$1,2) $+ shoot,2) == 4) { mode # +v $1 }
  if ($(% $+ $address($$1,2) $+ shoot,2) == 3) { mode # +h $1 }
  if ($(% $+ $address($$1,2) $+ shoot,2) == 2) { mode # +o $1 }
  if ($(% $+ $address($$1,2) $+ shoot,2) == 1) { mode # +a $1 }
  .describe # $1 ok, you can speak again. Now stop talking like an idiot.
}

Note: Make sure the client running the code and people who command the trigger !gag are opped in channel.

 Respond  
morfina   -  Feb 16, 2010

Great script, but how can I add it to the bot so I can type !gag from my other mirc so the bot can gag a certain person?

 Respond  
Dragon1-9-8-4   -  Nov 04, 2008

looks good.havnt tested yet but ill add another comment after ive tested it

 Respond  
Bullet_Dodger   -  Oct 12, 2008

Decent script

 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.