summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-02-10 12:14:26 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-02-10 22:08:10 +0100
commit2ead8251de25ada98bcfa76571fecbb7c250338b (patch)
tree6d468336fb568092b0461c3ec22ed6de1c1d05c7 /lib
parentd74d181a491ff3e6eed1d5e8e9c1d00e7b124513 (diff)
botuser: add command to reset the netmasks list
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/botuser.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/rbot/botuser.rb b/lib/rbot/botuser.rb
index 13f05f87..b388b7f4 100644
--- a/lib/rbot/botuser.rb
+++ b/lib/rbot/botuser.rb
@@ -461,6 +461,15 @@ class Bot
Auth.manager.maskdb.remove(self, m) if self.autologin?
end
+ # Reset Netmasks, clearing @netmasks
+ #
+ def reset_netmasks
+ @netmasks.each { |m|
+ Auth.manager.maskdb.remove(self, m) if self.autologin?
+ }
+ @netmasks.clear
+ end
+
# This method checks if BotUser has a Netmask that matches _user_
#
def knows?(usr)