Intro:

Hello everyone who clicked on this post, thank you very much. I'm pretty new to mIRC, just started using in 5 days ago, I've done codeing before but this is something really new to me.


What I want to do:

So the thing I want to do is when a mod in the Twitch chat types !antispam <word> the word would be writen into a document so mIRC could read from it and when a regular user types that one of those words in chat he gets timed out for 60 seconds.

What I writen so far is:(I could say, what I knew how/what to write):
Code:
 on *:TEXT:*!antispam*:# {
	{ msg $chan $2 successfully added to anti spam }
}


This is the next line after the code but here I want to explain what I wanted to do with this one.

Code:
on *:TEXT:*$read(AntiSpam.txt,n, $1)*:# {
	msg $chan /timeout $nick 60 Timedout for using a banned word
}

Why "*$read(AntiSpam.txt, n, $1)*:#" you make ask, its stupid. Well I'm not good at coding atm as I said in the beginning, but with this I want to read through the file and if it finds the word matching one that was typed in chat the script would time the user out. I think, what that would do is only read the first line in the file but my intention by posting the code in this post is that you could understand what I want to do.

And the last bit of the code, with this i want to clear the file, not delete it but clear it

Code:
on *:TEXT:!antispam clear:# {
        write -c AntiSpam.txt
	{ msg $chan All banned words successfully cleared }


I'm not a native English speaker so if there's some mistakes, really sorry.

Thank you,
wobY

Last edited by wobY; 18/10/16 06:56 PM.