Removed old IRC implementation

User accounts are now only for streamers, update CLI, API, and config to reflect that.
Fixed a bug with registration in api.ts
Made http port configurable
Added beginnings of socket.io chat server

Possibly more, I took a break in the middle of this commit.
This commit is contained in:
knotteye
2019-10-17 16:01:35 -05:00
parent fad832fe38
commit 1afe462c0b
11 changed files with 354 additions and 108 deletions

View File

@@ -13,7 +13,10 @@ async function register(name: string, password: string, confirm: string) {
if (name === config.restrictedNames[i]) return {"error":"restricted name"};
}
let r: boolean = await db.addUser(name, password);
if(r) return {"success":""};
if(r) {
let k = await db.query('select stream_key from users where username='+db.raw.escape(name));
return k;
}
return {"error":""};
}