Software /
code /
prosody
Diff
plugins/mod_storage_sql.lua @ 3731:b3a5f9b1d1df
mod_storage_sql: Default value for option sql = { driver = "SQLite3", database = "prosody.sqlite" }.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 12 Dec 2010 05:38:48 +0500 |
parent | 3730:5aa586d1366e |
child | 3732:bf449ecf2144 |
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua Sun Dec 12 05:38:08 2010 +0500 +++ b/plugins/mod_storage_sql.lua Sun Dec 12 05:38:48 2010 +0500 @@ -33,7 +33,7 @@ do -- process options to get a db connection local DBI = require "DBI"; - local params = module:get_option("sql"); + local params = module:get_option("sql") or { driver = "SQLite3", database = "prosody.sqlite" }; assert(params and params.driver and params.database, "invalid params"); prosody.unlock_globals();