mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 29
Y
Ameglian cow
OP Offline
Ameglian cow
Y
Joined: Mar 2003
Posts: 29
This would be a simple identifier that would be rather easy to include. I have found it annoying to get just the nickname (nick) from a full address (nick!ident@host.com), due to the fact that I cannot use the $nick identifier. Why? It is being read from a hash table, and is not in responce to anything.

Here's what I've been doing for the time being:

$left(<address>, $calc( $len(<address>) - $len( $mask(<address>, 0)) +1 ))

Basically, if the <address> is...
nick!ident@host.com

The function would return...
nick

This should be relatively easy to add, and I'm sure more people than just myself would find use of it.

NOTE: I did read through the "Nick and address identifiers" section of the mIRC help file, and I didn't find an identifier that does this. If I perhaps missed it, and it's already included, post it here so I know that it was already included!

Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
//echo -a $gettok(nick!ident@host.domain,1,33)


new username: tidy_trax
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Aaaah... that takes me back to those days of old, when string manipulation was in its simplest form.

That's a pretty unique method you came up with. I would have chosen a combination including $pos myself.

Alas, $gettok has ruined our fun and the need for all that.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Mar 2003
Posts: 29
Y
Ameglian cow
OP Offline
Ameglian cow
Y
Joined: Mar 2003
Posts: 29
Ahh, wouldn't of thought to look in token identifiers. It seems to work though, thanks a lot!


Link Copied to Clipboard