mIRC Homepage

[Twitch] Count how many a times timed out.

Posted By: TUSK3N

[Twitch] Count how many a times timed out. - 02/05/16 10:19 AM

Hello I got a cool idea for my bot and that is to see how many times a user has been timed out in a channel and store it in a txt document.

The message that twitch sends when someone gets timed out is
tmi.twitch.tv CLEARCHAT #channel nick

so it should write to a file everytime that triggers

it should look like this in chat.

User: !timeouts
Bot: User you have been timed out X times. Last time was (timestamp)

User: !timeouts User2
Bot: User2 has been timed out X times. Last time was (timestamp)


The part of the write to file Is the one I cant code.
Code:
on *:text:!timeouts:#: {
  if (%flood) { return }
  set -u4 %flood On
  msg $chan $nick you have been timed out (read file) times. etc
}
Posted By: Sakana

Re: [Twitch] Count how many a times timed out. - 05/05/16 07:38 AM

Use ini files to write to and read from:

http://en.wikichip.org/wiki/mirc/ini_files

Play around with /writeini and $readini, and open the .ini file to see how it's structured -- after that you will probably realize how to solve this problem
© 2022 mIRC Discussion Forums