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 

binding commands without a ! or @

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


Joined: 03 Mar 2006
Posts: 9

PostPosted: Thu Mar 09, 2006 4:04 pm    Post subject: binding commands without a ! or @ Reply with quote

Hi, I am writing a help script for my eggdrop. I want a user to be able to ask for help and the eggdrop respond with some information about itself. I have done this easily using a binding for '!help'. Now I would like to add a binding for just 'help', without any characters in front of it. If I just add the lines:

set help(pub2) "help"
bind pub "$help(flag)" "$help(pub2)" help:pub

to the script, the bot will respond to the user typing 'help', but will also respond to the user typing 'help those who help themselves' or any other sentence starting with 'help' for that matter. Is there any way to limit the binding to only respond to 'help' and not to 'help*'?
Back to top
View user's profile Send private message
dusk
Halfop


Joined: 06 Mar 2005
Posts: 91
Location: Belgium

PostPosted: Thu Mar 09, 2006 4:33 pm    Post subject: Reply with quote

Just let the bot give the info line when $arg doesn't exist.

ex :
Code:
 if {$arg == ""} {
    putserv "NOTICE $nick  : your info line
    return 0
   }



GRTZ


Last edited by dusk on Thu Mar 09, 2006 7:48 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
quantum0726
Voice


Joined: 03 Mar 2006
Posts: 9

PostPosted: Thu Mar 09, 2006 7:39 pm    Post subject: Reply with quote

In my case I actually wanted to send the info line if $arg == "" since I don't want 'help*' to trigger it. Using that it works great.

Thanks!
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