Since the new version of mbID it's possible to create plugins for mbID. A plugin can be used to extend the commandset of mbID, but you can also use it to build services with it.
There are some rules to make your plugin work with mbID.
The first thing to know is initialising your plugin. This can be done by writing the PLUG-command.
The PLUG-command is in fact a command to write away some information. Parts of the information is standarized and can be viewed below.
Name | Description |
---|---|
name | This is the name of the plug-in, like Defender, ... |
version | This can be used to put the version of the plug-in in. This will be displayed on the plugins-list. |
owner | You can write your name in it. This will also be showed on the Plugins-list. |
start | The command that will start your plugin can be put in here. |
stop | Here you can put the command to stop your plugin from working. |
settings | You can put the command to open the settings (ex. a dialog) of your plug-in here. |
An example of using this plug-command can be found below:
on *:LOAD: { |
var %write = plug Global |
%write name Global |
%write version 1.0.0 |
%write owner Miyako |
%write start global_start |
%write stop sockclose other_Global |
%write settings dialog -m globalsettings globalsettings |
} |
You can also unload a plugin with this command.
An example:
on *:UNLOAD: { plug Global } |
If you want to extend the commandset you can use the CMDS-command. It will allow you to add commands the server will listen for.
An example:
cmds global global_add |
In this example the command will be global and it will be given to global_add. If there are any parameters they will be passed trough.
You can also unload your command by using the next line:
cmds global |
prs is used to send packets to a client. prs has already predefined server-headers.
Sending a raw to someone would look like this:
prs peer 411 text |
In mbID you have access to different popups like Arise, MDX, MPopup, ... . To know what they do look for examples in the code. Most of them are the default aliases everyone use.
The commands avaiable are:
The only command their is:
Commands avaiable:
Here's a list: