I'm a noob at mirc combined with twitch chat bot scripting, but I am going to take a shot at helping you out, since I used to do basic software programming a few years ago.


However you store the commands, you want to store them per channel. For example, I am trying to get my chat bot operable in multiple channels, and so far, I am able to have a working bot in my channel and have very basic useability in a test channel I created. What I can do in the test channel is use all of the static commands/variables I have coded into the script/bot, and also some dynamic text only commands. Long story short, I can add a new command in the test channel as long as it is a command that only responds with text. (does no functions, etc.)
It is currently setup that it stores the newly created command into a text file that it also reads the command from. In this text file, the commands are organized by channel names as follow:
[#originalchannelname]
command1=(text to respond with)
command2=(text to respond with)

[#testchannelname]
command1=(text to respond with)
command2=(text to respond with)


etc.

When reading from the file, depending on where the command was accessed (original channel, or test), it will pull that respective command.


If you already have the commands being stored this way, then you just need to read from the text file for the commands only listed for the channel calling them.





If I'm not mistaken, if you already have it working where commands are already unique to a channel, reading the text file in the same way you access the commands should only return the channel specific commands.
If not, maybe I helped by giving you some stuff to think about. I would try and help more, but again, I am a noob to this mirc/irc/twitch/bot/script stuff, and am trying to learn how to do virtually the same you are trying to do atm.

Last edited by AeonPsych; 19/07/14 07:44 AM.