From 8591049427eac454688b311c78050e00d7e2b214 Mon Sep 17 00:00:00 2001 From: Brian Palmer Date: Mon, 20 Jun 2011 22:49:14 -0600 Subject: [PATCH] fix /msg handling --- lib/tkellem/irc_message.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tkellem/irc_message.rb b/lib/tkellem/irc_message.rb index a135d14..ae84151 100644 --- a/lib/tkellem/irc_message.rb +++ b/lib/tkellem/irc_message.rb @@ -34,9 +34,11 @@ def self.parse(line) # /msg #someroom hey guys def self.parse_client_command(line) return nil unless line[0] == '/'[0] + if line =~ %r{^/msg\s+(\S+)\s+(.*)$} + line = "/PRIVMSG #{$1} :#{$2}" + end msg = parse(line[1..-1]) return nil unless msg - msg.command = 'PRIVMSG' if msg.command == 'MSG' msg end