summaryrefslogtreecommitdiff
path: root/lib/rbot/irc.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-08-09 23:26:03 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-08-09 23:26:03 +0200
commit2f2644f03203b36fd6aa105e62f4cd15070e1cbe (patch)
tree55d6328390f08cf4a4a03ee4b91809f916df0c9f /lib/rbot/irc.rb
parent58b43c90ef7435713213015848eaf0486fab0b8f (diff)
+ support channel URL and creation time
Diffstat (limited to 'lib/rbot/irc.rb')
-rw-r--r--lib/rbot/irc.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/rbot/irc.rb b/lib/rbot/irc.rb
index 1e1c56b0..23bd9e0d 100644
--- a/lib/rbot/irc.rb
+++ b/lib/rbot/irc.rb
@@ -1299,12 +1299,15 @@ module Irc
include ServerOrCasemap
attr_reader :name, :topic, :mode, :users
alias :to_s :name
+ attr_accessor :creation_time, :url
def inspect
str = self.__to_s__[0..-2]
str << " on server #{server}" if server
str << " @name=#{@name.inspect} @topic=#{@topic.text.inspect}"
str << " @users=[#{user_nicks.sort.join(', ')}]"
+ str << " (created on #{creation_time})" if creation_time
+ str << " (URL #{url})" if url
str << ">"
end
@@ -1368,6 +1371,12 @@ module Irc
# Flags
@mode = ModeHash.new
+
+ # creation time, only on some networks
+ @creation_time = nil
+
+ # URL, only on some networks
+ @url = nil
end
# Removes a user from the channel