summaryrefslogtreecommitdiff
path: root/lib/rbot/rfc2812.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-09-15 11:44:07 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-09-15 11:44:07 +0200
commitc96f6443b0cb282bebadbd3bc3bfb2f5139a6add (patch)
treed307dbcf7fbf686ea03713c93721cbca68e5f662 /lib/rbot/rfc2812.rb
parent16c921257d38522fd2930b1ee8d52675f0d4f1e0 (diff)
Better handling of akills and other form of disconnections
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