mIRC Home    About    Download    Register    News    Help

Print Thread
#257771 16/05/16 09:08 PM
Joined: May 2015
Posts: 133
K
Vogon poet
OP Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Since $exists looks for a folder/file, I'm looking for a way to check if a timer currently exists. What I am trying to do is, add a list of users to a text file. If they've been added to the list within the past xx hours I would like to NOT add them to the list.

Is timers the right way to go or should I track them somehow else? Does writing this list of users to another file, then checking if it exists better?

Thanks. My brain wants to do:

Code:
if ($exists(timer1.user) { return }


twitter @keyeslol
Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
Code:
if ($timer(name).secs) {

I believe this will do it! smile (for general knowledge)
Now, for what you want to do,
You can write the nick to the file set a timer to delete it after X seconds.
And when the adding command is used you will check if the nick is in the txt file or if the timer exists. But i suggest checking the txt filenn because in case your mirc stops for some reason.. (like a failed while loop) the timers will stop.
P.S if the length of the list is not too big you can more easily add the nicks to a variable with $addtok and with a timer $remtok it!

Joined: May 2015
Posts: 133
K
Vogon poet
OP Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Thanks, I ended up writing nicks to a separate file, and checking if nick is in the file. I'm using a timer to remove the nick after a period of time.

It's not perfect, but does what I need it to do for the time being.


Last edited by keyeslol; 16/05/16 10:20 PM.

twitter @keyeslol

Link Copied to Clipboard