MVpybot Major Update

There is a somewhat-major bot update in the works. The plugins system has been completely redone. Instead of plugin files being used for whatever functions can be found in them, they now have to explicitly register functions. Here is an example, the rewritten ping plugin:

A plugin’s register() function is called when the plugin is loaded. It can use registerfunction(), addlistener(), and addhelp(). You can use each function as many times as you want, in case you have multiple functions and/or listeners, or if you want to include help with your plugin.

Read more to find out how to use the new plugin features.

Function Usage

registerfunction() usage:

registerfunction('command', function)

where ‘command’ is the command that the user would use to access this function, and “function” is the actual python function that you have defined in your module. See the ping example above for a usage example.

addlistener() usage:

addlistener('type', function)

For addlistener(), ‘type’ is a string denoting the type of event to call the function on, such as “any” or “privmsg”. “function” works the same as with registerfunction().

addhelp() usage:

addhelp('command', function)

‘command’ is the command that the user will access help on (eg, if ‘command’ was ‘mycommand’, the user would use ‘help mycommand’ to read the help.) Function works the same as the others.

Other Notes

All plugins go in the “modules” folder now. There are no longer separate folders for different types of plugins.

I have not yet rewritten the on-the-fly module management commands (enabling, disabling, reloading, etc) so you will not be able to use these with the new system until I feel like rewriting them.