mIRC Home    About    Download    Register    News    Help

Print Thread
#241046 17/03/13 10:04 AM
Joined: Dec 2012
Posts: 10
M
ManaPot Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Dec 2012
Posts: 10
I have a working bot already, but I'm looking to add a feature to it. At the moment, the bot is only ran in my IRC channel. But I'm looking to allow other people to use it as well. What I would like to do is make it so they can make their own chat commands.

Example:

"Bob" has the bot in his channel "#bob". Anytime Bob types "!dog" the bot will do "/msg #bob Bob has a dog!".

Users can add a command with something like:

!addcom !dog Bob has a dog!

That would then add the command to the script, and only work in #bob. Does anybody have a code snippit or able to point me in the right direction?

ManaPot #241068 18/03/13 04:23 AM
Joined: Mar 2004
Posts: 526
Fjord artisan
Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
what you would want to do is add a parm to the '!addcom' routine so that you specify channel for command to be added to, the update the routine that process the !addcom routine execution so it substitutes the channel into the 'on *:text:passed_var_channel_name: { etc..' script you would be dynamically building .. its possible, but NOT easy code ...


Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!

Link Copied to Clipboard