From 766f53d379b5459da2a0317f8a861a28eb8a9176 Mon Sep 17 00:00:00 2001 From: Ramiro Bou Date: Thu, 2 Oct 2014 15:44:42 -0300 Subject: [PATCH] Fixing the CTCP PING --- client/src/models/network.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); } } -- 2.25.1