Class: Irc::NickMessage

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

Overview

class to pass IRC Nick changes in. @message contains the old nickame,

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, oldnick, newnick) ⇒ NickMessage

Returns a new instance of NickMessage.



564
565
566
567
568
# File 'lib/rbot/message.rb', line 564

def initialize(bot, server, source, oldnick, newnick)
  super(bot, server, source, oldnick, newnick)
  @address = (source == @bot.myself)
  @is_on = []
end

Instance Attribute Details

#is_onObject

Returns the value of attribute is_on.



563
564
565
# File 'lib/rbot/message.rb', line 563

def is_on
  @is_on
end

Instance Method Details

#inspectObject



578
579
580
581
582
# File 'lib/rbot/message.rb', line 578

def inspect
  fields = ' old=' << oldnick
  fields << ' new=' << newnick
  super(fields)
end

#newnickObject



574
575
576
# File 'lib/rbot/message.rb', line 574

def newnick
  return @message
end

#oldnickObject



570
571
572
# File 'lib/rbot/message.rb', line 570

def oldnick
  return @target
end