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.

little prob

Help for those learning Tcl or writing their own scripts.
Post Reply
d
dragoneye
Voice
Posts: 9
Joined: Tue Apr 19, 2005 4:21 pm

little prob

Post by dragoneye »

got little problemn i have this script that says anything that someone says to my bot in private to my privatechannel. the problem is that i dont want the bot say !add and !remove in my private chanel, how do i make the if {[lindex $line 0] != "!add" "!remove" } - line so that i can add more commands that the bot dont say to my private channel ? sry my bad eng and yes im a noob :(

Code: Select all

proc priv {nick uhost hand arg} {
global privchan
set line [string trim $arg]
if {[lindex $line 0] !=  "!add" "!remove" } {
puthelp "PRIVMSG #$privchan :$nick on private: '$line'";return 0}
}
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

I'd suggest you use "switch" for this (manpage)
NML_375
Post Reply