From: Ramiro Bou Date: Thu, 2 Oct 2014 18:44:42 +0000 (-0300) Subject: Fixing the CTCP PING X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=766f53d379b5459da2a0317f8a861a28eb8a9176;p=KiwiIRC.git Fixing the CTCP PING --- diff --git a/client/src/models/network.js b/client/src/models/network.js index 3e297cc..e1faf44 100644 --- a/client/src/models/network.js +++ b/client/src/models/network.js @@ -534,8 +534,8 @@ // Reply to a TIME ctcp if (event.msg.toUpperCase() === 'TIME') { this.gateway.ctcpResponse(event.type, event.nick, (new Date()).toString()); - }else if(event.msg.toUpperCase().substr(1, 4) === 'PING') { // CTCP PING reply - this.gateway.ctcpResponse(event.type, event.nick, event.msgstr.slice(6, -1)); + } else if(event.type.toUpperCase() === 'PING') { // CTCP PING reply + this.gateway.ctcpResponse(event.type, event.nick, event.msg.substr(5)); } }