mIRC Home    About    Download    Register    News    Help

Print Thread
How to check whether whois initial by notify list #41470 13/08/03 12:32 PM
Joined: Jan 2003
Posts: 127
L
littlecramp Offline OP
Vogon poet
OP Offline
Vogon poet
L
Joined: Jan 2003
Posts: 127
Is there any way to find out whether the whois is perform from notify list?

Re: How to check whether whois initial by notify list #41471 13/08/03 01:33 PM
Joined: Mar 2003
Posts: 1,271
L
LocutusofBorg Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
I assume you mean you have a code similar to

Code:
on *:NOTIFY: whois $nick


seeing how being on the notify list has nothing to do with doing a hwois. The only fix then is to add the following line to the on notify event:

Code:
  set %notify $nick


and then in the raw events triggered by the whois:

Code:
  if (%notify == $2) { do stuff here }


as well as adding the following optional line for cleanip:

Code:
raw 318:*: if (%notify == $2) unset %notify


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Re: How to check whether whois initial by notify list #41472 13/08/03 01:43 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
In the notify list there is a checkbox to /whois people when they come online, I think he means that.

Code:
on *:NOTIFY:{
  if ( $notify($nick).whois ) {
    set $+(%,$nick,whois,$cid) 1
  }
}
raw 318:*:{
  unset $+(%,$2,whois,$cid)
}


That would set %bobwhois1 to 1 whenever bob came online and the whois option was checked in his notify list entry, the 1 in the variable name is the $cid of the server he came online on. It would unset %bobwhois1 when raw 318 (End of /WHOIS list.) is recieved.