Skip to content

Commit

Permalink
fix /msg handling
Browse files Browse the repository at this point in the history
  • Loading branch information
codekitchen committed Jun 21, 2011
1 parent cac1e05 commit 8591049
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/tkellem/irc_message.rb
Expand Up @@ -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

Expand Down

0 comments on commit 8591049

Please sign in to comment.