summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-07-31 21:10:43 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-07-31 21:10:43 +0000
commitfae4baa30e641de3bc345a8eed21489a2f5ef278 (patch)
tree82aa20cc2826809410b2808a7e9018130dd1ce08 /lib/rbot
parent3c1535820d6faf09577221068d27be788483f8e8 (diff)
Store the real_name information from WHO replies
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/irc.rb2
-rw-r--r--lib/rbot/rfc2812.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/rbot/irc.rb b/lib/rbot/irc.rb
index efc71c39..59abceec 100644
--- a/lib/rbot/irc.rb
+++ b/lib/rbot/irc.rb
@@ -885,7 +885,7 @@ module Irc
class User < Netmask
alias :to_s :nick
- attr :real_name
+ attr_accessor :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.
diff --git a/lib/rbot/rfc2812.rb b/lib/rbot/rfc2812.rb
index 98f086e3..2d4d323b 100644
--- a/lib/rbot/rfc2812.rb
+++ b/lib/rbot/rfc2812.rb
@@ -1130,7 +1130,7 @@ module Irc
else
warning "Strange WHO reply: #{serverstring.inspect}"
end
- data[:hopcount], data[:real] = argv[7].split(" ", 2)
+ data[:hopcount], data[:real_name] = argv[7].split(" ", 2)
user = @server.get_user(data[:nick])
@@ -1140,7 +1140,7 @@ module Irc
# TODO ircop status
# TODO userserver
# TODO hopcount
- # TODO real
+ user.real_name = data[:real_name]
channel = @server.get_channel(data[:channel])