mIRC Homepage
Posted By: Tulon Nick-specific scripts - 06/10/10 05:42 AM
Is there a way to get different scripts to run on different nicks? It used to be, with XP, that you could simply install twice and have one set of scripts with one nick and a separate set with another, and there wouldn't be any crossover or mix up or anything, but Vista doesn't seem to let you keep the scripts separate. Is there some simple solution I'm missing or anything?
Posted By: DJ_Sol Re: Nick-specific scripts - 06/10/10 06:10 AM
It's not Vista, it's how mIRC was written.

Originally Posted By: "versions.txt"
20.For Vista compatibility, new installations of mIRC now save all
settings in the User's "Application Data\mIRC" folder by default.

However, if the installer or mIRC find mirc.ini in the same folder
as mirc.exe they will use the mirc.exe folder for all settings.
Users installing over an old version of mIRC should therefore see
no change in behaviour.


The installer is now also aware of administrator and standard user
accounts and installs mIRC accordingly.
Posted By: N3M3S1S Re: Nick-specific scripts - 06/10/10 06:35 AM
How exactly do you want the script(s) to be nickname specific? Like two seperate installs or one install?

If its one install, for the parts of the script you want to react to certain nicknames you could add:

Code:
if ($nick == nick1) {
  ...commands
}
elseif ($nick == nick2) {
  ...commands
}

Posted By: Tulon Re: Nick-specific scripts - 06/10/10 07:02 AM
Separate installs would be better really, the idea is to run one as 'me' and a second under a second nick that's mostly automated (with the permission of the people who run the server and everything of course).

Also, I had thought of something similar to what you suggested, using if (nick1 isin $nick) to allow the scripts to run both under nick1 and nick1|ping for when it pings out and has to come back with a new nick to ghost the old one before changing the nick back, but there are a few hundred scripts, so I was sort of hoping for something slightly easier.

I'm not sure if that made it more clear or not, but I hope it helps explain what I'm shooting for.
Posted By: N3M3S1S Re: Nick-specific scripts - 06/10/10 08:22 AM
Well now it seems like your saying you want a seperate mIRC to run as a channel bot.
Posted By: Riamus2 Re: Nick-specific scripts - 06/10/10 11:26 AM
The easiest way to do what you want is to put mirc.ini into your install folders. That will make it use separate settings and scripts.

Alternatively, you can add a switch (I think it's -r) to the mIRC shortcut that points to a specific mirc.ini file for one copy and another mirc.ini file for another copy.
Posted By: Darwin_Koala Re: Nick-specific scripts - 07/10/10 07:39 AM
Unless you have a specific reason for wanting different versions, a single install of mIRC is the best approach. You can always start multiple instances with different settings as Riamus2 has noted (see "Command Line Parameters"). This allows you to have completely separate scripts - or share common scripts (by loading common script files as well as individual ones). Running multiple instances from a single install is quite powerful and reduces your management of versions.


Cheers,

DK
Posted By: DJ_Sol Re: Nick-specific scripts - 07/10/10 09:28 PM
You don't install mIRC more than once. Just copy mirc.exe and mirc.ini and paste them to your other script folder.
Posted By: Darwin_Koala Re: Nick-specific scripts - 08/10/10 06:57 AM
Originally Posted By: DJ_Sol
You don't install mIRC more than once. Just copy mirc.exe and mirc.ini and paste them to your other script folder.


If you use the command line parameters - you don't need to copy mirc.exe. You can store your mirc.ini and script files anywhere.

Cheers,

DK
Posted By: DJ_Sol Re: Nick-specific scripts - 08/10/10 03:03 PM
I dunno, I personally like having the exe with the ini file organized. Different scripts connect to different networks in different ways and require different settings which requires different mirc.ini files.
I also release my scripts to the public so I like to keep the exe and ini in the individual script folder.
Posted By: Darwin_Koala Re: Nick-specific scripts - 09/10/10 12:41 AM
Notwithstanding Personal Prefence, everything you have mentioned can be achieved more efficiently with the command line parameters.
Here is how I start my second instance of mIRC - totally different scripts and nicks (could even be different networks if I wanted):
Code:
"C:\Program Files\mIRC\mirc.exe" -iCCA_mirc.ini

"CCA_mirc.ini" is the additional mirc.ini file.

I currently start in (based on how long I have been using mIRC, and that I haven't done a clean install of the latest one.
Code:
"C:\Program Files\mIRC"

But this could very easily be a custom folder - perhaps in teh users own documents area.

You can bundle the scripts and ini files into one place. You can also link to script files that are common between instances (thus, a change in one means a change in all. You can have the best of both worlds.

Releasing the scripts to the public is easy, because you then only have to release the scripts and not mIRC.exe. You can put a shortcut in the individual script folder 'Copy this to the desktop".

Obviously, how you do it is your personal choice, but I think that other readers of these forums should be aware of a more effective way of managing the application, instances and scripts than the standard reply of "oh, just install another version of the application" if they want to run different scripts-nicks.

Running different versions for development purposes is whole different ball game.

Cheers,

DK
© mIRC Discussion Forums