From fce733acf28fc829669316cdc1325c556fb5269e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20P=C3=B3=C5=82grabia?= Date: Sun, 24 Sep 2017 16:40:35 +0200 Subject: [PATCH] Adding source to the channels --- src/main/resources/static/IrcClient.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/static/IrcClient.js b/src/main/resources/static/IrcClient.js index 9bc2f35..5ef7dcc 100644 --- a/src/main/resources/static/IrcClient.js +++ b/src/main/resources/static/IrcClient.js @@ -107,11 +107,12 @@ function IrcClient(sockJs, nick, userName, realName) { this.checkForDestElseCreate(destination); var server = $("#" + tabRef(destination)); var logRow = $("
"); + var source = currentToken(nextToken(msg, " "), " "); var privMsgCmd = "PRIVMSG"; var idx = msg.toUpperCase().indexOf(privMsgCmd); var msgDestData = msg.substr(idx+privMsgCmd.length+1); var msgData = nextToken(msgDestData, " "); - logRow.text(msgData); + logRow.text("<" + source + "> " + msgData); server.append(logRow); return server; };