mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-04 14:38:50 +00:00
fix(config): update mysql_debug when using oxmysql_debug command
Polling change isn't very compatible with this; will change in the future, but for now keep it simple.
This commit is contained in:
1 parent
bc8a874743
commit
4bff0109ca
1 file changed
+2
@@ -103,6 +103,7 @@ RegisterCommand(
|
|||||||
case 'add':
|
case 'add':
|
||||||
if (!Array.isArray(mysql_debug)) mysql_debug = [];
|
if (!Array.isArray(mysql_debug)) mysql_debug = [];
|
||||||
mysql_debug.push(args[1]);
|
mysql_debug.push(args[1]);
|
||||||
|
SetConvar('mysql_debug', JSON.stringify(mysql_debug))
|
||||||
return console.log(`^3Added ${args[1]} to mysql_debug^0`);
|
return console.log(`^3Added ${args[1]} to mysql_debug^0`);
|
||||||
|
|
||||||
case 'remove':
|
case 'remove':
|
||||||
@@ -111,6 +112,7 @@ RegisterCommand(
|
|||||||
if (index === -1) return;
|
if (index === -1) return;
|
||||||
mysql_debug.splice(index, 1);
|
mysql_debug.splice(index, 1);
|
||||||
if (mysql_debug.length === 0) mysql_debug = false;
|
if (mysql_debug.length === 0) mysql_debug = false;
|
||||||
|
SetConvar('mysql_debug', JSON.stringify(mysql_debug) || 'false')
|
||||||
return console.log(`^3Removed ${args[1]} from mysql_debug^0`);
|
return console.log(`^3Removed ${args[1]} from mysql_debug^0`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user