mIRC Home    About    Download    Register    News    Help

Print Thread
#10942 13/02/03 09:54 PM
Joined: Feb 2003
Posts: 2
Q
Quinn Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
Q
Joined: Feb 2003
Posts: 2
How does mIRC update and maintain its NOTIFY list?
I noticed that when a client changes nick or quits or is killed, it notices these events. How would I force mIRC (from an IRC Server) to 're-read' it's notify list? Does it look for a certain numeric or command sent to it?

Any info on this would be appreciated.

Quinn

#10943 13/02/03 10:13 PM
Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
mIRC uses /WATCH command for notify, if server supports it (005 numeric).
Else it just /ison's listed nicks.
You can turn on debug to see all this (/debug @debug).

#10944 13/02/03 10:55 PM
Joined: Feb 2003
Posts: 2
Q
Quinn Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
Q
Joined: Feb 2003
Posts: 2
Not quite what I was after but good info. Server does support 005 numeric. So it uses WATCH. Now, on a QUIT/NICK etc... it sends the whole watchlist out to see who's online? So if I wanted to do the following, how in theory could it be done with no modification to client-side (IRCd only)? When someone sets a certain UMODE (usermode) I want it to recheck it's notify lists? Is there something I could send to mIRC to make it re-check these lists?

#10945 14/02/03 03:43 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
WATCH [CSLl] [-nick] [+nick]
Manages your WATCH list (equivalent to mIRC's Notify List).

WATCH C clears your watch list.
WATCH S generates a status report telling you how many entries you have, how many people have your current nick on their Notify List and the list of nicks you have in your list.
WATCH L generates a list (one nick per line) of all nicks in your WATCH list, both online and offline.
WATCH l generates a list (one nick per line) of all the nicks in your WATCH list that are currently online.

WATCH -nick removes a nick from your WATCH list.
WATCH +nick adds a nick to your WATCH list.

On a network that supports WATCH, /NICK changes and /QUITs are reported to everyone on the watched list for that nick. This happens server-side and requires no client intervention. When you first log on to a network that supports WATCH, your entire Notify list is set as your WATCH list after clearing it (/WATCH C), right after the MOTD has been received.

WATCH C +NotifyNick1 +NotifyNick2 +NotifyNick3 +NotifyNick4 +NotifyNick5 +NotifyNick6

to which the server responds by sending you a /WATCH L S (list + status report), a separate line for each nick you've inserted into your WATCH list, 604 if they're online and 605 if they're not.
Code:

[color:#006600];  WATCH L
;
;  Who's online
;  -servername- 604 Hammer NotifyNick1 userid host tsinfo :is online
;[/color]
raw 604:*: echo $color(notify) -sbflirt * $2 $+($chr(40),$3,@,$4,$chr(41)) is on IRC | halt
[color:#006600];
;  Who's offline
; -servername- 605 Hammer NotifyNick2 * * tsinfo :is offline
;[/color]
raw 605:*: halt
 
[color:#006600];  WATCH S
;
;  How many entries you have and how many people are watching your current nick
;  -server- 603 Hammer :You have 6 and are on 372 WATCH entries
;[/color]
raw 603:*: echo $color(notify) -sbflirt * $2- | halt
[color:#006600];
;  Your entire watch list (separated by spaces in reverse order of entry)
;[/color]
raw 606:*: echo $color(notify) -sbflirt * $2- | halt
[color:#006600];
;  End of /WATCH list.
;[/color]
raw 607:*: echo $color(notify) -sbflirt * $2- | halt

Any time one of the nicks on your list shows up (either by switching into a nick you're watching or by logging on using that nick), the server sends you a 600 numeric. When they log off (/NICK or /QUIT), the server sends you a 601 numeric.
Code:

[color:#006600];
;  Who's online
;  -servername- 600 Hammer NotifyNick2 userid host tsinfo :logged online
;[/color]
raw 600:*: echo $color(notify) -abflirt * $2 $+($chr(40),$3,@,$4,$chr(41)) is on IRC | halt
[color:#006600];
;  Who's offline
;  -servername- 601 Hammer NotifyNick2 userid host tsinfo :logged offline
;[/color]
raw 601:*: echo $color(notify) -abflirt * $2 $+($chr(40),$3,@,$4,$chr(41)) has left IRC | halt

TSInfo stands for TimeStamp Information - when something happened, such as connecting to the server, switching nicks or quitting.

If your server did not support WATCH, mIRC would use ISON instead. When it uses ISON, it polls the server approximately every 40 seconds to see if any of your Notify nicks have changed status. Nothing is stored on the server, as in the WATCH list. mIRC simply issues ISON command followed by the list of nicks you wish to check on (your Notify List).

ISON Nick1 [Nick2 ... NickN]
Queries the server to see which of the listed nicks are online.

ISON NotifyNick1 NotifyNick2 NotifyNick3 NotifyNick4 NotifyNick5 NotifyNick6

to which the server responds with a 303 numeric telling you which of the nicks you specified are online.
Code:

[color:#006600];
;  Who's online
;  - servername- 303 Hammer :NotifyNick1 NotifyNick4 NotifyNick5 notifynick6
;[/color]
raw 303:*:{
  var %i = 1
  while ($gettok($2-,%i,32)) {
    echo $color(notify) -sbflirt * $ifmatch ison IRC
    inc %i
  }
  halt
}

Of course, you'd have to store their current status so you didn't repeat yourself; mIRC does this internally and only shows those nicks whose statuses have changed.

mIRC also has settings you can check through script to determine whether to echo it to status, active or just update the Notify List window. In the preceeding simple examples, I have just used echo -s to echo it to the Status Window. In a more user-friendly script, you would have to check the user's settings to make your script follow their client setup choices and behave accordingly. However, since your question didn't specifically mention scripting anything in particular, the script samples were provided to clarify exactly what was happening.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#10946 15/02/03 07:58 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Quote:
Code:
raw 303:*:{
  var %i = 1
  while ($gettok($2-,%i,32)) {
    echo $color(notify) -sbflirt * $ifmatch ison IRC
    inc %i
  }
  halt
}


Or just:
Code:
raw 303:*: tokenize 32 $2- | echo $color(notify) -sbflirt * $* ison IRC
I just love $* smile


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#10947 16/02/03 11:55 AM
Joined: Dec 2002
Posts: 212
V
Fjord artisan
Offline
Fjord artisan
V
Joined: Dec 2002
Posts: 212
and I just love the way you arrange those echo switches: -sbFLIRT ;b


And all I need now is intellectual intercourse, a soul to dig the hole much deeper
Joined: Dec 2002
Posts: 483
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Code:
raw 600:*:{ echo $color(notify) -abflirt * $2 $+($chr(40),$3,@,$4,$chr(41)) is on IRC test | halt }
raw 601:*:{ echo $color(notify) -abflirt * $2 $+($chr(40),$3,@,$4,$chr(41)) has left IRC test | halt }


I don't get this to work, whats wrong?

I want to halt the whole raw, I find the output annoying. I allready can see the join/part and if not I see the nick in the channel/query/ect bar. smile


Link Copied to Clipboard