Skip to content
Snippets Groups Projects
Commit 1ac83960 authored by cyan's avatar cyan
Browse files

Store user's server as part of their master 'user' object.

parent ac245d2a
No related branches found
No related tags found
No related merge requests found
......@@ -308,6 +308,7 @@ function Bot_IRC_Channel(name) {
function Server_User(uh,nick) {
this.uh = uh;
this.nick = nick;
this.servername = undefined;
this.ident = false;
this.last_spoke = false;
this.channels=[];
......
......@@ -25,9 +25,12 @@ function Server_command(srv,cmdline,onick,ouh) {
break;
case "352": // WHO reply. Process into local cache.
var nick = cmd[6].toUpperCase();
if(!srv.users[nick]) srv.users[nick] = new Server_User(cmd[3] + "@" + cmd[4],cmd[6]);
else srv.users[nick].uh=cmd[3] + "@" + cmd[4];
if(!srv.users[nick])
srv.users[nick] = new Server_User(cmd[3] + "@" + cmd[4],cmd[6]);
else
srv.users[nick].uh=cmd[3] + "@" + cmd[4];
srv.users[nick].channels[cmd[2].toUpperCase()]=true;
srv.users[nick].servername = cmd[5];
break;
case "433": // Nick already in use.
srv.juped = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment