| View previous topic :: View next topic |
| Author |
Message |
roughnecks Voice
Joined: 14 Sep 2008 Posts: 33 Location: Italy
|
Posted: Wed Dec 03, 2008 6:22 am Post subject: Insulter.tcl |
|
|
Hi guys, i'm going to make a request..if anybody can help
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: |
#################################################################
# 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"
|
|
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Wed Dec 03, 2008 8:57 am Post subject: Re: Insulter.tcl |
|
|
This should prevent insulting of people not on the channel, the bot and any owner (not tested):
| Code: | proc insulta {nick uhost hand chan arg} {
if {[isop $nick $chan]} {
if {[scan $arg %s lamer]==1} {
if {![onchan $lamer $chan]} {
# $lamer is not on $chan...
puthelp "PRIVMSG $chan :\"$lamer\"?"
} else {
global insulti
set insult [lindex $insulti [rand [llength $insulti]]]
if {[isbotnick $lamer]||[matchattr [nick2hand $lamer] n]} {
puthelp "PRIVMSG $chan :$nick, mi credi come te? (scemo)"
puthelp "PRIVMSG $chan :12Insult revenge -> $nick: $insult"
} else {
puthelp "PRIVMSG $chan :$lamer: $insult"
}
}
} else {
puthelp "PRIVMSG $chan :$nick, chi devo fanculizzare?"
}
} else {
puthelp "NOTICE $nick :Questo comando è accessibile solo agli op del canale!"
puthelp "PRIVMSG $chan :$nick, you're lame!"
}
} |
_________________ Have you ever read "The Manual"? |
|
| Back to top |
|
 |
roughnecks Voice
Joined: 14 Sep 2008 Posts: 33 Location: Italy
|
Posted: Wed Dec 03, 2008 9:33 am Post subject: |
|
|
| going to test .. thank U ! |
|
| Back to top |
|
 |
roughnecks Voice
Joined: 14 Sep 2008 Posts: 33 Location: Italy
|
Posted: Wed Dec 03, 2008 9:48 am Post subject: [SOLVED] was: Insulter.tcl bug |
|
|
ok what can i say ?
It seems just to be working !!!!!
Very very happy...good job !
Thanks again! |
|
| Back to top |
|
 |
|