mIRC Home    About    Download    Register    News    Help

Print Thread
#262369 27/01/18 02:10 PM
Joined: Jul 2014
Posts: 313
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 313
When we add a nickname through the command:

Example: /ignore -pw Tiago

The nickname is added to the ignore list, but it is not written to the control.ini file

And this command: /ignore -rw (does not clear the control.ini file)

mIRC Version 7.51.1800

Last edited by Tiago; 27/01/18 02:22 PM.

TECO
irc.PTirc.org (Co-Admin)
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
It does when you flush it to disk: /saveini

Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
mIRC keeps certain INI files in memory(mirc.ini, control.ini, vars.ini, etc) for faster access and writes to disk in batches.

If you are accessing one of those files you will need to flush it to disk using either of the following:

Code:
;; writes all in-memory INIs to disk
/saveini

;; Writes the specified in-memory INI to disk
/flushini path/to/ini


I am SReject
My Stuff
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
It's possible that control.ini is not part of the batch process.

/flushini exact c:\path-without-spaces\control.ini

... did nothing, and a half hour after i used "/ignore -rw Tiago" in the editbox it has yet to write the change to disk, even though vars.ini and mirc.ini have newer timestamps. "/ignore -l" reports the ignore list is empty, even though that entry still appears in control.ini

Until this is fixed, Tiago might want to have a timer performing saveini at intervals.

Joined: Jul 2014
Posts: 313
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 313
Thank you maroon

Originally Posted By: maroon
It's possible that control.ini is not part of the batch process.

/flushini exact c:\path-without-spaces\control.ini

... did nothing, and a half hour after i used "/ignore -rw Tiago" in the editbox it has yet to write the change to disk, even though vars.ini and mirc.ini have newer timestamps. "/ignore -l" reports the ignore list is empty, even though that entry still appears in control.ini

Until this is fixed, Tiago might want to have a timer performing saveini at intervals.


TECO
irc.PTirc.org (Co-Admin)
Joined: Jul 2014
Posts: 313
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 313
maroon is not necessary to use a timer, just use this alias:

Code:
ignore { ignore $$1- | saveini }

But thanks for the help smile

Originally Posted By: maroon
It's possible that control.ini is not part of the batch process.

/flushini exact c:\path-without-spaces\control.ini

... did nothing, and a half hour after i used "/ignore -rw Tiago" in the editbox it has yet to write the change to disk, even though vars.ini and mirc.ini have newer timestamps. "/ignore -l" reports the ignore list is empty, even though that entry still appears in control.ini

Until this is fixed, Tiago might want to have a timer performing saveini at intervals.

Last edited by Tiago; 29/01/18 02:38 AM.

TECO
irc.PTirc.org (Co-Admin)
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
i just now checked, and the control.ini finally flushed to disk about 30 hours after the test. I didn't do anything in the ignore-tab, I think clicking 'ok' after changing settings in the highlights tab of address book did it.

Joined: Jul 2014
Posts: 313
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 313
hi maroon

But the problem is in command
/ignore

The Address Book works correctly smile

Originally Posted By: maroon
i just now checked, and the control.ini finally flushed to disk about 30 hours after the test. I didn't do anything in the ignore-tab, I think clicking 'ok' after changing settings in the highlights tab of address book did it.

Last edited by Tiago; 29/01/18 12:09 PM.

TECO
irc.PTirc.org (Co-Admin)
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
As explained this is not a problem/bug, mIRC handles this INI file for you, it keeps the data in memory and periodically saves them to disk. You shouldn't be expecting the INI file to reflect the current configuration.
Overriding the alias /ignore to execute /saveini whenever you use that command is not a good idea because /saveini writes all the mIRC's INI files to disk, not just the one used for ignores, which could cause some slowdowns, and one could always execute /!ignore to override your override, and in this case you would still be facing this 'problem'. If anything maybe some switches for /saveini could be added so that only specifics files would be saved to disk, but basically the idea is that you shouldn't be touching/monitoring mIRC's INI files yourself.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jul 2014
Posts: 313
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 313
Well, if through the Address Book mIRC immediately monitors the control.ini file then you should do so with the command /ignore

So this for me can only be bug.

Originally Posted By: Wims
As explained this is not a problem/bug, mIRC handles this INI file for you, it keeps the data in memory and periodically saves them to disk. You shouldn't be expecting the INI file to reflect the current configuration.
Overriding the alias /ignore to execute /saveini whenever you use that command is not a good idea because /saveini writes all the mIRC's INI files to disk, not just the one used for ignores, which could cause some slowdowns, and one could always execute /!ignore to override your override, and in this case you would still be facing this 'problem'. If anything maybe some switches for /saveini could be added so that only specifics files would be saved to disk, but basically the idea is that you shouldn't be touching/monitoring mIRC's INI files yourself.


TECO
irc.PTirc.org (Co-Admin)
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
As explained above, this is by design. Dialogs, such as the Options and the Address Book dialogs, save all settings when they are closed because they are only occasionally used. Script commands, on the other hand, can be called repeatedly thousands of times. If mIRC was to save a setting every time it was changed by a script command, it would spend half of its time writing settings to files. This is particularly an issue with users who use mIRC on USB drives. The /saveini command was created for scripters who want to save settings immediately.

Joined: Jul 2014
Posts: 313
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 313
Ok. So I'll start using the /saveini command.

Originally Posted By: Khaled
As explained above, this is by design. Dialogs, such as the Options and the Address Book dialogs, save all settings when they are closed because they are only occasionally used. Script commands, on the other hand, can be called repeatedly thousands of times. If mIRC was to save a setting every time it was changed by a script command, it would spend half of its time writing settings to files. This is particularly an issue with users who use mIRC on USB drives. The /saveini command was created for scripters who want to save settings immediately.


TECO
irc.PTirc.org (Co-Admin)

Link Copied to Clipboard