
I'm using the script in the subject, but have this problem: the bot gets pwned by users who simply !insult non-existent nick or insulting the bot adding a character to its nickname : for example. let's say the botnick is "roger", you can simply do a !insult Roger, or !insult roger: and you get a bot insulting itself

Because i'm not able to modify the tcl by myself, i was asking if anybody can help me.
Hoping it's not a problem for you, i'm going to insert the code.
Thank so much !
Code: Select all
#################################################################
# Insulter #
# Per insultare con parole random #
# #
# Written by IRC Club Staff (SerialCRACK) #
#################################################################
### BINDS
bind pub - !insulta insulta
bind pub - !insulter ad
### SETS
set insulti {
{Stronzo}
{Strunz}
{Testa di cazzo}
{Vaffanculo}
{Fanculo}
{Deficiente}
{[censored]}
{Lamer}
{Ma per vedere la tua faccia ti guardi dietro?? (Chi ha capito ha capito, chi non ha capito... è come te!)}
{Il classico tipo che va al cesso ed è fiero dello stronzo che fa}
{Se avessimo voluto uno stronzo in canale, avremmo fatto scorta di lassativi}
{Fossi in te, quando uso il pc non permetterei ai miei genitali di chattare}
}
### PROCS
proc insulta {nick host hand chan arg} {
global insulti botnick owner
if {[isop $nick $chan]==0} {
putserv "NOTICE $nick :Questo comando è accessibile solo agli op del canale!"
putserv "PRIVMSG $chan :$nick, you're lame!"
} else {
set lamer [lindex $arg 0]
set word [lindex $insulti [rand [llength $insulti]]]
if {($lamer == $botnick) || ($lamer == $owner)} {
putserv "PRIVMSG $chan :$nick, mi credi come te? (scemo)"
putserv "PRIVMSG $chan :12Insult revenge -> $nick: $word"
return 0
}
if {$lamer == ""} {
putserv "PRIVMSG $chan :$nick, chi devo fanculizzare?"
} else {
putserv "PRIVMSG $chan :$lamer: $word"
putlog "* Insulter - $nick ha insultato $lamer ('$word')"
}
}
}
proc ad {nick host hand chan arg} {
putserv "PRIVMSG $chan :Insulter TCL was created by IRC Club Staff - http://irc-club.6go.net"
}
putlog "TCL Script: Insulter v1.0 created by IRC Club Staff - http://irc-club.6go.net"