From 397b61df257f72a8ce90792985f76497ba735da4 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 20 Feb 2007 23:02:35 +0000 Subject: Use ASCII KCODE to prevent problems like missing characters or matching failures when clients send messages in something else than UTF-8 --- lib/rbot/rfc2812.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rbot') diff --git a/lib/rbot/rfc2812.rb b/lib/rbot/rfc2812.rb index 5dec464c..97181b03 100644 --- a/lib/rbot/rfc2812.rb +++ b/lib/rbot/rfc2812.rb @@ -888,8 +888,8 @@ module Irc data = Hash.new data[:serverstring] = serverstring - unless serverstring =~ /^(:(\S+)\s)?(\S+)(\s(.*))?/ - raise "Unparseable Server Message!!!: #{serverstring}" + unless serverstring.chomp =~ /^(:(\S+)\s)?(\S+)(\s(.*))?$/ + raise "Unparseable Server Message!!!: #{serverstring.inspect}" end prefix, command, params = $2, $3, $5 -- cgit v1.2.3