summaryrefslogtreecommitdiff
path: root/lib/rbot/rfc2812.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbot/rfc2812.rb')
-rw-r--r--lib/rbot/rfc2812.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rbot/rfc2812.rb b/lib/rbot/rfc2812.rb
index 335da2ea..0839d1d5 100644
--- a/lib/rbot/rfc2812.rb
+++ b/lib/rbot/rfc2812.rb
@@ -6,6 +6,9 @@
# This module defines the Irc::Client class, a class that can handle and
# dispatch messages based on RFC 2821 (Internet Relay Chat: Client Protocol)
+class ServerMessageParseError < ServerError
+end
+
module Irc
# - The server sends Replies 001 to 004 to a user upon
# successful registration.
@@ -1033,7 +1036,7 @@ module Irc
data[:serverstring] = serverstring
unless serverstring.chomp =~ /^(:(\S+)\s)?(\S+)(\s(.*))?$/
- raise ServerError, "Unparseable Server Message!!!: #{serverstring.inspect}"
+ raise ServerMessageParseError, (serverstring.chomp rescue serverstring)
end
prefix, command, params = $2, $3, $5