mIRC Home    About    Download    Register    News    Help

Print Thread
#131754 04/10/05 11:26 AM
Joined: Apr 2005
Posts: 53
A
Babel fish
OP Offline
Babel fish
A
Joined: Apr 2005
Posts: 53
How can i write some kind of ident resolver. I want the script that will echo me a user's ident when he joins a channel. I don't want to display host or something. That's how it should look like: * NICK has ident IDENT - so if the nick's host is nick!soldier@somehost.info it would only return "soldier" in echo function.

Thank you grin

#131755 04/10/05 12:12 PM
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
For use on its own, address must be in full nick!ident@host format.

Syntax: /getident <address>
Syntax: $getident(address)
Alias getident { return $gettok($gettok($1,2,33),1,64) }

For use in an event.
$remove($gettok($address,1,64),$chr(126))

Example:
on *:JOIN:#: echo $target $nick has ident: $remove($gettok($address,1,64),$chr(126))


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
#131756 04/10/05 01:27 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Your event version missed one of the $gettoks laugh

$remove($gettok($gettok($address,2,33),1,64),$chr(126))

on *:join:#: echo $chan $nick has ident: $remove($gettok($gettok($address,2,33),1,64),$chr(126))


Invision Support
#Invision on irc.irchighway.net
#131757 04/10/05 02:05 PM
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
Nope, the second gettok is not needed in an event as $address, when used in events, returns in the format ~ident@host without the nickname portion (since that is placed in $nick).


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
#131758 04/10/05 03:51 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Lol... Right. Go ahead and smack me. laugh


Invision Support
#Invision on irc.irchighway.net
#131759 04/10/05 11:23 PM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
To return your ident, you can //echo -a
$gettok($gettok($address($me,5),2,33),1,64) (or)
$deltok($gettok($address($me,5),1,64),1,33).

And to put that into an alias, replace $me with $1.

Anyone got any alternate ways?

#131760 05/10/05 12:21 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
//echo -a $gettok($right($address(<nick>,0),-2),1,64)


Link Copied to Clipboard