Class Irc::Channel::Topic
In: lib/rbot/irc.rb
Parent: Object
BasicUserMessage JoinMessage NamesMessage WhoisMessage ModeChangeMessage KickMessage MotdMessage QuitMessage BanlistMessage UserMessage NoSuchTargetMessage TopicMessage NickMessage WelcomeMessage UnknownMessage InviteMessage PartMessage NetmaskList UserList ArrayOf ChannelList Netmask User\n[lib/rbot/botuser.rb\nlib/rbot/irc.rb] Channel Singleton RfcCasemap StrictRfcCasemap AsciiCasemap Casemap PrivMessage NoticeMessage TokyoCabinet::BDB CIBDB Btree CIBtree Socket MessageQueue QueueRing Client DBHash\n[lib/rbot/registry/bdb.rb\nlib/rbot/registry/tc.rb] DBTree\n[lib/rbot/registry/bdb.rb\nlib/rbot/registry/tc.rb] Server NetmaskDb Bot\n[lib/rbot/botuser.rb\nlib/rbot/config.rb\nlib/rbot/ircbot.rb\nlib/rbot/language.rb\nlib/rbot/message.rb\nlib/rbot/messagemapper.rb\nlib/rbot/plugins.rb\nlib/rbot/rbotconfig.rb\nlib/rbot/registry/bdb.rb\nlib/rbot/registry/tc.rb] lib/rbot/ircsocket.rb lib/rbot/rfc2812.rb lib/rbot/registry/tc.rb lib/rbot/irc.rb lib/rbot/maskdb.rb lib/rbot/message.rb lib/rbot/messagemapper.rb lib/rbot/botuser.rb lib/rbot/registry/tc.rb (null) BotConfig PKGConfig ServerOrCasemap Irc dot/m_35_0.png

A Topic represents the topic of a channel. It consists of the topic itself, who set it and when

Methods

External Aliases

text -> to_s

Attributes

set_by  [RW] 
set_on  [RW] 
text  [RW] 

Public Class methods

Create a new Topic setting the text, the creator and the creation time

[Source]

      # File lib/rbot/irc.rb, line 1286
1286:       def initialize(text="", set_by="", set_on=Time.new)
1287:         @text = text
1288:         @set_by = set_by.to_irc_netmask
1289:         @set_on = set_on
1290:       end

Public Instance methods

Replace a Topic with another one

[Source]

      # File lib/rbot/irc.rb, line 1294
1294:       def replace(topic)
1295:         raise TypeError, "#{topic.inspect} is not of class #{self.class}" unless topic.kind_of?(self.class)
1296:         @text = topic.text.dup
1297:         @set_by = topic.set_by.dup
1298:         @set_on = topic.set_on.dup
1299:       end

Returns self

[Source]

      # File lib/rbot/irc.rb, line 1303
1303:       def to_irc_channel_topic
1304:         self
1305:       end

[Validate]