RadioBot 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 RadioBot 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, RadioBot calls sqlite3_busy_timeout() with a value of 5000ms, you should not alter this or set another busy timeout function
|RadioBot v • d • e
|RadioBot 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|
|RadioBot Programming v • d • e
|Plugin API • Remote Commands • Plugin Initialization • RadioBot DB • Changing Command Permissions • ShoutIRC Music Database|
|Lua Plugin • Lua Scripting • Lua Events|