Permalink
Browse files

Add a warning to the log when a multi-line action is found.

  • Loading branch information...
1 parent c6fd159 commit ed0eb790c9802966c4af36c1e4fec6cc28c67b40 @qsheets committed Sep 7, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/irc.js
View
@@ -826,6 +826,9 @@ Client.prototype.action = function(target, text) { // {{{
// only the first would appear as an actual action. So that is
// all we are sending.
if (line[0]) {
+ if (line[1]) {
+ util.log("\033[01;31mWARNING: Action over multiple lines, only first line used.\033[0m");
+ }
var r = new RegExp(".{1," + messageSplit + "}");
line = r.exec(line[0])[0];
self.msg(target, '\1ACTION ' + line + '\1');
@@ -867,7 +870,7 @@ Client.prototype._clearWhoisData = function(nick) { // {{{
Client.prototype._setUserhost = function(info) { // {{{
this.userhost = info.nick+'!'+info.user+'@'+info.host;
} // }}}
-Client.prototype._handleCTCP = function(from, to, text, type) {
+Client.prototype._handleCTCP = function(from, to, text, type, message) {
text = text.slice(1)
text = text.slice(0, text.indexOf('\1'))
var parts = text.split(' ')

0 comments on commit ed0eb79

Please sign in to comment.