mIRC Home    About    Download    Register    News    Help

Print Thread
#199582 16/05/08 08:16 PM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
Hi,
Is it possible?

I know on ops it is:
Code:
$iif ($me isop


But how to check if a nick is registered

I want to use it for a menu popup

Is it something like:
Code:
$iif ($nick is registered 

Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
/help isreg


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
isreg checks if a nick is a regular user, ie. not opped or voiced.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
There's no built-in way to check if a nick is registered because nick registration services are entirely separate from IRC itself. There may be a way for to query the server/services about a given nick to see if they're registered but you'd need to consult the help available for your network since it varies depending on what services they run.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Sep 2007
Posts: 28
M
Ameglian cow
Offline
Ameglian cow
M
Joined: Sep 2007
Posts: 28
like starbucks said, scripting and services are completely different themes.
The most common method to check is using a whois+raws. But I don't know if all services use this.

Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
would this do the trick:
Code:
raw 307:*: {
  haltdef
  $iif(%nickreg == 1,set %regvalue 1 ,set %regvalue 0)
}


and then in the menu:
Code:
.$iif (%regvalue,drop nick regestration) { bla bla bla bla }

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Nope, you cannot trigger the popup (rclick), have the who(is) sent, wait for the servers reply, parse the reply and only then display the matching data in the popup.

You'd need to grab and store the data first
e.g.:
- get data of unknown nicks on me:*:join
- update on nick/join/quit etc
- store this to a hash table or the like

then you could use some
menu nicklist {
$iif(($hget($+(registerednicks,$network),$nick)),drop nick $$1) : -drop command-
}

...which is not reliably anyway, as the user might register/drop the nick in the meanwhile since you grabbed that data

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
If the network uses nickserv, you can use
Code:
/msg nickserv status <nick(s)>
to return a list consisting of the specified <nick(s)> and a numeric response of 0 - 3

See /msg nickserv help status for more details.


Link Copied to Clipboard