mIRC Home    About    Download    Register    News    Help

Print Thread
#118152 22/04/05 05:41 PM
Joined: Oct 2004
Posts: 24
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Oct 2004
Posts: 24
I think it would be a nice idea to add to thoses events tthe function to catch load/unload of OTHER script ... It will help to create modular script to take data from others script

wouldn't that be a good idea ?


the way it's supposed to be !

UnderNet #scripting - #mircscripting
#118153 22/04/05 05:56 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
It would be an excellent addition, I think that's probably why Khaled had already implemented into mIRC.

/help On Load
/help On Unload
/help $script

#118154 22/04/05 06:08 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Huh? He wants the load/unload events in one script to trigger whenever any script file is loaded/unloaded. This is not already in mIRC.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#118155 22/04/05 06:17 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Ooops! My mistake read it wrong.

#118156 22/04/05 07:20 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Great idea smile

I think that there should either be a whole new event or an optional matchtext section so current on (un)load events will work as normal.


New username: hixxy
#118157 22/04/05 08:08 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I agree with that as well. It would also help as a protection for people to avoid accidentally loading scripts (aka trojans). Obviously, anyone who knows what they are doing won't load up a trojan in IRC, but probably 80-90% don't really know what they are doing from my experience in a help channel and my own channel.


Invision Support
#Invision on irc.irchighway.net
#118158 22/04/05 08:13 PM
Joined: Dec 2002
Posts: 208
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
I'm not sure how useful that could be. Unless you have some standardized method of getting such information from a script (a master module, or something, to which the other modules interface, and only addons that conform to said standard at that), pretty much all you can get is alias names and events, leaving you in the dark as to what it actually does. I don't see how that will increase the modularity of a script.

On the other hand, perhaps you had something in mind that I haven't thought of. I'd be interested to hear what you were thinking of doing, specifically.

On the third hand, I am not sure I'd like some scripts to know when I load/unload another. I imagine it could be abused somehow. If this were added, the prompting that is done with the current implementation of on load should apply to the extension as well.

As an aside, I personally like the idea of having some sort of main module that makes modules work together, but I think the addons should be responsible for communicating with it via their own on load/unload, which could prevent, or at least reduce, compatibility issues with addons from some other source (if they don't follow the standard, they don't tell the main script anything at all, but at least they aren't giving it invalid/useless information).

Just my take on it all.


If I knew now what I will know then... maybe things will have been different...
#118159 22/04/05 08:54 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Quote:
I'm not sure how useful that could be. Unless you have some standardized method of getting such information from a script (a master module, or something, to which the other modules interface, and only addons that conform to said standard at that), pretty much all you can get is alias names and events, leaving you in the dark as to what it actually does. I don't see how that will increase the modularity of a script.


This would be very useful for the way my modules work as I can unload files that don't comply.

My module tree:

Code:
Core
· Module 1
·· Module 1 extension.
··· Module 1 extension extension.
··· etc..
·· Another module 1 extension.
·· etc..
· Module 2
· etc...


New username: hixxy
#118160 22/04/05 09:37 PM
Joined: Dec 2002
Posts: 208
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
Quote:
This would be very useful for the way my modules work as I can unload files that don't comply.


From a user's standpoint, I wouldn't like that. It would limit what scripts I can install to those written by only a handful of authors, unless some sort of standard is established. Even then, the scripts I already have would need an overhaul, or they'd just get thrown out.

As a script writer, I can't be bothered to write every little addon that anyone could possibly want, so why should I stop them from getting it from somewhere else? If they want some of my addons, they shouldn't be required to give up what they already have. Then again, I wouldn't have to, because I wouldn't write it that way. Are you prepared to?

Last edited by Hrung; 22/04/05 09:40 PM.
#118161 22/04/05 09:56 PM
Joined: Oct 2004
Posts: 24
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Oct 2004
Posts: 24
Quote:

I'm not sure how useful that could be. Unless you have some standardized method of getting such information from a script (a master module, or something, to which the other modules interface, and only addons that conform to said standard at that), pretty much all you can get is alias names and events, leaving you in the dark as to what it actually does. I don't see how that will increase the modularity of a script.

On the other hand, perhaps you had something in mind that I haven't thought of. I'd be interested to hear what you were thinking of doing, specifically.


yeah I'm writing a Main Daemon for hosting Daemon(ident,POP3,SMTP,...) to get data from them to manage them as well by that MAIN daemon... Each daemon will be a module in that MAIN daemon that I will be able to add/remove. I already got something good with it ... the major part of the MAIN daemon is done but if I could get it directly in a load/unload it will be easier for me to know wich one I just added grin

I have already set some sort of standardization in it to know how I'll get my data from them but maybe you are right and we'll not be able to catch all of the data I want to get from it ... frown


the way it's supposed to be !

UnderNet #scripting - #mircscripting
#118162 22/04/05 10:28 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Quote:
From a user's standpoint, I wouldn't like that. It would limit what scripts I can install to those written by only a handful of authors, unless some sort of standard is established. Even then, the scripts I already have would need an overhaul, or they'd just get thrown out.


Agreed, but i'd like it even less if I loaded some random addon and it clashed with the script I was using.


New username: hixxy
#118163 06/05/05 05:07 AM
Joined: May 2004
Posts: 27
N
Ameglian cow
Offline
Ameglian cow
N
Joined: May 2004
Posts: 27
you say something like this:

core.mrc

on *:load:*.mod:echo -a new module loaded: $loadfile

i think this could be very usefull


---

Nixor's - http://xoniq.tk
#118164 06/05/05 04:19 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
I think $filename should hold the file for consistency with most of the other events involving files.


New username: hixxy

Link Copied to Clipboard