From bcc0b86ed9cc8313f5109b475b2f2775bbb39520 Mon Sep 17 00:00:00 2001 From: Evert Date: Sun, 25 Sep 2016 16:22:20 +0300 Subject: [PATCH] fixed? something? --- public/css/main.css | 4 ++-- public/js/main.js | 18 ++++++++++++------ public/main.styl | 4 ++-- server/irc.js | 14 +++++++++++++- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/public/css/main.css b/public/css/main.css index 5fb74ab..b6865c9 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -180,7 +180,7 @@ body { bottom: 46px; } .ircclient #chat .ircwrapper .chatarea .smsc-nicklistbtn { - background-image: url("image/users.svg"); + background-image: url("../image/users.svg"); background-repeat: no-repeat; background-size: contain; width: 46px; @@ -313,7 +313,7 @@ body { box-shadow: inset 4px 4px 8px #d8d8d8; } .ircclient #chat .ircwrapper .input .sendbutton { - background-image: url("image/send.svg"); + background-image: url("../image/send.svg"); background-repeat: no-repeat; background-size: contain; width: 32px; diff --git a/public/js/main.js b/public/js/main.js index 0096590..a67d778 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -156,6 +156,8 @@ irc.whoisMessage = function(whoisData, buffer) { break; case "loggedIn": case "registered": + case "connectingFrom": + case "usingModes": case "title": messages.push(whoisData[key]); break; @@ -602,9 +604,11 @@ class Buffer { appendMessage(meta) { let mesgConstr = composer.message[irc.chatType](meta.time, meta.sender, meta.message, meta.type); - if((meta.type == "privmsg" || meta.type == "notice" || meta.type == "action") && - meta.message.indexOf(irc.serverData[this.server].my_nick) != -1) - addClass(mesgConstr, "mentioned"); + if(irc.serverData[this.server]) { + if((meta.type == "privmsg" || meta.type == "notice" || meta.type == "action") && + meta.message.indexOf(irc.serverData[this.server].my_nick) != -1) + addClass(mesgConstr, "mentioned"); + } clientdom.letterbox.appendChild(mesgConstr); @@ -631,9 +635,11 @@ class Buffer { this.appendMessage(mesg); } else { this.unreadCount += 1; - if((type == "privmsg" || type == "notice" || type == "action") && - message.indexOf(irc.serverData[this.server].my_nick) != -1) - console.log("TODO: notify user of mentioned"); + if(irc.serverData[this.server]) { + if((type == "privmsg" || type == "notice" || type == "action") && + message.indexOf(irc.serverData[this.server].my_nick) != -1) + console.log("TODO: notify user of mentioned"); + } } this.tab.setUnreadCount(this.unreadCount); diff --git a/public/main.styl b/public/main.styl index f3de904..2f44216 100644 --- a/public/main.styl +++ b/public/main.styl @@ -161,7 +161,7 @@ body width: 100%; bottom: 46px; .smsc-nicklistbtn - background-image: url(image/users.svg); + background-image: url(../image/users.svg); background-repeat: no-repeat; background-size: contain; width: 46px; @@ -277,7 +277,7 @@ body border-left: 0 box-shadow: inset 4px 4px 8px #d8d8d8 .sendbutton - background-image: url(image/send.svg); + background-image: url(../image/send.svg); background-repeat: no-repeat; background-size: contain; width: 32px; diff --git a/server/irc.js b/server/irc.js index 91ab37e..d07dc6d 100644 --- a/server/irc.js +++ b/server/irc.js @@ -269,6 +269,18 @@ class IRCConnectionHandler { }; this.whoisManage(line.arguments[1], list); break; + case "378": + list = { + connectingFrom: line.trailing, + }; + this.whoisManage(line.arguments[1], list); + break; + case "379": + list = { + usingModes: line.trailing, + }; + this.whoisManage(line.arguments[1], list); + break; case "312": list = { server: line.arguments[2], @@ -431,7 +443,7 @@ class IRCConnection extends EventEmitter { this.socket.write('PASS {0}\r\n'.format(this.config.password)); let serverpass = webirc.get_password(this.config.address); - + if(serverpass) this.socket.write('WEBIRC {0} cgiirc {1} {2}\r\n'.format(serverpass, this.userInfo.hostname, this.userInfo.ipaddr));