Skip to content

Commit

Permalink
fix(config): update mysql_debug when using oxmysql_debug command
Browse files Browse the repository at this point in the history
Polling change isn't very compatible with this; will change in the future, but
for now keep it simple.
  • Loading branch information
thelindat committed Nov 8, 2022
1 parent bc8a874 commit 4bff010
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand All @@ -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`);
}

Expand Down

0 comments on commit 4bff010

Please sign in to comment.