|
Joined: Oct 2004
Posts: 24
Ameglian cow
|
OP
Ameglian cow
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
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Ooops! My mistake read it wrong.
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
Great idea 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
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
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
|
|
|
|
Joined: Dec 2002
Posts: 208
Fjord artisan
|
Fjord artisan
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...
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
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: Core
· Module 1
·· Module 1 extension.
··· Module 1 extension extension.
··· etc..
·· Another module 1 extension.
·· etc..
· Module 2
· etc...
New username: hixxy
|
|
|
|
Joined: Dec 2002
Posts: 208
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 208 |
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.
|
|
|
|
Joined: Oct 2004
Posts: 24
Ameglian cow
|
OP
Ameglian cow
Joined: Oct 2004
Posts: 24 |
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 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 ...
the way it's supposed to be !
UnderNet #scripting - #mircscripting
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
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
|
|
|
|
Joined: May 2004
Posts: 27
Ameglian cow
|
Ameglian cow
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
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
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
|
|
|
|
|