BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => BeBot Hyborian support => Topic started by: Organizer on August 13, 2008, 12:46:48 am

Title: How to check request channel?
Post by: Organizer on August 13, 2008, 12:46:48 am
I'm been trolling around the wiki and other post, but I can't seem to figure out how to do a check on where the command is issued from...

I am aking a module that displays different content based on your security level... the issues is that if a person with high security level writes the command it in guild chat, it picks up the private info and posts it right back there... I would simply like to do something like a -> IF CHANNEL (or what it is called)  = GUILD THEN XXX ELSE XXX.

Would this be possible somehow, if I've made myself clear enough for anyone to understand me. I'd like the output in Guild but the non private version of it, so I would have to do a check if its triggered via Tell or Guild before doing the > return > this > bot > xx to make this happen... any ideas from the experts?
Title: Re: How to check request channel?
Post by: Alreadythere on August 13, 2008, 06:27:49 am
The command_handler() function has an $origin (sometimes called $channel too) parameter, this can be used to differentiate between the input channels.
Title: Re: How to check request channel?
Post by: Organizer on August 13, 2008, 11:48:15 am
Thanks for the tip, that should do the trick, can't believe I did not notice that variable before :)
SimplePortal 2.3.7 © 2008-2025, SimplePortal