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.

binding commands without a ! or @

Help for those learning Tcl or writing their own scripts.
Post Reply
q
quantum0726
Voice
Posts: 9
Joined: Fri Mar 03, 2006 9:34 pm

binding commands without a ! or @

Post by quantum0726 »

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*'?
User avatar
dusk
Halfop
Posts: 91
Joined: Sun Mar 06, 2005 7:25 pm
Location: Belgium

Post by dusk »

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

ex :

Code: Select all

 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.
q
quantum0726
Voice
Posts: 9
Joined: Fri Mar 03, 2006 9:34 pm

Post by quantum0726 »

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!
Post Reply