Godin
25-04-2001, 12:15
Well, had a bit of an insane spell yesterday and cobbled together a couple of scripts for meh eggdrop bot, and after skunk talking me into it I'm posting the code on here for all that want it, they did simple ones really, a fluffler (makes the bot fluffle summat/someone)
that one goes (just whack it in a file, say fluffle.tcl):
bind pub - fluffle fluffler
proc fluffler {nick uhost handle channel arg} {
global botnick
if {[lindex $arg 0] == ""} {
putserv "NOTICE $nick :Format: fluffle <nickname>"
return 1
}
set victim [lindex $arg 0]
puthelp "PRIVMSG $channel :\001ACTION fluffles $arg\001"
}
putlog "Godins Fluffler version 1 Loaded"
And the next one is a small anti-trouting script, it punishes anyone who trouts on a channel with the words slap(s), a nick and trout in that order, if its not opped it slaps back :)
This will break the table. Again just whack this code in a file (can even be the same one as before)
bind ctcp - ACTION antitrout:ctcp:action
proc antitrout:ctcp:action {nick uhost hand chan keyword arg} {
global botnick
set troutkickreason "Trouting is lame, at least try something ORIGINAL"
if { [validchan $chan] == 1 && ([string tolower [lindex $arg 0]] == "slaps" || [string tolower [lindex $arg 0]] == "slap") && [lsearch [string tolower $arg] trout] >= 2 && [string tolower $nick] != [string tolower $botnick] } {
if { [botisop $chan] == 1 } {
puthelp "kick $chan $nick :$troutkickreason"
}
if { [botisop $chan]== 0 } {
puthelp "PRIVMSG $chan :\001ACTION slaps $nick about with a bigger wet trout. Get a life.\001"
}
}
return 0
}
putlog "Godin's Anti-Trout loaded"
[oops, almost forgot the ctcp bind for the antitrout]
And sorry about breakin the table ;)
that one goes (just whack it in a file, say fluffle.tcl):
bind pub - fluffle fluffler
proc fluffler {nick uhost handle channel arg} {
global botnick
if {[lindex $arg 0] == ""} {
putserv "NOTICE $nick :Format: fluffle <nickname>"
return 1
}
set victim [lindex $arg 0]
puthelp "PRIVMSG $channel :\001ACTION fluffles $arg\001"
}
putlog "Godins Fluffler version 1 Loaded"
And the next one is a small anti-trouting script, it punishes anyone who trouts on a channel with the words slap(s), a nick and trout in that order, if its not opped it slaps back :)
This will break the table. Again just whack this code in a file (can even be the same one as before)
bind ctcp - ACTION antitrout:ctcp:action
proc antitrout:ctcp:action {nick uhost hand chan keyword arg} {
global botnick
set troutkickreason "Trouting is lame, at least try something ORIGINAL"
if { [validchan $chan] == 1 && ([string tolower [lindex $arg 0]] == "slaps" || [string tolower [lindex $arg 0]] == "slap") && [lsearch [string tolower $arg] trout] >= 2 && [string tolower $nick] != [string tolower $botnick] } {
if { [botisop $chan] == 1 } {
puthelp "kick $chan $nick :$troutkickreason"
}
if { [botisop $chan]== 0 } {
puthelp "PRIVMSG $chan :\001ACTION slaps $nick about with a bigger wet trout. Get a life.\001"
}
}
return 0
}
putlog "Godin's Anti-Trout loaded"
[oops, almost forgot the ctcp bind for the antitrout]
And sorry about breakin the table ;)