This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

thanksfor.tcl - ignore certain nicks

Old posts that have not been replied to for several years.
Locked
User avatar
Thunderdome
Op
Posts: 187
Joined: Tue Mar 15, 2005 4:42 pm

thanksfor.tcl - ignore certain nicks

Post by Thunderdome »

Code: Select all

###############################
# ThanksFor v1.0.1
# made by Alien
###
# This simple script will make your bot
# automaticly say thanks when it get's voiced
# or opped. It ain't much but it's useful if
# you want your bot to act like real user.
###
# You can edit code how ever you want
# just leave me a little bit of credits.
###############################
### OK, so let's start


# here are some bindings
bind mode - * thanksfor:mode

# now the core :) procedure
# you can change colours or text, just edit
# "Thanks" part

proc thanksfor:mode { nick host hand chan mode target } {
global botnick
if {$target == $botnick} {
   if {$mode == "+v"} { 
	   puthelp "PRIVMSG $chan :4Thanks 4for 2VOICE \[4 $nick \]"
      }
   if {$mode == "+o"} { 
	   puthelp "PRIVMSG $chan :4Thanks 4for 2OP \[4 $nick \]"
      }
   }
}
# ok that should do it
# now just a little adv...

putlog "ALI: Loaded ThansFor1.0.1 made by Alien"
How can I make this ignore certain nicks (like chanserv for example)
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

extend '$target == $botnick' like

Code: Select all

$target == $botnick && $nick != "ChanServ" && $nick != "NickServ"
note: if you want to ignore case you have to use [string equal -nocase $nick chanserv]
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
Thunderdome
Op
Posts: 187
Joined: Tue Mar 15, 2005 4:42 pm

Post by Thunderdome »

how do I insert that nocase line?

ps: can you also help me you with my vhost script stuff?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Replace

Code: Select all

if {$target == $botnick} {
with

Code: Select all

if {[isbotnick $target] && ![string equal -nocase "chanserv" $target] && ![string equal -nocase "nickserv" $target]} {
Not sure if the nickserv part is needed since it doesn't give modes.
User avatar
Thunderdome
Op
Posts: 187
Joined: Tue Mar 15, 2005 4:42 pm

Post by Thunderdome »

I don't understand... either of these does not work at all!
I want it to ignore chanserv... btu still says something when it gives my egg op or voice...
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

My bad, target should be nick. Try:

Code: Select all

if {[isbotnick $target] && ![string equal -nocase "chanserv" $nick]} {
User avatar
Thunderdome
Op
Posts: 187
Joined: Tue Mar 15, 2005 4:42 pm

Post by Thunderdome »

works 100%!!! :D
Thanks for the help... :wink:
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

Thunderdome wrote:works 100%!!! :D
Thanks for the help... :wink:
I advise you to learn something about these basic if expressions. Knowing about the logic of if expressions allows you to modify most basic things in existing scripts by yourself.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Locked