summaryrefslogtreecommitdiff
path: root/lib/rbot/irc.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-07-31 21:06:39 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-07-31 21:06:39 +0000
commit3c1535820d6faf09577221068d27be788483f8e8 (patch)
treeee0389e57d6a07b87074b2d781424cd6936c25a0 /lib/rbot/irc.rb
parent73961d65682d53bb7f53897094a878d531516048 (diff)
New IRC Framework: store a User's real_name
Diffstat (limited to 'lib/rbot/irc.rb')
-rw-r--r--lib/rbot/irc.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rbot/irc.rb b/lib/rbot/irc.rb
index 0edfb35a..efc71c39 100644
--- a/lib/rbot/irc.rb
+++ b/lib/rbot/irc.rb
@@ -885,6 +885,8 @@ module Irc
class User < Netmask
alias :to_s :nick
+ attr :real_name
+
# Create a new IRC User from a given Netmask (or anything that can be converted
# into a Netmask) provided that the given Netmask does not have globs.
#
@@ -894,6 +896,7 @@ module Irc
raise ArgumentError, "#{str.inspect} must not have globs (unescaped * or ?)" if user.has_irc_glob? && user != "*"
raise ArgumentError, "#{str.inspect} must not have globs (unescaped * or ?)" if host.has_irc_glob? && host != "*"
@away = false
+ @real_name = String.new
end
# The nick of a User may be changed freely, but it must not contain glob patterns.