Difference between revisions of "Plugin Initialization"

From ShoutIRC RadioBot Wiki
Jump to navigation Jump to search
m (Text replacement - "ircbot_programming" to "radiobot_programming")
 
(No difference)

Latest revision as of 14:57, 25 October 2013

Plugin Initialization Sequence

1. The bot attempts to load the plugin with LoadLibrary/GetProcAddress (Win32) or dlopen/dlsym (Linux)

2. The bot calls RadioBotPlugin() in which your plugin should return a filled in PLUGIN_PUBLIC structure.

3. RadioBot then checks that the plugin_ver member matches it's own IRCBOT_PLUGIN_VERSION. If it doesn't match, it will refuse to load the plugin because it is not binary compatible.

4. It then checks if init is not NULL (it is acceptable to set init to NULL if you don't need an init function), and calls it if so. If init returns 0 the bot unloads the plugin. (the bot does not call quit() if init() returns 0)

5. Congratulations, the plugin is now loaded.


RadioBot vde

RadioBot main pages
Main PageInstallationChangelogCommandsPluginsFAQConfigurationCreditsRemote ClientBuilt-In VariablesMulti Sound Server ModeUsername Character Restrictions
Auto DJ Pages
Auto DJ Main PageWebRequest SystemSchedulerMP3 EncoderVoice SupportMySQL Plugin
RadioBot Programming vde

RadioBot Programming
Plugin APIRemote CommandsPlugin InitializationRadioBot DBChanging Command PermissionsShoutIRC Music Database
Lua Scripting
Lua PluginLua ScriptingLua Events