Server Help

Bot Questions - Bot wildcard functions...

Kitsune (^) - Mon Jan 09, 2006 6:58 am
Post subject: Bot wildcard functions...
Well, I have wanted to (for fun.. T_T..) make a bot which annoys the crap out of people when you pm them.. but not when you !cmd them.. I need a wildcard functon in which you know... does the wildcard thingie..

-Kit
Solo Ace - Mon Jan 09, 2006 12:10 pm
Post subject:
Oh so it has to do a wildcard thingy when you !cmd then.

I think you'd want something like this.

Code: Show/Hide
void wildcard_thingy()
{
   do (*)
   {
      annoy_user();
   }
   return "user annoyed!".
}


But I may be wrong.
Mine GO BOOM - Mon Jan 09, 2006 3:29 pm
Post subject:
Well, it depends on the bot core. Most bot cores had a function for registering commands (!help, etc) and most also have generic handlers for messages. I don't know how some bot cores handle this, but mine would not send the generic message event if a command was handled first. Thus, a simple 'if privage message and first letter is !' test would be a wild card equiviant of what you want.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group