Page 1 of 1

mIRC Silence ban/nick change ban script

PostPosted: Tue Apr 20, 2010 10:13 pm
by GrimReaper
Code: Select all
;////mIRC script by GrimReaper////
alias silence {
  mode # +bb ~q: $+ $address($$1,2) ~n: $+ $address($$1,2)
  .timer 1 $calc($$2 * 60) desilence $address($$1,2)
  if ($$1 isop $chan) { /cs deop $chan $$1 | /cs dehalfop $chan $$1 | /cs devoice $chan $$1 | set %silence.status op | set %silence.nick $$1 | set %silence.chan $chan | halt }
  if ($$1 ishop $chan) { /cs dehalfop $chan $$1 | /cs devoice $chan $$1 | set %silence.status hop | set %silence.nick $$1 | set %silence.chan $chan | halt }
  if ($$1 isvoice $chan) { /cs devoice $chan $$1 | set %silence.status vop | set %silence.nick $$1 | set %silence.chan $chan | halt }
  else { set %silence.status reg | set %silence.nick $$1 | set %silence.chan $chan }
}
on *:JOIN:#: {
  if ($chan == %silence.chan) {
    if ($nick == %silence.nick) { /timer 1 1 /cs deop $chan $nick | /cs dehalfop $chan $nick | /cs devoice $chan $nick }
  }
  else { halt }
}
alias desilence {
  mode %silence.chan -bb ~q: $+ $$1 ~n: $+ $$1
  if (%silence.status == op) { /cs op %silence.chan %silence.nick | unset %silence.* }
  if (%silence.status == hop) { /cs halfop %silence.chan %silence.nick | unset %silence* }
  if (%silence.status == vop) { /cs voice %silence.chan %silence.nick | unset %silence.* }
  if (%silence.status == reg) { unset %silence.* }
}


Basic syntax: /silence <nick> <time in minutes>

This will set a ~q: and ~n: ban on the chosen nick for X amount of minutes, then will undo the ban when the time you set is up.

Updated: Made sure that it set's the mode back.. Will only work for single nick's at the moment.. will look into getting it to work on Multiple nicks.

Re: mIRC Silence ban/nick change ban script

PostPosted: Tue Jul 20, 2010 6:30 pm
by MartyniP
Nice script, but it doesnt take into consideration of the fact you may mute multiple people at the same time.

Re: mIRC Silence ban/nick change ban script

PostPosted: Tue Jul 20, 2010 9:19 pm
by GrimReaper
MartyniP wrote:Nice script, but it doesnt take into consideration of the fact you may mute multiple people at the same time.


it uses a timer so should unset it all.. I'll have a look at it and get it to work properly :)