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.



602
603
604
605
606
607
# File 'lib/net/irc.rb', line 602

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.



600
601
602
# File 'lib/net/irc.rb', line 600

def ctcp
  @ctcp
end

#targetObject

Returns the value of attribute target.



600
601
602
# File 'lib/net/irc.rb', line 600

def target
  @target
end

#textObject

Returns the value of attribute text.



600
601
602
# File 'lib/net/irc.rb', line 600

def text
  @text
end