Code: Select all
bind pub - !random text:attack
proc text:attack {nick uhost hand chan text} {
set nicks [chanlist $chan]
set randnick [lindex $nicks [rand [llength $nicks]]]
putserv "KICK $chan $randnick :Bitchowned by $nick!"
}
Code: Select all
bind pub - !random text:attack
proc text:attack {nick uhost hand chan text} {
set nicks [chanlist $chan]
set randnick [lindex $nicks [rand [llength $nicks]]]
putserv "KICK $chan $randnick :Bitchowned by $nick!"
}
Code: Select all
proc text:attack {nick uhost hand chan text} {
# 1) generate list of nicks than can be kicked
set victims [list]
foreach possibleVictim [chanlist $chan] {
if {![isbotnick $possibleVictim]&&![matchattr [nick2hand $possibleVictim] bfmno|bfmno $chan]} {
lappend victims $possibleVictim
}
}
# 2) kick (unless the list is empty)
if {[llength $victims]} {
set victim [lindex $victims [rand [llength $victims]]]
putserv "KICK $chan $victim :Bitchowned by $nick!"
} else {
putserv "PRIVMSG $chan :No suitable victims at the moment."
}
}
Code: Select all
set norand off
bind pub - !random random:kick
proc random:kick {nick uhost hand chan text} {
global norand
set banmask *!*@[lindex [split [getchanhost $nick $chan] @] 1]
set victims [list]
foreach possibleVictim [chanlist $chan] {
if {![isbotnick $possibleVictim]&&![matchattr [nick2hand $possibleVictim] bn|nb $chan]} {
lappend victims $possibleVictim
}
}
if {[llength $victims] && ($norand == off)} {
set victim [lindex $victims [rand [llength $victims]]]
putserv "KICK $chan $victim :Bitchowned by $nick!"
set norand on
timer 30 "set norand off"
} else {
putserv "MODE $chan +b :$banmask"
putserv "KICK $chan $nick :You lost!"
utimer 30 [list putserv "MODE $chan -b $banmask"]
}
}