mIRC Home    About    Download    Register    News    Help

Print Thread
#241046 17/03/13 10:04 AM
M
ManaPot
ManaPot
M
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?

#241068 18/03/13 04:23 AM
Joined: Mar 2004
Posts: 342
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Mar 2004
Posts: 342
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 ...


Link Copied to Clipboard