Browse Source

Fix database functions regarding ch_bans since it's a special case

pull/20/head
knotteye 10 months ago
parent
commit
a882285bac
  1. 3
      src/database.ts

3
src/database.ts

@ -30,7 +30,6 @@ async function addUser(name: string, password: string){
await query('INSERT INTO user_meta (username, title, about, live) VALUES ('+raw.escape(name)+',\'\',\'\',false)');
await query('INSERT INTO chat_integration (username, irc, xmpp, twitch, discord) VALUES ('+raw.escape(name)+',\'\',\'\',\'\',\'\')');
await query('INSERT INTO twitch_mirror (username) VALUES ('+raw.escape(name)+')');
await query('INSERT INTO ch_bans(channel) VALUES ('+raw.escape(name)+')');
return true;
}
@ -41,7 +40,7 @@ async function rmUser(name: string){
await query('delete from user_meta where username='+raw.escape(name)+' limit 1');
await query('delete from chat_integration where username='+raw.escape(name)+' limit 1');
await query('delete from twitch_mirror where username='+raw.escape(name)+' limit 1');
await query('delete from ch_bans where username='+raw.escape(name)+' limit 1');
await query('delete from ch_bans where channel='+raw.escape(name));
return true;
}

Loading…
Cancel
Save