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 

little prob

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


Joined: 19 Apr 2005
Posts: 9

PostPosted: Tue Nov 28, 2006 3:30 am    Post subject: little prob Reply with quote

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 Sad

Code:

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}
}
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Nov 28, 2006 4:59 am    Post subject: Reply with quote

I'd suggest you use "switch" for this (manpage)
_________________
NML_375, idling at #eggdrop@IrcNET
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