summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-07-16 00:38:04 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-07-16 00:38:04 +0200
commit95b38d010521c5d6b781af4ecd60586a33f8e53f (patch)
tree8c3bb891de14111137b1fd85dbb69842a86a060a
parent8f8205310518e7b0626d657ba9667f7bfc745371 (diff)
Revert "* use to_irc_netmask(:force => true) to unlink Netmasks from their Server to prevent errors when dumping users"
This reverts commit 9a1cf6a11b12c06cd925dd6a789ec98fe750c8ad, since it was a hack to work around the undumpable Channel (and consequently Server and Netmask) caused by 847a977b228b35f5ab281a31dd3724a4db887dff "#any? and #all? methods for Channel#mode to check if modes are set" and fixed by 8f8205310518e7b0626d657ba9667f7bfc745371 "Dumpable definition of #any? and #all? methods for Channel#mode"
-rw-r--r--lib/rbot/botuser.rb2
-rw-r--r--lib/rbot/irc.rb3
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/rbot/botuser.rb b/lib/rbot/botuser.rb
index 8fa04fc5..a4bec708 100644
--- a/lib/rbot/botuser.rb
+++ b/lib/rbot/botuser.rb
@@ -461,7 +461,7 @@ class Bot
# Adds a Netmask
#
def add_netmask(mask)
- m = mask.to_irc_netmask(:server => nil,:force => true)
+ m = mask.to_irc_netmask
@netmasks << m
if self.autologin?
Auth.manager.maskdb.add(self, m)
diff --git a/lib/rbot/irc.rb b/lib/rbot/irc.rb
index 4ad57d99..58e9f90a 100644
--- a/lib/rbot/irc.rb
+++ b/lib/rbot/irc.rb
@@ -214,7 +214,6 @@ module Irc
h = {}
h[:server] = @server if defined?(@server) and @server
h[:casemap] = @casemap if defined?(@casemap) and @casemap
- h[:casemap] ||= @server.casemap if defined?(@server) and @server
return h
end
@@ -683,7 +682,7 @@ module Irc
# Subclasses of Netmask will return a new Netmask, using full_downcase
#
def to_irc_netmask(opts={})
- if self.class == Netmask and not opts[:force]
+ if self.class == Netmask
return self if fits_with_server_and_casemap?(opts)
end
return self.full_downcase.to_irc_netmask(server_and_casemap.merge(opts))