mIRC Homepage
Posted By: psycogod mIRC Addon Standard (MAS) - 11/12/06 05:12 AM
I would like to propose "mIRC Addon Standard". I have wrote a draft for it and would like to know what people think about it.
The proposel is located here
Posted By: hixxy Re: mIRC Addon Standard (MAS) - 11/12/06 10:10 AM
I think it's a whole lot of work when a little bit of research and sense will tell somebody which addons will and will not work together.
Posted By: psycogod Re: mIRC Addon Standard (MAS) - 11/12/06 11:13 AM
It may be a lot of work, but the benefits are more than just compatibility, that is just the biggest benefit.

If it is acceptable other benefits would include...
  • All settings for addons in one location
  • All Help for addons in one location
  • All addons apply toolbar icons in a similar fashion, and allow the user to choose which icons they want to display.
  • Easier for end users to install scripts
  • Scripters could apply MAS to their scripts, so that they are not the only ones who can write addons for it.
  • Scripters could check to see if the addon type is compatible with the script, and educate the user on the scripts functionality if it already exists.
  • Support addons could be wrote to help eliminate repeating code in several different files, or loading the same dll 10 times.


For now that's what benefits I can think of, and some may not be all that great, but I am running out of time, gotta goto work. I do appreciate your input, and would like to hear more input from people.
Posted By: MeStinkBAD Re: mIRC Addon Standard (MAS) - 15/02/07 10:48 PM
I created my own "standard" for loading scripts and such as addons... very different from your approach. Extensions are irrelevent... so I don't use them... rather this is my approach...

Every "script" in my package requires a dedicated "object/class" identification for the first line. Examples...

The top level script uses this...
Code:
; #== smirc -rs root.root;

A common list of functions uses this...
Code:
; #== smirc -rs base.commons expands group root;

The script responsible for sounds and such uses...
Code:
; #== smirc -rs base.soundman expands group root, class base.common;

Some others
Code:
; #== smirc -rs plugin.awaysystem expands group root, base;

; #== smirc -rs base.gui expands group root, class base.common;
; #== smirc -rs plugin.cloneman expands group root, base;


To make sense of this... I'll explain what all this represents...

The -rs is just the remote script identifier. Then <class> which is made up of <group>.<classname>. Everrything with a . is always a <class>. The "expands" keyword is for determining order. expands group <group> means it belongs after <group>. expands class <class> means it belongs after a particular class. Each script is a class. Each group consists of multiple classes.

When first scanned all this information is loaded into a hash table. Like this for example.
Code:
CLASS=base.gui
GROUP=base
FILE=c:\mIRC\smIRC\base\menu and gui.smirc
SUPER.GROUPS=root
SUPER.CLASSES=base.common
NEXTCLASS=0


Instead of a UID as you use, I just generate a 32 bit hash id from the class id.

There are embedded keys within the script file itself for determining things like name, author, etc. They're embedded like this...

Code:
#_DEFAULT.PROPERTIES OFF

[start]

[section]
key=value
key=value
etc

[section]
key=value
key=value
etc

[end]

#_DEFAULT.PROPERTIES END


These aren't necessary and I actually use them for defining constants that the script itself uses.

The whole idea here is each script is self contained. Only one file (the root file) is required. And if it's unloaded by accident or something i have failsafes to keep things from going out of whack.


© mIRC Discussion Forums