diff --git a/game/addons/sourcemod/scripting/include/sourcebanspp.inc b/game/addons/sourcemod/scripting/include/sourcebanspp.inc index afb44845..b1160b70 100644 --- a/game/addons/sourcemod/scripting/include/sourcebanspp.inc +++ b/game/addons/sourcemod/scripting/include/sourcebanspp.inc @@ -31,7 +31,7 @@ #define SB_VERSION_MAJOR "1" #define SB_VERSION_MINOR "8" -#define SB_VERSION_PATCH "4" +#define SB_VERSION_PATCH "5" #define SB_VERSION SB_VERSION_MAJOR..."."...SB_VERSION_MINOR..."."...SB_VERSION_PATCH diff --git a/game/addons/sourcemod/scripting/sbpp_main.sp b/game/addons/sourcemod/scripting/sbpp_main.sp index 74286a8c..2b7d9726 100644 --- a/game/addons/sourcemod/scripting/sbpp_main.sp +++ b/game/addons/sourcemod/scripting/sbpp_main.sp @@ -2467,11 +2467,19 @@ public void InitializeBackupDB() SQLiteDB = SQLite_UseDatabase("sourcebans-queue", error, sizeof(error)); if (SQLiteDB == INVALID_HANDLE) + { SetFailState(error); + } - SQL_LockDatabase(SQLiteDB); - SQL_FastQuery(SQLiteDB, "CREATE TABLE IF NOT EXISTS queue (steam_id TEXT PRIMARY KEY ON CONFLICT REPLACE, time INTEGER, start_time INTEGER, reason TEXT, name TEXT, ip TEXT, admin_id TEXT, admin_ip TEXT);"); - SQL_UnlockDatabase(SQLiteDB); + SQLiteDB.Query(ErrorCheckCallback, + "CREATE TABLE IF NOT EXISTS queue ( \ + steam_id TEXT PRIMARY KEY ON CONFLICT REPLACE, \ + time INTEGER, \ + start_time INTEGER, \ + reason TEXT, \ + name TEXT, \ + ip TEXT, \ + admin_id TEXT, admin_ip TEXT);"); } public bool CreateBan(int client, int target, int time, const char[] reason)