IRCBot DB

From IRCBotWiki

Jump to: navigation, search

IRCBot now uses a SQLite databsse (ircbot.db) for storage of certain items and provides an interface for plugins to use it as well.

The API exposed by IRCBot to plugins is contained in API_db.

The Query function is a wrapper for sqlite3_exec, as GetTable is for sqlite3_get_table, and you should expect them to work the same. The only differences between the real functions and the wrapper provided are:

  • The wrappers use a mutex to make them exclusive so they are thread-safe for you to use. The only issue you should worry about is making sure not to try to call a function from within a Query() callback (which I don't know if SQLite allows anyway, but probably isn't a good idea in the first place).
  • The wrappers will try each query up to 5 times as long as SQLITE_BUSY is returned, so you don't have to implement similar functionality.
  • After opening the database, IRCBot calls sqlite3_busy_timeout() with a value of 5000ms, you should not alter this or set another busy timeout function


IRCBot vde

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

IRCBot Programming
IPC MessagesRemote CommandsPlugin InitializationIRCBot DBShoutIRC Music Database
Tcl Functions
Tcl ScriptingTcl Events
Personal tools