Class: Irc::TopicMessage
- Inherits:
-
BasicUserMessage
- Object
- BasicUserMessage
- Irc::TopicMessage
- Defined in:
- /home/apoc/projects/ruby/rbot/lib/rbot/message.rb
Instance Attribute Summary (collapse)
-
- (Object) channel
readonly
topic set on channel.
-
- (Object) info_or_set
:info if topic info, :set if topic set.
-
- (Object) timestamp
readonly
topic set at (unixtime).
-
- (Object) topic
readonly
channel topic.
Attributes inherited from BasicUserMessage
#bot, #ignored, #in_thread, #logmessage, #message, #plainmessage, #replied, #server, #source, #target, #time
Instance Method Summary (collapse)
-
- (TopicMessage) initialize(bot, server, source, channel, topic = ChannelTopic.new)
constructor
A new instance of TopicMessage.
- - (Object) inspect
Methods inherited from BasicUserMessage
#address?, #botuser, #identified?, #parse_channel_list, #prefixed?, #recurse_depth, #recurse_depth=, #sourceaddress, #sourcenick, strip_formatting, strip_initial_formatting, stripcolour
Constructor Details
- (TopicMessage) initialize(bot, server, source, channel, topic = ChannelTopic.new)
Returns a new instance of TopicMessage
678 679 680 681 682 683 684 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/message.rb', line 678 def initialize(bot, server, source, channel, topic=ChannelTopic.new) super(bot, server, source, channel, topic.text) @topic = topic @timestamp = topic.set_on @channel = channel @info_or_set = nil end |
Instance Attribute Details
- (Object) channel (readonly)
topic set on channel
674 675 676 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/message.rb', line 674 def channel @channel end |
- (Object) info_or_set
:info if topic info, :set if topic set
677 678 679 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/message.rb', line 677 def info_or_set @info_or_set end |
- (Object) timestamp (readonly)
topic set at (unixtime)
672 673 674 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/message.rb', line 672 def @timestamp end |
- (Object) topic (readonly)
channel topic
670 671 672 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/message.rb', line 670 def topic @topic end |
Instance Method Details
- (Object) inspect
686 687 688 689 690 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/message.rb', line 686 def inspect fields = ' topic=' << topic fields << ' (set on ' << << ')' super(fields) end |