Adding CTCP PING response
authorRamiro Bou <bouramiro@gmail.com>
Thu, 2 Oct 2014 18:17:26 +0000 (15:17 -0300)
committerRamiro Bou <bouramiro@gmail.com>
Thu, 2 Oct 2014 18:17:26 +0000 (15:17 -0300)
client/src/models/network.js

index 6bd27ce542bbd442cac3938a79db912837161fb2..3e297cca0538ba45f1cd9a6234f99cde7b93f8b7 100644 (file)
         // 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));
         }
     }