mIRC Homepage
Posted By: ManaPot Custom Commands - 17/03/13 10:04 AM
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?
Posted By: HorseC Re: Custom Commands - 18/03/13 04:23 AM
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 ...
© mIRC Discussion Forums