summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-04 01:50:33 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-04 01:50:33 +0000
commite1227011b1fd4dbba1aaa93b5f5b9032c92c1db0 (patch)
tree945925399d5236fc433c0e88db7b890980956c8f /lib/rbot
parentf38cb26826f5d2117849d1d07f75cff19b243f77 (diff)
New Auth Framework: BotUser can now store generic data
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/botuser.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/rbot/botuser.rb b/lib/rbot/botuser.rb
index 88da4da4..fe28947b 100644
--- a/lib/rbot/botuser.rb
+++ b/lib/rbot/botuser.rb
@@ -220,6 +220,7 @@ module Irc
attr_writer :login_by_mask
attr_writer :autologin
attr_writer :transient
+ attr_accessor :data
# Checks if the BotUser is transient
def transient?
@@ -272,6 +273,8 @@ module Irc
raise "must provide a usable mask for transient BotUser #{@username}" if @transient and @netmasks.empty?
@perm = {}
+
+ @data = {}
end
# Inspection
@@ -284,6 +287,11 @@ module Irc
str << " @perm=#{@perm.inspect}"
str << " @login_by_mask=#{@login_by_mask}"
str << " @autologin=#{@autologin}"
+ if @data.empty?
+ str << " no data"
+ else
+ str << " data for #{@data.keys.join(', ')}"
+ end
str << ">"
end