Do NOT use sendmsg to give the reply for the command!
That is HORRIBLE Perl form!
Use return instead! ____________
Sendmsg/Send_IM is used ONLY when the command is to return more than one response, or if you have to return the reply with a different font than your normal font (i.e. monospaced font Courier New) _________________ Current Site (2008) http://www.cuvou.com/
People are dense and can't understand how Juggernaut works.
I myself only check for listeners on a minority of commands, most of which include away statuses and messaging third parties.
Other than that, all my commands should work on all messengers as they usually just return replies. _________________ Current Site (2008) http://www.cuvou.com/
Joined: 03 May 2006 Posts: 2292 Location: Colorado
Posted: Fri Apr 09, 2004 6:04 pm Post subject:
You could also add a sendmsg command that determines the listener so that commands don't have to
update: i know you still need to check the listener for certain other things _________________ Eric256
Proud previous owner and current admin of Bot-depot.com
I might make a kind of universal in-between kind of module, where you send it a command like.. "send a message", "block", etc., and the module will do the right command for whatever messenger or something. _________________ Current Site (2008) http://www.cuvou.com/
Ohhh I have an idea for the next release of Juggernaut!
isCommand.pl - command checker
Code:
$reply = &{$key} ($self,$client,$msg,$listener) || "The creator of this command is a terrible newbie who does not know how to properly return a single reply from a command.";
So what do you think? Like it? _________________ Current Site (2008) http://www.cuvou.com/
Ohhh I have an idea for the next release of Juggernaut!
isCommand.pl - command checker
Code:
$reply = &{$key} ($self,$client,$msg,$listener) || "The creator of this command is a terrible newbie who does not know how to properly return a single reply from a command.";
So what do you think? Like it?
Cer, I think is is a good command, Since I have never coded Juggernaut before, Why do you always have something bad to post alongside with everypost I do? _________________ Heroes NBC
Joined: 03 May 2006 Posts: 2292 Location: Colorado
Posted: Sat Apr 10, 2004 4:29 pm Post subject:
JoeX you need to learn to program and not whine. We try to help you learn to make better code and you whine. Learn from you mistakes or just stop whineing. Yes i know i'm a mean horrible person. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com
lol eric, I had one quick look at Juggernaut, Then made 2 commands, Sorry, If I know you wouldnt like it, I wouldnt post it. _________________ Heroes NBC