Class: IRCSupport::Message::ServerNotice

Inherits:
IRCSupport::Message show all
Defined in:
lib/ircsupport/message.rb

Instance Attribute Summary collapse

Attributes inherited from IRCSupport::Message

#args, #command, #prefix

Instance Method Summary collapse

Methods inherited from IRCSupport::Message

#type

Constructor Details

#initialize(args) ⇒ ServerNotice

Returns a new instance of ServerNotice.



536
537
538
539
540
541
542
543
544
545
# File 'lib/ircsupport/message.rb', line 536

def initialize(args)
  super(args)
  @sender = args[:prefix]
  if args[:args].size == 2
    @target = args[:args][0]
    @message = args[:args][1]
  else
    @message = args[:args][0]
  end
end

Instance Attribute Details

#messageString

Returns The text of the notice.

Returns:

  • (String)

    The text of the notice.



533
534
535
# File 'lib/ircsupport/message.rb', line 533

def message
  @message
end

#senderString

a service, or nothing at all.

Returns:

  • (String)

    The sender of the notice. Could be a server name,



526
527
528
# File 'lib/ircsupport/message.rb', line 526

def sender
  @sender
end

#targetString

‘AUTH’ or something else entirely.

Returns:

  • (String)

    The target of the server notice. Could be ‘*’ or



530
531
532
# File 'lib/ircsupport/message.rb', line 530

def target
  @target
end