Originally Posted By: Karunamon
Except I'm not using any switches. You're welcome to try it out yourself.. do a fresh install of mIRC, clone the repo, and move the files in. The settings from the .ini file will be used.


You have portable=yes in your [about] section of the ini, which is an undocumented way of setting portable mode (or perhaps done via the installer you ran to create the ini file originally). Removing this fixes the problem on my end.

Originally Posted By: Karunamon
For instance, how do I ensure that mIRC doesn't prompt for confirmation on a /exit without setting that option ahead of time in the INI?


The answer to that is: you shouldn't care. You might see this as a "standalone app", but mIRC is not your application. At the end of the day, it is just a script that somebody chooses to add to an installation of mIRC. They are running mIRC, not your app. It's the user's choice whether they want mIRC to confirm on exit-- for instance, I might want it on. I might also want to run other scripts in tandem, to run spell checking, use some media player plugin, blowfish encryption, TLS support, or some other utility functions that I need to make use of IRC. And I have the right to make these changes. Your script (yes, it's a script) needs to respect your users' choices.

This isn't just some kind of ethical point, by the way-- it has practical implications: with your git setup, I can't stay in sync with your repository if I make changes to settings while using your script. That's a big deal, since making ANY kind of customization to the client will cause a problem. And I mean anything, like moving the mIRC window a couple of pixels to the right, enabling a proxy connection (/firewall on) that might be required for me to connect to IRC, changing my ident / adding my own main and altnick info, or even just upgrading mIRC (see below). There is a 100% chance that this file will be out of sync for users who clone the repo. This is the diff I get just by starting mIRC and moving the window around to where I like having it:

Code:
diff --git a/mirc.ini b/mirc.ini
index 2562055..fedd766 100644
--- a/mirc.ini
+++ b/mirc.ini
@@ -5,7 +5,7 @@ check=0
 
 [about]
 portable=yes
-version=7.22
+version=7.25
 show=no
 
 [dirs]
@@ -42,13 +42,13 @@ n1=scripts\rbalias1.ini
 
 [options]
 n0=1,1,0,1,0,0,300,0,0,0,1,1,0,0,0,0,1,0,0,0,4096,0,1,0,1,1,1,1,0,50,1,0,1,1,0
-n1=5,100,1,1,79,38,44,2,9,1,1,1,1,1,1,1,1,1,0,0,1,1,1,0,5,0,0,0,0,0,1,1,0,0,0,10
+n1=5,100,1,1,79,38,54,2,9,1,1,1,1,1,1,1,1,1,0,0,1,1,1,0,5,0,0,0,0,0,1,1,0,0,0,10
 n2=0,0,0,1,1,1,1,1,1,60,120,0,0,1,0,0,0,0,1,120,20,10,0,1,0,1,1,1,1,1,1,1,0,0,1,0
-n3=5000,1,0,0,1,0,1,1,0,1,0,1,0,0,0,1,1,1,1,1,0,0,0,0,1,0,0,25,0,0,1,3,180,0,1,1,0
+n3=5000,1,0,0,1,0,1,1,0,1,0,1,0,0,0,1,1,1,1,1,0,0,0,0,1,0,0,25,0,0,1,3,180,0,1,1,0
 n4=1,1,1,0,0,3,9999,0,0,0,1,1,1024,1,1,99,60,0,0,0,2,0,0,0,0,5000,1,5,0,0,3,0,0,1,0,0,0
 n5=1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,300,100,10,0,1,29,0,1,0,8192,0,0,0,100,0,1,1,1
-n6=0,0,0,1,1,1,1,1,1,1,0,0,0,0,1,1,0,1,1,0,1,0,100,0,1,0,1,1,1,1,4,1,1,0,0,0
-n7=0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,1,70,0,3,0,1,0,0,0,0,0,0,1,1,1,1,0,1,1,0,1
+n6=0,0,0,1,1,1,1,1,1,1,0,0,0,0,1,1,0,1,1,0,1,0,100,0,1,0,1,1,1,1,4,1,1,0,0,0
+n7=0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,1,70,0,3,0,1,0,0,0,0,0,0,1,1,1,1,0,1,1,0,1
 n8=1,2,0,130,1,1,0,2,0,1,0,0,0,0,0,1,1,0,0,0,0,0,168,1,0,1,1,1,0,0,0,1,1,0,3,0,0
 
 [pfiles]
@@ -67,11 +67,11 @@ n4=Kte-Dyn.mrc
 n5=reibotmain.mrc
 n6=reibotprofiles.mrc
 n7=reiboticelimport.mrc
-n8=reibotpublic.mrc
-n9=reibotupdate.mrc
+n8=reibotupdate.mrc
 
 [user]
 lastrun=lkVQ3umRcjpuBcIc
+about=l1pV
 
 [ports]
 dcc=1
@@ -85,7 +85,7 @@ uip=on
 uidentd=on
 udcc=on
 userver=off
-ustate=on
+ustate=off
 
 [ssl]
 show=1
@@ -101,8 +101,8 @@ system=UNIX
 port=113
 
 [socks]
-enabled=no
-hostname=
+enabled=yes
+hostname=localhost
 port=1080
 userid=
 pw=
@@ -208,7 +208,7 @@ user=Ayanami
 email=Ayanami@tkware.info
 nick=[Rei]
 anick=[Rei]2
-host=FrogboxSERVER:frogbox.es:6667GROUP:Frogbox
+host=FrogboxSERVER:frogbox.es:6667GROUP:Frogbox
 
 [files]
 servers=servers.ini
@@ -224,7 +224,7 @@ size=2
 buttons=0
 
 [local]
-local=host-174-45-190-46.chy-wy.client.bresnan.net
+local=HOSTMASK_REMOVED
 localip=174.45.190.46
 
 [fonts]
@@ -241,12 +241,13 @@ fmessage=Tahoma,410,1
 
 [windows]
 scripts=-1371,883,325,522,0,0,0
-main=-1399,1141,140,851,0,1,0
-wstatus=-1,773,-1,514,1,1,0
+main=422,1141,186,851,0,1,0
+wstatus=-1,773,-1,515,1,1,0
 wstatus-LSN=-1,773,-1,514,1,1,0
 wchannel=-1,773,-1,514,1,1,0
 wchannel-LSN=-1,773,-1,514,1,1,0
 chanctrl=-1212,427,255,426,0,0,0
+wstatus-Frogbox=-1,773,-1,515,1,1,0
 
 [background]
 @mdi=media\wallpaper-139398.jpg,2


I should point out that even your hostmask is encoded in the ini file, which not only means that everybody on the internet knows your last used IP address, but it also means that every single execution of mIRC will cause the ini file to be modified and cause pull conflicts, since hosts change all the time, even on your own machine.

So in short: you need to be mindful of the fact that you are NOT in control of the client, you are merely writing a script that adds functionality to the program. You have to respect the boundaries as a script author and treat your users as script users, not users of your standalone app-- mIRC is not that kind of program. If you want to control the whole program, write your own IRC client. Until then, let the users use the client as they want and gracefully add your own functionality/settings on top without affecting theirs.

I should also add, simply from a repository management perspective, the typical rule of thumb for maintaining code on repos is: don't commit files that change per build or execution. The ini file is one of those files. Put it in your .gitignore.

If you really want users to have a set of defaults, make an mirc.ini.sample file and explain how to move that file into place in the instructions, if they want your settings. But you should also provide a way to /load -rs the script into place for users who do not want to use the sample file.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"