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:
Linden committed 2022-11-08 18:06:52 +11:00
1 parent bc8a874743
commit 4bff0109ca
1 file changed
+2
+2
View File
@@ -103,6 +103,7 @@ RegisterCommand(
case 'add':
if (!Array.isArray(mysql_debug)) mysql_debug = [];
mysql_debug.push(args[1]);
SetConvar('mysql_debug', JSON.stringify(mysql_debug))
return console.log(`^3Added ${args[1]} to mysql_debug^0`);
case 'remove':
@@ -111,6 +112,7 @@ RegisterCommand(
if (index === -1) return;
mysql_debug.splice(index, 1);
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`);
}