mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 106
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Feb 2003
Posts: 106
24 hrs ago i was perusing $mircini wondering if mirc stored
the current ip there. I found the following and I was happy
Code:
 
[local]
local=xxx-xxx-xxx-xxx........
localip=xxx.xxx.xxx.xxx
longip=1234567890

Today I examined $mircini and the section is no longer there.
What has happened to it?
Am I hallucinating today, or was I hallucinating yesterday?

All advice and meds gratefully accepted


-
Just because it never happened doesn't mean it isn't true.
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
The data of this section is what you find or set at "Options" > "Connect" > "Local info".
This means: it will be valid only if it's been auto-filled after a connect (if you ticked "on connect, always get:"), or you did put valid values (either in the dialog or with the /localinfo [host] [IP] -command). This also implies that, as the values are manipulable, you cannot rely on them for all purposes (but this will depend on what you need it for). In any way, the whole ini-section "[local]" will disappear if no (or invalid) data had been put.

However, you may have run across a unknown bug (unknown to me at least):
After the data had been retrieved on connect, or updated with a /localinfo -u/h lookup, or changed with /localinfo <custom values>, it is cached internally by mIRC (accessible by the $ip and $host identifiers). It's not yet written to the inifile:"//echo -ag $readini($mircini,local,localip)" for example won't show the new ip value. But: the command /saveini does not update the file either. I think it should, and I'd be glad if other users would confirm this possible bug. At the moment, I have to open the options-dialog and close it with "OK" to have any new "localinfo"-data written into the mirc.ini file.

Maybe you can use $host and $ip and thus avoid the ini-issue at all?

Last edited by Horstl; 05/01/10 01:45 AM.
Joined: Feb 2003
Posts: 106
L
Vogon poet
OP Offline
Vogon poet
L
Joined: Feb 2003
Posts: 106
Yes, I tried to force mirc.ini to update using /saveini but it did not recreate [local]. And thanks for mentioning the options-dialog. That explains why the [local] section reappeared after I reviewed the settings there; I hadn't made the connection.

Using $ip appears to be the best solution, but my curiosity was piqued at the non-appearance of [local].

Cheers


-
Just because it never happened doesn't mean it isn't true.

Link Copied to Clipboard