mIRC Homepage
Posted By: Abuser__ ident - 04/10/05 11:26 AM
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
Posted By: Om3n Re: ident - 04/10/05 12:12 PM
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))
Posted By: Riamus2 Re: ident - 04/10/05 01:27 PM
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))
Posted By: Om3n Re: ident - 04/10/05 02:05 PM
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).
Posted By: Riamus2 Re: ident - 04/10/05 03:51 PM
Lol... Right. Go ahead and smack me. laugh
Posted By: LostShadow Ident. - 04/10/05 11:23 PM
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?
Posted By: RusselB Re: Ident. - 05/10/05 12:21 AM
//echo -a $gettok($right($address(<nick>,0),-2),1,64)
© mIRC Discussion Forums