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, #prefixed?, #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.



688
689
690
691
692
693
# File 'lib/rbot/message.rb', line 688

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



681
682
683
# File 'lib/rbot/message.rb', line 681

def channel
  @channel
end

Instance Method Details

#inspectObject



683
684
685
686
# File 'lib/rbot/message.rb', line 683

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