From 054344343df2fdf073d8c5edde05c7751ae6408e Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Sat, 26 Apr 2014 13:52:11 +0200 Subject: [PATCH] More bugfixes --- lib/server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/server.js b/lib/server.js index d0bfcdd7..61cc2b09 100644 --- a/lib/server.js +++ b/lib/server.js @@ -338,7 +338,8 @@ function event(e, data) { break; case "message": - var chan = _.findWhere(channels, {name: data.to}); + var target = data.to; + var chan = _.findWhere(channels, {name: target.charAt(0) == "#" ? target : data.from}); if (typeof chan === "undefined") { chan = new Chan({ name: data.from,