i actually have a help command in my eggdrop (it works until i write another script that kills the entire bot

), that takes multiple parameters. here's how it works (\002 is the escape sequence to make text bold in IRC):
Code: Select all
bind pub - !help pub:help
proc pub:help {nick host hand chan text} {
switch $text {
"!help" {
putserv "PRIVMSG $nick :\002!help\002 gives you a list of commands"
}
"!opme" {
putserv "PRIVMSG $nick :\002!opme\002 will op you in the given channel, if you are an auto-op"
}
"!kick" {
putserv "PRIVMSG $nick :\002!kick <nick>\002 will kick the specified nick from the channel, if you are an auto-op"
}
"!cookie" {
putserv "PRIVMSG $nick :\002!cookie [nick]\002 will give a cookie to the specified nick, or to you if you don't specify a nick"
}
default {
putserv "PRIVMSG $nick :Command listing:"
putserv "PRIVMSG $nick :!help , !opme , !kick , !cookie"
putserv "PRIVMSG $nick :Type \002!help <command>\002 for more help on that command"
}
}
}
the
default block will trigger if none of the other blocks triggered -- whether the user didn't specify a command they wanted help on, or they specified something that wasn't in the listing. if you wanted it to ONLY give the command listing when the user didn't specify a command for help on, i think you'd just need to replace
default with a pair of double-quotes, like
""
that isn't my script
exactly, but it should give you an idea of how to set everything up
