mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 2
S
Skyhoof Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Jan 2003
Posts: 2
how to give timers variable names ?
like /timer[named $nick]

I wanted to write a script which kicks people who idle to much on my channel.
It should warn the idler after 10 minutes and kick him after an aditional minute.

My Problem is:
how can i make that the timers i use are named by the nicks of the users on my channel ?

This code isn't working:

Code:
 
on 1:TEXT:*:#test:{
    .timer+$nick+idle off
    .timer+$nick+idle 1 600 {
      /msg $nick You're idle since 10 minutes. One more minute and i've to show you the door.
      .timer+$nick+idle 1 60 /kick $nick #test sleep well
    }
  }

Last edited by Skyhoof; 23/01/03 10:10 PM.
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
To solve the timer issue, use a $+ to join items together: timer $+ $nick

About your idle script, well, the latest mIRC came with a new $nick().idle property, which returns channel idle time in seconds. Click here for an example scripts which you can use.

Joined: Dec 2002
Posts: 417
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
See if this helps

Code:
  

on 1:TEXT:*:#test:{
    .timer $+ $nick $+ $idle off
    .timer $+ $nick $+ $idle 1 600 { /msg $nick You're idle since 10 minutes. One more minute and i've to show you the door.
      .timer $+ $nick $+ $idle 1 60 /kick $nick #test sleep well
    }
  }





Intelligence: It's better to ask a stupid question, then to prove it by not asking....
Joined: Dec 2002
Posts: 417
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
I believe the Idle part of the script is useless unless you are trying to kick a nick for being Idle. Then that script would not work. Unless you have a trigger to compare the Idle time to befor the script kicks the nick




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
Joined: Jan 2003
Posts: 2
S
Skyhoof Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Jan 2003
Posts: 2
thank you!
laugh


Link Copied to Clipboard