mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2003
Posts: 1
T
thed00d Offline OP
Mostly harmless
OP Offline
Mostly harmless
T
Joined: Aug 2003
Posts: 1
I need a script to get my nick back when the user who uses my nick gets offline.

Something like:

$nick = thenickname
/whois $nick
if reply = No such nick/channel
then /nick $nick

and repeat every min or so,I hope you can help me

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Add the nick to notify list, then use:

on 1:UNOTIFY:if (%unotifynick == %mynick) { nick %mynick }

or somthing like that :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
that code doesn't specify anywhere the nick on the notify list.
Code:
on *:UNOTIFY: if ($nick == [color:red]mynick[/color]) nick $nick

Change the part in red and as the man said, don't forget to /notify mynick.

PS: downside of this code is that you won't be able to change from mynick to something else, and though it is possible to protect against that, it will take some doing.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Jan 2003
Posts: 150
J
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
and what about network dependent unotify?


Go ahead, jump. 100,000 lemmings can't be wrong.
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
That wasnt what he asked for. smirk


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Code:
alias -l JupeNick return thed00d

On *:NICK: {
  ; Allows you to manually change your nick without grabbing it back.
  if ($nick == $me) set -u10 %DONTJUPE 1
}

On *:UNOTIFY: {
  if ($nick == $jupenick) && (!%DONTJUPE) nick $jupenick
  unset %DONTJUPE
}


Just type /notify thed00d to activate.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard