mIRC Homepage
Posted By: Gwion Change nick with script? - 18/05/03 09:38 AM
Hi,

Since it happens sometimes that nickserv changes my nick to a standard one or when I reconnect and the name is still in use the perform command can't work, is there a way to check with a script which nickname I have (lets say after every 5 or 10 minutes) and if it is not one of e.g. two specified or contains a certain word (like guest or something) change it to another one?

Thx,
Gwion
Posted By: Anonymous Re: Change nick with script? - 18/05/03 11:25 AM
Well, I would make an alias like this
Code:
alias CheckNick {
  if (($me != Nick1) || ($me != Nick2) || (Guest isin $me)) nick MyNick
  if (!$timer(CheckNick)) .timer CheckNick 0 300 CheckNick
}

Then you could just add CheckNick to your perform.
Posted By: Gwion Re: Change nick with script? - 18/05/03 02:43 PM
Hi,

Thanks.
Just, as i understand this it would only work after connecting .. what, if the nick got changed (as nickserv for whatever reason sometimes does) while I am still connected?

Gwion
Posted By: Anonymous Re: Change nick with script? - 18/05/03 02:45 PM
It checks every 5 minutes as you requested

Edit: See where it sets the timer in the alias
Posted By: Gwion Re: Change nick with script? - 18/05/03 04:46 PM
Hi,

Hm, I seem to be too stupid ..
It does not do anything .. but I get a msg: /timer: invalid parameters (line 3, checknick)

It looks like this now:
alias /CheckNick {
if (($me != Nick1) || ($me != Nick2) || (Guest isin $me)) nick Nick2
if (!$timer(CheckNick)) .timer CheckNick 0 300 CheckNick}

Sorry .. what am I making wrong?
In the perform window I wrote alais CheckNick

Wondering a bit since I thought it must be something like /command

Gwion
Posted By: Collective Re: Change nick with script? - 18/05/03 04:48 PM
Change ".timer CheckNick 0 300 CheckNick" to ".timerCheckNick 0 300 CheckNick".
Posted By: Gwion Re: Change nick with script? - 18/05/03 06:31 PM
Hi,

Gives a
ERROR > 421: Unknown command: CHECKNICK}
message after 4 minutes

Gwion
Posted By: Collective Re: Change nick with script? - 18/05/03 06:37 PM
Code:
alias CheckNick {
  if (($me != Nick1) || ($me != Nick2) || (Guest isin $me)) nick MyNick
  if (!$timer(CheckNick)) .timerCheckNick 0 300 CheckNick
}

^You need the } on a new line
© mIRC Discussion Forums