I am attempting to get a local mIRC bot going for fun and entertainment. The coding to get the bot responding to commands works, for the most part.
However, if after a long period of inactivity (sometimes as quickly as 10 minutes) from the bot, it will not respond to a command. But once a command is entered, this “awakens” the bot and then it will start responding again, but only after ignoring that initial message. Only to go AWOL after some time again.
One thing to note is that when a command is entered, and ignored, mIRC gives the message “* /msg: insufficient parameters (line 25, remote.ini)”. Line 25 of the code works just fine once the bot has been awoken though. So confused.
Perhaps there is a setting within mIRC that I inadvertently changed without realizing the impact it would have on the bot? Anything that might help get me on the right path is much appreciated!
Would that be the issue, even if the bot does respond correctly once “woken up”?
The whole command is:
n10=on *:text:Test:#: {
n11= if ((%floodTest) || ($($+(%,floodTest.,$nick),2))) { return }
n12= set -u10 %floodTest On
n13= set -u30 %floodTest $+ $nick On
n14= msg $chan $read(TestLines.txt)
n15=}
The bot is meant to read a random line from the file upon a given command. The file is in the AppData\Roaming/mIRC folder. I assume the error message is referring to line 14? Pretty standard to have the closing bracket be on its own line. No?
The error refers to Line 25 but the actual problem might be earlier.
You script is greek to me, but perhaps it fails because it reaches the return statement. Something in you logic could be wrong, making it only work if has recieved a command recently. floodTest is related to command spamming, right?
Yes, the floodTest is to stop the command from getting spammed and ultimately getting the bot banned.
I’ve tested the issue out without the flood control and it still happens. In fact, if I remove everything and just make this script the only thing happening, the problem persists.
The problem only happens on the read() command, because if I remove that, the problem goes away. But there’s nothing more to the read command, it’s one of the most simple out there.