Hello there!

I've been nagging and annoyed over a script i've found somewhere and trying to mod it into something i wanted to make happend, but couldn't due to my poorly knowledge of how mirc scripts works.

So i came here, as both google and search function didn't really help me in this aspect.

What i'm essential trying to do. is making a script that logs links that starts with http://, https:// and www. .. it does log it, but what i'm trying to do is making it avoid logging the same exact line. like for instance a user / bot says "check this www.google.com", it would keep logging the same message, if same user said the same thing again. is there anyway to make it check before writing. weither that line is actually in there already?.

My current script looks like this:
Code:
on *:TEXT:*:#test: { 
    set %text $1-
    set %s 1
    autologcustom
}

alias autologcustom {
    set %lines $lines(D:\IRCBot\autolog-list.txt)
    while ( %s <= %lines ) {
        if ($read(D:\IRCBot\autolog-list.txt, %s ) isin %text ) {
            write D:\IRCBot\commands\log-custom.txt $date - $time : $nick said >>> %text <<<
            unset %s
            halt
        }
        else inc %s
    }
}


autolog-list.txt is contains:

www.
http://
https://

Thank you for your help smile

Last edited by Empressliquid; 21/08/16 09:12 PM.