/remban by Zaphod at Saturday Dec. 29 2007
Allows you to specify a wildcard instead of a full address. It's
different from /ban -r due to the alias removing multiple bans at a
time.
/remban
examples
//remban Zaphod #
The above would remove all bans matching Zaphod
(EX: ~Zaphod@mirc.com would be removed if it existed in the ibl)
**versions**
Saturday Dec. 29 2007 Snippet created
Monday Dec. 31 2007 Cleaned up the code
Monday Dec. 31 2007 Fixed a bug that removed each ban one at a time, creating a mode flood.
** ^ Yes I spend my time. If you find any bugs, please don't hesitate to post!
- Tested on a clean channel (meaning I was the only one in it) using this alias:
alias settestban {
var %x = 1, %t
while (%x <= 13) {
%t = %t $+($+(asdadasdasd,%x),@testing,.,com)
if ($numtok(%t,32) == $modespl) {
mode # $+(+,$str(b,$v1)) %t
%t = ""
}
inc %x
}
if (%t) mode # $+(+,$str(b,$modespl)) %t
}
/*
/remban by Zaphod at Saturday Dec. 29 2007
Allows you to specify a wildcard instead of a full address. It's
different from /ban -r due to the alias removing multiple bans at a
time.
/remban <wildcard> <channelname>
**examples**
**//remban *Zaphod* #
** The above would remove all bans matching *Zaphod*
** (EX: ~Zaphod@mirc.com would be removed if it existed in the ibl)
**versions**
Saturday Dec. 29 2007 Snippet created
Monday Dec. 31 2007 Cleaned up the code
Monday Dec. 31 2007 Fixed a bug that removed each ban one at a time, creating a mode flood.
** ^ Yes I spend my time. If you find any bugs, please don't hesitate to post! **
- Tested on a clean channel (meaning I was the only one in it) using this alias:
alias settestban {
var %x = 1, %t
while (%x <= 13) {
%t = %t $+($+(asdadasdasd,%x),@testing,.,com)
if ($numtok(%t,32) == $modespl) {
mode # $+(+,$str(b,$v1)) %t
%t = ""
}
inc %x
}
if (%t) mode # $+(+,$str(b,$modespl)) %t
}
*/
alias remban {
var %error = !.echo -ac info * /remban:
var %x = $ibl($2,0), %t
if ($2) && ($me isop $2) {
while (%x) {
if ($wildtok($ibl($2,%x),$+(*,$1,*),0,32)) {
%t = %t $ibl($2,%x)
if ($numtok(%t,32) == $modespl) {
mode $2 $+(-,$str(b,$v1)) %t
%t = ""
}
}
dec %x
}
if (%t) mode $2 $+(-,$str(b,$modespl)) %t
}
elseif (!$2) %error E_SYNTAX
elseif ($me !isop $2) %error E_CHAN_STATUS
}