mIRC Homepage

Check every X seconds if a "nick" is on my channel

Posted By: joseluupp

Check every X seconds if a "nick" is on my channel - 18/06/16 05:50 PM

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
Posted By: funfare

Re: Check every X seconds if a "nick" is on my channel - 18/06/16 07:12 PM

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.
Posted By: joseluupp

Re: Check every X seconds if a "nick" is on my channel - 18/06/16 08:00 PM

It works perfectly, thank you so much!!!!
© 2021 mIRC Discussion Forums