well i would not have posted this, but i did not see one of them on here so... here it goes....
i made this a while back and thought it would be one of those stupid scripts that nobody liked right? well it turned out that everybody liked it! ppl who had my bot in my channel liked to be able to make the bot do/say whatever they wanted for some reason... so i figure i post it here if you guys want to make ppl happy w/ ur fail bot! :) commands are:
~say
~do
oh and if you dont want ppl to see who triggers the bot you can pm him....
/msg ~say
/msg ~do
; puppet script by patx (patx@patxbot.tk) (http://www.patx.tk)
; the code it licensed under the patx license version 3!!!!!!!
; http://www.iolanguage.com/paste/p/07f3dc4a0.html << license.
alias -l antiflood { if (!$($+(%,antiflood,.,$1),2)) { set -u5 $+(%,antiflood,.,$1),2)) on } | else { halt } }
on *:text:~do*:?: { $antiflood($1)
describe $2 $3- }
on *:text:~say*:?: { $antiflood($1)
msg $2 $+(% ,$3-) }
on *:text:~do*:#: { $antiflood($1)
describe $chan $2- }
on *:text:~say*:#: { $antiflood($1)
msg $chan $+(''',$2-,''') }
I would go with the anti flood napa put here as it's easy to use and works great, are make a anti flood that doesn't turn off the script for everyone only the person who used it.
You could put this into one on text and have some checks. Also if you say something in your intro you should have that in your script, "/auser 5 " yet i don't see any functions in your script to support that.
PATX Said:
and and by the way you need to have user level 5 to prevent spam.... to set this use
/auser 5
You say that, but you didn't apply it to ur code. You should really have it place somthing in the front of the $2- like for ex:
on 5:text:~say *:#: { $antiflood | msg # $+(::,$2-,::) }
or
on 5:text:~say *:#: { $antiflood | msg # $+($chr(160),$2-) }
that way someone can't do ~say !op blah or w/e
i made my version to where only certain pplz can use it, also mine works through query only. http://www.hawkee.com/snippet/5799/
nice patx
why use that antiflood from that bot Weasel posted?
you can do that like this as well
alias -l antiflood { if (!$($+(%,antiflood,.,$1),2)) { set -u5 $+(%,antiflood,.,$1),2)) on } | else { halt } }
then in ur code put $antiflood($1)
but only use the -l switch if you are going to use this alias along with the code in the same remote if not then remove the -l switch.