egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Insulter.tcl

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
roughnecks
Voice


Joined: 14 Sep 2008
Posts: 33
Location: Italy

PostPosted: Wed Dec 03, 2008 6:22 am    Post subject: Insulter.tcl Reply with quote

Hi guys, i'm going to make a request..if anybody can help Smile

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 Sad

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
View user's profile Send private message
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Wed Dec 03, 2008 8:57 am    Post subject: Re: Insulter.tcl Reply with quote

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
View user's profile Send private message
roughnecks
Voice


Joined: 14 Sep 2008
Posts: 33
Location: Italy

PostPosted: Wed Dec 03, 2008 9:33 am    Post subject: Reply with quote

going to test .. thank U !
Back to top
View user's profile Send private message
roughnecks
Voice


Joined: 14 Sep 2008
Posts: 33
Location: Italy

PostPosted: Wed Dec 03, 2008 9:48 am    Post subject: [SOLVED] was: Insulter.tcl bug Reply with quote

ok what can i say ?
It seems just to be working !!!!!

Laughing Laughing Laughing Laughing Laughing

Very very happy...good job !
Thanks again!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber