### # Yet Another Witty Stuff Package by AltBlue ;-] # # * act: witty action handler (somehow similar to the dcc say eggdrop builtin command) # * wake: wakes up some person beeping him ;-] # * kickme: you want to be kicked off? you've got it ;-]~ # * pretender: lame !kick, !kickban etc queries? fuck'em all up ;-] #### # CHANGELOG: # - wtf remembers it? # - started sometimes in 1997... blahblah #### set ab_witty_version 1.1 bind msg o|o act witty_action proc witty_action {nick uhost hand arg} { global botnick if {[llength $arg] < 2} { putserv "NOTICE $nick :Usage: act <#channel> <what>" return 0 } set thechan [lindex $arg 0] set what [lrange $arg 1 end] if {![onchan $botnick $thechan]} { putserv "NOTICE $nick :I'm not on that channel" return 0 } putserv "PRIVMSG $thechan :\001ACTION $what \001" putlog "$nick used witty_action on $thechan" } ###### grabbed from lol pack proc charfilter {x {y ""} } { for {set i 0} {$i < [string length $x]} {incr i} { switch -- [string index $x $i] { "\"" {append y "\\\""} "\\" {append y "\\\\"} "\[" {append y "\\\["} "\]" {append y "\\\]"} "\} " {append y "\\\} "} "\{" {append y "\\\{"} default {append y [string index $x $i]} } } return $y } bind pub v|v !wake ab_pub_wake proc ab_pub_wake {nick host hand chan arg} { global botnick set arg [charfilter $arg] if {[llength $arg] < 1} { puthelp "NOTICE $nick :Usage: !wake \[\]" return 0 } set who [lindex $arg 0] set comment [lrange $arg 1 end] putcmdlog "($chan) $nick: WAKEUP: $who ($comment)" if {[onchan $who $chan] == 1} { if {$who == $botnick } { puthelp "NOTICE $nick :i'm quite awake, duh!" return 0 } if {$who == $nick } { puthelp "NOTICE $nick :are you sleeping?" return 0 } if {$comment == ""} { puthelp "NOTICE $who :WAKE UP! $nick wanna wake you up!" } else { puthelp "NOTICE $who :WAKE UP! $nick tells you: $comment!" } puthelp "NOTICE $nick :done. message sent to $who." } else { puthelp "NOTICE $nick :$who is dead." } return 0 } bind pubm - "*" ab_pub_kickme proc ab_pub_kickme {nick host hand chan arg} { global botnick if {[string tolower $nick] == [string tolower $botnick]} {return 0} if {![isop $botnick $chan]} {return 0} if {[regexp -nocase {(?:\W|^)(?:kickban|kb|kick|kill|fuck|ban|omoara|killeste|impusca|sp[ia]nzura|ineaca)(?:\s+|-)m[ea](?:\s|$)} $arg]} { putserv "KICK $chan $nick :you wanted, you got it. enjoy!" putlog "KICKME: $nick on $chan" } } bind pubm - "*" ab_pub_pretender proc ab_pub_pretender {nick host hand chan arg} { global botnick if {[string tolower $nick] == [string tolower $botnick]} {return 0} if {![isop $botnick $chan]} {return 0} if {([matchattr $hand b])} {return 0} if {([matchattr $hand o])} {return 0} if {([matchattr $hand f])} {return 0} if {([matchattr $hand m])} {return 0} if {[regexp -nocase {!(kick|kill|fuck|ban|kickban)\s+(\S+)} $arg muci action target]} { putserv "KICK $chan $nick :$action $target!?! NO, $action you!" putlog "KICK_PRETENDER: $nick on $chan" } } putlog "WittyPack $ab_witty_version loaded."