Quote
1. I have 2 text files:
+ (1) atb_reason.txt (in this file there are about 10 reasons kick from reason1 to reason10 I have preset, one reason per line);
+ (2) atb_database.txt (in this file will save the data about [id kicknumber],NickNameOfKick,AddressIP/HOST,ReasonKick), if any NickName or AddressIp/HOST is in there, entering the room will be banned and kicked with ReasonKick and this [id: kicknumber]. I mean when you kick and ban with 1 id and 1 reason kick, the next time MyBot will kicked and banned with the correct id and reason kick before.

Quote
2.1. Command:!b <nick> [reason] <== I want this command when there is no reason, MyBot will automatically random reason from atb_reason.txt. If there is reason, MyBot will save
the reason in the file atb_database.txt as mentioned in point 1 above.

As far as I understand correctly the translation of what you have written, this command should work in the latest version of the script exactly as you want.

For example, you enter the command on the #test channel: "!b troll You are not welcome here"
– writing a row in the database will look like this: "[id:XW93884];troll;*!*@OKCHI.VPXW7.JMXH6.HEQ79;#test;🚩 You are not welcome here".

You can leave out the reason, and then it will be taken from the file "atb_reason.txt" in random order. Let me remind you that all the parameters indicated in the example in square brackets "[]" are optional, but can be used as an additional parameter. For example: "!b <nick> [reason]" or "!b <nick>".

Quote
2.2. The command:! Badd <nick> <host> [id] [reason] can be edited in the following order to make it easier to remember:! Badd <nick> <host defautl *! * @ Host> [reason] [id ]. Example:! Badd BadNick *!*@10.11.12.13 You are badchatter not welcome here [id: 9999]

Placing the "[reason]" parameter at the very end is more logical, because the sentence with the reason for the kick can be quite long, consisting of several words separated by a space. Otherwise, it will create confusion in the sequence of parameters while typing the command and will have a negative impact on the correct operation of the script. Therefore, it would be a mistake to swap these parameters.

Quote
2.3. Command:!bdel <nick|mask|id> <=== When typing 1 of these 3, MyBot will automatically delete all information about nick|mask|id in the file atb_database.txt. And the next time that Nick or Mask enters the room, he/she will not be kicked/banned again.

I was thinking about the possibility of using the ordinal of the record that is in the database, but this contradicts the fact that the identification numbers can also have numeric values and then this can lead to an erroneous selection of the row to delete, so this is will work better in a format that was presented in the description for the script: "!bdel <nick|host|id>"

Quote
2.5. In your example image, I see that the reason kick and id kick are not the same. I want the following kicks to have the reason and id as the first time I was kicked/ban.

The fact is that I deliberately used different nicknames for the example, and if you look more closely, each nickname corresponds to a different line in the database list. This can be tracked by the ban ID number.
The user with the nickname "bizze" corresponds to the 5th line in the database with the identifier "[id:EZ82031]", since the search was carried out by his nickname.
Then he changed his nickname to "troll" and join to this channel again, but now his nickname was found in the database in line number 1 with the identifier "[id:XW93884]".

Line 5: [id:EZ82031];bizze;*!*@A522A.U2RLR.UQ1SP.G5EG5;#test;✞ The Operator is always right
Line 1: [id:XW93884];troll;*!*@OKCHI.VPXW7.JMXH6.HEQ79;#test;🔨 Get out of here away!

In this example, the database contains only these nicknames, but there is no entry with a similar host. So the script will search for the incoming user according to the data that is in the database and, if found, will return the data of the line in which the user entering the channel was found.




🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples