PDA

View Full Version : Couple of bits for eggdrop...


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 ;)

Slime
25-04-2001, 12:22
Go on the.....i'll be the first to ask what on earth an Eggdrop Bot is ?

Godin
25-04-2001, 12:42
heh, eggdrop is the standard type of bot used on irc, it runs off a *nix platform, most bots ( including the gp ones) are based on it with tcl scripts to provide extension type functions, such as the two above, one of which makes the bot fluffle people, the other makes it react to those annyoing trout slaps. sites like http://www.egghelp.org have a load more info on eggdrop :)