Plugin Initialization

From IRCBotWiki
Jump to: navigation, search

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 vde

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

IRCBot Programming
Plugin APIRemote CommandsPlugin InitializationIRCBot DBChanging Command PermissionsShoutIRC Music Database
Personal tools