mIRC Home    About    Download    Register    News    Help

Print Thread
#84107 25/05/04 05:19 PM
Joined: Jan 2003
Posts: 20
K
Krayzee Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Jan 2003
Posts: 20
i would like to see a load script function for online scripts like online timers.

with this function u could load a script that is only availble while your connected to the server it was loaded on.

EG

on *:connect: {

if ($network == mynetwork) {
.load -rs -o my_online_script.ini
}

}

the -o would mean its online only when the server disconnects it unloads the script automaticaly.

Last edited by Krayzee; 25/05/04 05:38 PM.
#84108 25/05/04 10:12 PM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Interesting idea, but wouldn't this easily be scripted with the on disconnect event?

Whilst not impossible (nothing is!) things that are easy to script already are less likely to get in as a feature - the mIRC Scripting language is a feature in itself.

Regards,


Mentality/Chris
#84109 26/05/04 01:04 AM
Joined: Dec 2002
Posts: 31
N
Ameglian cow
Offline
Ameglian cow
N
Joined: Dec 2002
Posts: 31
why don't you try this?

on *:connect: { .enable #mygroup }
on *:disconnect: { .disable #mygroup }

is that the effect you're looking for?

#84110 26/05/04 12:02 PM
Joined: Jan 2003
Posts: 20
K
Krayzee Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Jan 2003
Posts: 20
part of the idea was to keep script that arnt needed untill u r connected from taking up memory. You may only need some scripts on certain networks.

i have already scripted it but thought a addition to the load command would be better and easier.

think if u had 20 scripts for 1 network then 20 for another etc etc would be a pain of keeping track of which network the script was loaded for.

Last edited by Krayzee; 26/05/04 12:05 PM.
#84111 26/05/04 12:55 PM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Quote:
You may only need some scripts on certain networks.


if ($network == networkname) { do stuff }

Quote:
think if u had 20 scripts for 1 network then 20 for another etc etc would be a pain of keeping track of which network the script was loaded for.


Why would you have 20 scripts for one network, and 20 for another? I just can't see the point of that. Infact, why do you even need to unload it at all? If you use something like if ($network == networkname) then you should be able to get things to only execute on one network, then you could keep them loaded all the time and connect as usual. As scripts do not do anything when mIRC is closed, loaded or unloaded, I don't see why you'd need to unload scripts on disconnect. CPU usage shouldn't be an issue really...

To separate the connect/disconnect events for each network, just put them in different remote files and name the .mrc files 'NetworkName'. You can then easily access them from the 'View' menu of ALT+R.

As this post says:

"Would it be easy to write a script for my idea?
If it's something that is very easy to do with scripts, chances are it won't be built into mIRC. (This isn't always the case, but should be considered when posting your idea.)"


My 2 cents.

Regards,


Mentality/Chris
#84112 28/05/04 10:52 PM
Joined: Jan 2003
Posts: 20
K
Krayzee Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Jan 2003
Posts: 20
the 20 scripts was a example.

this is why i say it would be useful to unload scripts when u disconnect from a network.

ok i have menus for all the commands for chanserv, nickserv, memoserv and x etc for different networks. now not all the networks have the same commands even though they r still chanserv and nickserv etc.

so on connect i load the script for the right network. but if i was to leave them load for ever network i have the commands for then this would mean a lot of scripts loaded that i dont use all the time.

also when im trying to edit my scripts i have to scroll through all of them to find the 1 i want.

so it would seem to make sence to only load the scripts as and when i need them and not to keep them load all the time which would mean more memory usage, more CPU usage and a slower mIRC.


Link Copied to Clipboard