Plugin Initialization
From IRCBotWiki
Plugin Initialization Sequence
1. The bot attempts to load the plugin with LoadLibrary/GetProcAddress (Win32) or dlopen/dlsym (Linux)
2. The bot calls IRCBotPlugin() in which your plugin should return a filled in PLUGIN_PUBLIC structure.
3. IRCBot 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.
| IRCBot v • d • e
|
|---|
| IRCBot main pages |
| Main Page • Installation • Changelog • Commands • Plugins • FAQ • Configuration • Credits • Remote Client • Built-In Variables • Multi Sound Server Mode • Username Character Restrictions |
| Auto DJ Pages |
| Auto DJ Main Page • WebRequest System • Scheduler • MP3 Encoder • Voice Support • MySQL Plugin |
| IRCBot Programming v • d • e
|
| IRCBot Programming |
| Plugin API • Remote Commands • Plugin Initialization • IRCBot DB • Changing Command Permissions • ShoutIRC Music Database |