Syntax: /BANSYNC #your-channel #target-channel
I figured this command could be somewhat useful, though I know this script could be made in a better way (I might get around to updating it). Basically, you can synchronize your channel banlist with the banlist of another channel, making it easy for you to keep out known "bad eggs."
Synchronizing the banlist of #SimplicityX to the banlist of #Staff.
2:06:24 am | Simplicity sets mode: +bbbbbbbbbbbb test!testing@testing01 test!testing@testing02 test!testing@testing03 test!testing@testing04 test!testing@testing05 test!testing@testing06 test!testing@testing07 test!testing@testing08 test!testing@testing09 test!testing@testing10 test!testing@testing11 test!testing@testing12
2:06:24 am | Simplicity sets mode: +bbbbbbbbbbbb test!testing@testing13 test!testing@testing14 test!testing@testing15 test!testing@testing16 test!testing@testing17 test!testing@testing18 test!testing@testing19 test!testing@testing20 test!testing@testing21 test!testing@testing22 test!testing@testing23 test!testing@testing24
2:06:25 am | * Simplicity sets mode: +bbbbbbbbbbbb test!testing@testing25 test!testing@testing26 test!testing@testing27 test!testing@testing28 test!testing@testing29 test!testing@testing30 test!testing@testing31 test!testing@testing32 test!testing@testing33 test!testing@testing34 test!testing@testing35 test!testing@testing36
Edit [February 1st, 2012] -- Had fun looking at Shinu's mass voice script to accommodate a comment.
alias bansync {
echo -a Synchronizing the banlist of $1 to the banlist of $+($2,.)
var %x $ibl($2,0)
while %x {
var %y $addtok(%y,$ibl($2,%x),32)
if $numtok(%y,32) == $modespl { mode $1 + $+ $str(b,$modespl) %y | var %y $null }
dec %x
}
if %y { mode $1 + $+ $str(b,$modespl) %y }
}
Nice 8)
Sharing a modification that was requested to handle the case where the ban list is not populated for the source channel, and also bot trigger:
on *:text:!bansync*:#: { if (($nick isop $chan) || ($nick ishop $chan)) { bansync $2 $$3 } }
alias bansync {
if (($me !isop $1) && ($me !ishop $1)) { echo -a Not an operator on $1 | return }
if ($me !ison $$2) { echo -a Not on channel $2 | return }
echo -a Synchronizing the banlist of $1 to the banlist of $+($2,.)
if (!$chan($2).ibl) { set -e %BanSync $1 $2 | .enable #BanSync | .timerBanSyncTimeout 1 8 modesync $1 $2 timeout | mode $2 +b }
else { modesync $1 $2 }
}
#BanSync off
raw 368:*: { .timerBanSyncTimeout off | .disable #BanSync | if (%BanSync) { modesync %BanSync | unset %BanSync } }
#BanSync end
alias -l modesync {
if ($3) { .disable #BanSync }
var %x $ibl($2,0)
while %x {
var %y $addtok(%y,$ibl($2,%x),32)
if $numtok(%y,32) == $modespl { mode $1 + $+ $str(b,$modespl) %y | var %y $null }
dec %x
}
if %y { mode $1 + $+ $str(b,$modespl) %y }
}