Class: Irc::JoinMessage

Inherits:
BasicUserMessage show all
Defined in:
lib/rbot/message.rb

Overview

class to manage channel joins

Direct Known Subclasses

PartMessage

Instance Attribute Summary collapse

Attributes inherited from BasicUserMessage

#bot, #ignored, #in_thread, #logmessage, #message, #plainmessage, #replied, #server, #source, #target, #time

Instance Method Summary collapse

Methods inherited from BasicUserMessage

#address?, #botuser, #identified?, #parse_channel_list, #recurse_depth, #recurse_depth=, #sourceaddress, #sourcenick, strip_formatting, strip_initial_formatting, stripcolour

Constructor Details

#initialize(bot, server, source, channel, message = "") ⇒ JoinMessage

Returns a new instance of JoinMessage.



611
612
613
614
615
616
# File 'lib/rbot/message.rb', line 611

def initialize(bot, server, source, channel, message="")
  super(bot, server, source, channel, message)
  @channel = channel
  # in this case sourcenick is the nick that could be the bot
  @address = (source == @bot.myself)
end

Instance Attribute Details

#channelObject (readonly)

channel joined



604
605
606
# File 'lib/rbot/message.rb', line 604

def channel
  @channel
end

Instance Method Details

#inspectObject



606
607
608
609
# File 'lib/rbot/message.rb', line 606

def inspect
  fields = ' channel=' << channel.to_s
  super(fields)
end