|
| Author |
Message |
Calum Not Yet a God

Joined: 21 Feb 2004 Posts: 373 Location: england
   
|
Posted: Tue Apr 13, 2004 9:37 am Post subject: |
|
|
| is it possible to use echo without call back? |
|
| Back to top |
|
 |
JoeX Agent

Joined: 02 Jan 2004 Posts: 2153
 
|
Posted: Tue Apr 13, 2004 1:18 pm Post subject: |
|
|
I think so calum _________________ Heroes NBC |
|
| Back to top |
|
 |
eric256 The Keymaker

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Tue Apr 13, 2004 2:27 pm Post subject: |
|
|
That all depends on what you mean by echo and what template you are useing. The real question is why would you want to? _________________ Eric256
Proud previous owner and current admin of Bot-depot.com |
|
| Back to top |
|
 |
Dazzy Agent

Joined: 09 Jan 2004 Posts: 1731
 
|
Posted: Tue Apr 13, 2004 2:31 pm Post subject: |
|
|
| Mabey he cant use callbacks? |
|
| Back to top |
|
 |
Cer Upgraded Agent

Joined: 03 Feb 2004 Posts: 3776 Location: Michigan
  votes: 4
|
Posted: Tue Apr 13, 2004 3:56 pm Post subject: |
|
|
You can use "say" without a callback, but that only works once. 
The only alternative to callbacks would be to code something directly into the bot, for example my bot has "mute", "mask", and "chat" all built in. They're kind of like callbacks in that they are consistent, but they're not callbacks because they don't call any commands. _________________ Current Site (2008) http://www.cuvou.com/ |
|
| Back to top |
|
 |
eric256 The Keymaker

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Tue Apr 13, 2004 3:58 pm Post subject: |
|
|
Callbacks as andromeda implements them don't realy call the command back either, its more a of hey_paste_this_onto_what_the_user_says_if_its_not_already_a_command vairable but I thought that name was a bit long. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com |
|
| Back to top |
|
 |
Cer Upgraded Agent

Joined: 03 Feb 2004 Posts: 3776 Location: Michigan
  votes: 4
|
Posted: Tue Apr 13, 2004 4:00 pm Post subject: |
|
|
If it doesn't actually call the sub back, then that's just confusing. All the commands I've seen with callbacks seem like the sub is called every time.
My bot calls the sub and it works basicly the same way:
| Code: | | # See if they're in a callback.<br />if (exists $chaos->{_users}->{$client}->{callback}) {<br /> # Redirect them to this callback sub.<br /> my $callback = $chaos->{_users}->{$client}->{callback};<br /> $reply = &{$callback} ($self,$client,$msg,$listener);<br />} |
_________________ Current Site (2008) http://www.cuvou.com/ |
|
| Back to top |
|
 |
eric256 The Keymaker

Joined: 03 May 2006 Posts: 2292 Location: Colorado
     
|
Posted: Tue Apr 13, 2004 4:05 pm Post subject: |
|
|
If you read what i have done then you welll see its effect is the same but its actualy more flexible. All callbacks on andromeda do is exactly what i said above. If the user says something and it doesn't start with a command char then add the command char + call back to the beggining of the message and see if its a command now. You could then do very cool callback. For isntance if you want the user to input !mods add user=eric@yahoo.com with call backs you set the callback to "mods add user=". Then when i say "eric256@yahoo.com" it realizes thats not a command and adds the call back to the begginging and then checks agian "!mods add user=eric256@yahoo.com". Commands are then easy to make because they don't care if they are being called directly by the user or by callback because there is no difference to them. Does that make more sense now or have i just added to the confusion? _________________ Eric256
Proud previous owner and current admin of Bot-depot.com |
|
| Back to top |
|
 |
Cer Upgraded Agent

Joined: 03 Feb 2004 Posts: 3776 Location: Michigan
  votes: 4
|
Posted: Tue Apr 13, 2004 4:07 pm Post subject: |
|
|
Ohhh that makes lots of sense! That's actually a bloody brilliant idea. B) _________________ Current Site (2008) http://www.cuvou.com/ |
|
| Back to top |
|
 |
Dazzy Agent

Joined: 09 Jan 2004 Posts: 1731
 
|
Posted: Tue Apr 13, 2004 5:02 pm Post subject: |
|
|
| lol, thats why i love to work with andromeda...so easy to use that feature |
|
| Back to top |
|
 |
|