mIRC Home    About    Download    Register    News    Help

Print Thread
#271058 17/11/22 12:01 PM
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
It would be great if there could be an easy way to find out your own 'true' $fulladdress in all situations while connected to a $network.

It could either be a new identifier $myfulladdress, or else to have $ial($me) or $ial.self always return your own nick!userid@hostname even if /ial is off or empty, whether inside an event, or in a timer, or from the editbox, etc. I guess there are non-backwards-compatible situations where actually keeping yourself as $ial(*,1) while not in any channels could be confusing to scripts.

If it's considered to be a problem to return a non-blank result from $ial($me) while $ial(*,0) is zero, a compromise might be to have something like $+(1,$me) recognized as a special string which returns the self full address, since a nick beginning with an integer should only be possible from the fake nick created by a server to prevent a nick collision.

A few of the situations where this would be useful include:

* If you are in no channels, the $ial is empty, so $ial($me) is also blank, so it's not easy to determine what your full address is from everyone else's view. If someone opens a query window while you're not in a channel, the $ial($me) is still blank, so you know their current $fulladdress but not your own. If you open a query while not in a channel, they know your own $fulladdress but you don't.

* same goes after issuing /ialclear while you are in channels, where $ial($me) is blank until you 'do something' or wait for the //who $me reply

* if waiting for your vhost/cloak to be applied on top of your @hostname before joining channel(s)

--

The current method to find out if your vhost/cloak is enabled before joining channels requires correctly parsing an incoming message from nickserv, hostserv, etc to identify exactly what your $fulladdress is supposed to be. This is different for networks who don't have nickserv, and there might even be variations among networks which do have nickserv. Or, just trust that a message from hostserv/nickerv is telling you that your vhost/cloak is being turned on.

Or, the alternative is to keep pinging yourself at short intervals until the $fulladdress for the pinging ($nick == $me) changes to what it should be.

Just because I'm configured for SASL doesn't mean I'm already identified to nickserv with my cloak on, as they still let someone connect if the SASL certificate's fingerprint isn't on file, or if the wrong SASL PLAIN password is given.

--

Trying to script the above can be complicated, where there are a variety of events, raw or not, to indicate that all or part of your nick!userid@host assigned by the server has changed. And all it takes is for a future ircd change or non-compliant server and your script is wrongo because it missed something.

maroon #271060 17/11/22 01:20 PM
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
If I understand your post correctly, you assume that mIRC has or can have this information easily, and simply is not saving and/or exposing it right now. I believe that assumption is incorrect: in the cases you describe, mIRC also does not have any ability to know your own full address, without basically implementing what you describe as the way to script this.


Saturn, QuakeNet staff
Sat #271061 17/11/22 02:12 PM
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
I'm not saying that mIRC is playing 'keepaway' with your own fulladdress, I'm saying that it's standard practice for the IAL to be empty when you're not in any channels. So prior to joining a channel, yes $ial($me) is empty. Leave or get kicked out of $chan(1), and it's empty again.

And the part about scripting this, means that it's not forward-compatible or sideways compatible, while mIRC itself keeps up with the changing ways of how ircd's work. So when a script was written in the version 5.x era had the correct value for $nick, newer mIRC versions continued to have the correct string for $nick while older versions thought that unknown .pnick prefixes like '!' were part of the nick.

Also, for a script to work on all current networks, it would require the script to know about all the different kinds of current networks, which is something I assumed mIRC knew more about than a script could possibly know. So at Libera it would need to monitor raw events ACCOUNT,730,900 and save that info somewhere. At Undernet it would monitor 302 and 396. At networks which have a hostserv there would be something else to monitor, but since I don't have a vhost assigned by anyone's hostserv, I don't know. QuakeNet probably does it an additionally different way, and there are probably a bunch of other ways that a script would need to keep track of things in order to have a scripted self-fulladdress that works at them all.

maroon #271330 16/02/23 11:21 AM
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
update:
If this were accomplished by keeping $me always in the $ial() instead of having a $myfulladdress, it would have the side benefit of being able to set ialmarks against yourself without being in a channel and without having them be at the risk of being kicked from your only channel. If $ial($me) were persistent, it would continue to lose all its ialmark's from /ialclear but you'd come right back and stay there until you disconnected.


Link Copied to Clipboard