mIRC Home    About    Download    Register    News    Help

Print Thread
Check every X seconds if a "nick" is on my channel #258211 18/06/16 05:50 PM
Joined: Feb 2015
Posts: 7
joseluupp Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Feb 2015
Posts: 7
I need to check every 10 seconds if a user with the nickname "Megatron" is connected on #mychannel
I've tried with this code but does not work frown

Code:
/timer 0 10 /checkadmins #mychannel

and

Code:
alias checkadmins {
  if (Megatron ison $chan) {
    /part
    /timer 1 300 /join #mychannel
  }
}


Thank u guys smirk

Last edited by joseluupp; 18/06/16 05:50 PM.
Re: Check every X seconds if a "nick" is on my channel [Re: joseluupp] #258213 18/06/16 07:12 PM
Joined: Nov 2013
Posts: 22
funfare Offline
Ameglian cow
Offline
Ameglian cow
Joined: Nov 2013
Posts: 22
the second code should be:

Code:
alias checkadmins {
  if (Megatron ison $1) {
    /part $1
    /timer 1 300 /join $1
  }
}


as you want to pass '#mychannel' into the alias as the first variable used.

Last edited by funfare; 18/06/16 07:12 PM.
Re: Check every X seconds if a "nick" is on my channel [Re: funfare] #258214 18/06/16 08:00 PM
Joined: Feb 2015
Posts: 7
joseluupp Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Feb 2015
Posts: 7
It works perfectly, thank you so much!!!!