Class: Net::IRC::Privmsg

Inherits:
Message show all
Defined in:
lib/net/irc.rb

Overview

PRIVMSG <target> <text>

Constant Summary

Constants inherited from Message

Message::COMMAND_MAPS

Instance Attribute Summary collapse

Attributes inherited from Message

#command, #parameters, #prefix

Instance Method Summary collapse

Methods inherited from Message

command_for_number, parse, #prefix?, #to_s, #write

Constructor Details

#initialize(target, text) ⇒ Privmsg

Returns a new instance of Privmsg.



630
631
632
633
634
635
# File 'lib/net/irc.rb', line 630

def initialize(target, text)
  @target = target
  @text, @ctcp = CTCP.parse(text)
  
  super(nil, 'PRIVMSG', @target, text)
end

Instance Attribute Details

#ctcpObject

Returns the value of attribute ctcp.



628
629
630
# File 'lib/net/irc.rb', line 628

def ctcp
  @ctcp
end

#targetObject

Returns the value of attribute target.



628
629
630
# File 'lib/net/irc.rb', line 628

def target
  @target
end

#textObject

Returns the value of attribute text.



628
629
630
# File 'lib/net/irc.rb', line 628

def text
  @text
end