lowercase fick ja

This commit is contained in:
Flummi 2017-11-13 13:40:22 +01:00
parent d2f79b2925
commit 285f0da9d5

View File

@ -40,33 +40,33 @@ class irc {
// WHOIS BEGIN // WHOIS BEGIN
case "307": // Rizon Account case "307": // Rizon Account
tmpuser = {}; tmpuser = {};
if(this.server.user.has( msg.params[1])) if(this.server.user.has( msg.params[1].toLowerCase() ))
tmpuser = this.server.user.get( msg.params[1] ); tmpuser = this.server.user.get( msg.params[1].toLowerCase() );
tmpuser.account = msg.params[1]; tmpuser.account = msg.params[1].toLowerCase();
tmpuser.registered = true; tmpuser.registered = true;
this.server.user.set( msg.params[1], tmpuser ); this.server.user.set( msg.params[1].toLowerCase(), tmpuser );
break; break;
case "311": // first case "311": // first
tmpuser = {}; tmpuser = {};
if(this.server.user.has( msg.params[1] )) if (this.server.user.has( msg.params[1].toLowerCase() ))
tmpuser = this.server.user.get( msg.params[1] ); tmpuser = this.server.user.get( msg.params[1].toLowerCase() );
tmpuser.nickname = msg.params[1]; tmpuser.nickname = msg.params[1].toLowerCase();
tmpuser.username = msg.params[2]; tmpuser.username = msg.params[2];
tmpuser.hostname = msg.params[3]; tmpuser.hostname = msg.params[3];
tmpuser.realname = msg.params[5]; tmpuser.realname = msg.params[5];
this.server.user.set( msg.params[1], tmpuser ); this.server.user.set( msg.params[1].toLowerCase(), tmpuser );
break; break;
case "313": // Oper case "313": // Oper
tmpuser = {}; tmpuser = {};
if(this.server.user.has( msg.params[1] )) if (this.server.user.has( msg.params[1].toLowerCase() ))
tmpuser = this.server.user.get( msg.params[1] ); tmpuser = this.server.user.get( msg.params[1].toLowerCase() );
tmpuser.oper = true; tmpuser.oper = true;
this.server.user.set( msg.params[1], tmpuser ); this.server.user.set( msg.params[1].toLowerCase(), tmpuser );
break; break;
case "318": // last (check Data) case "318": // last (check Data)
tmpuser = {}; tmpuser = {};
if(this.server.user.has( msg.params[1] )) if (this.server.user.has( msg.params[1].toLowerCase() ))
tmpuser = this.server.user.get( msg.params[1] ); tmpuser = this.server.user.get( msg.params[1].toLowerCase() );
tmpuser = { tmpuser = {
nickname: tmpuser.nickname || false, nickname: tmpuser.nickname || false,
username: tmpuser.username || false, username: tmpuser.username || false,
@ -82,8 +82,8 @@ class irc {
case "319": // Chanlist Todo case "319": // Chanlist Todo
let tmpchan = new Map(); let tmpchan = new Map();
tmpuser = {}; tmpuser = {};
if(this.server.user.has( msg.params[1] )) { if (this.server.user.has( msg.params[1].toLowerCase() )) {
tmpuser = this.server.user.get( msg.params[1] ); tmpuser = this.server.user.get( msg.params[1].toLowerCase() );
if(tmpuser.channels) if(tmpuser.channels)
tmpchan = tmpuser.channels; tmpchan = tmpuser.channels;
} }
@ -95,15 +95,15 @@ class irc {
} }
tmpuser.channels = tmpchan; tmpuser.channels = tmpchan;
this.server.user.set( msg.params[1], tmpuser ); this.server.user.set( msg.params[1].toLowerCase(), tmpuser );
break; break;
case "330": // Quarknet case "330": // Quarknet
tmpuser = {}; tmpuser = {};
if(this.server.user.has( msg.params[1] )) if (this.server.user.has( msg.params[1].toLowerCase() ))
tmpuser = this.server.user.get( msg.params[1] ); tmpuser = this.server.user.get( msg.params[1].toLowerCase() );
tmpuser.account = msg.params[2]; tmpuser.account = msg.params[2];
tmpuser.registered = true; tmpuser.registered = true;
this.server.user.set( msg.params[1], tmpuser ); this.server.user.set( msg.params[1].toLowerCase(), tmpuser );
break; break;
// WHOIS END // WHOIS END
case "001": // welcome case "001": // welcome