arfer wrote:Sometimes a /whois will give the reply (for example) :-
nick is ~
somebody@somewhere.com
and sometimes :-
nick is
somebody@somewhere.com
i need to deal with the ~ programmatically, so i wonder if i could get an explanation of what it is/does?
something to do with ident i suspect
All it is, is the lack of an 'ident' server on the shell machine.
Most IRC Servers nowadays require an ident response from users.
If the machine the bot is running on, does not have an ident server running, or the irc server is unable to connect to it, the IRC server will set the users hostmask as ~
ident@domain.com
if the machine DOES have an ident server running, AND the irc server is able to contact it, it will set the users hostmask as
ident@domain.com without the ~
Anyways, essentially if you want to take this into account when scripting
and matching hostmasks, you can effectively match up the hostmask with wildcards. for example, if in the userfile the bot has a +host for a user
as: *!*
someone@this.users.vhost.com
Then these two hostmasks would be valid:
someone@this.users.vhost.com
~
someone@this.users.vhost.com
However, if in the bots user file +host entry looks like this:
*!
someone@this.users.vhost.com
Then only
someone@this.users.vhost.com hostmask would match,
and ~
someone@this.users.vhost.com hostmask would NOT match.
Hope that explains it a bit.