Class: Flexo::Events::ModeEvent

Inherits:
Flexo::Event show all
Defined in:
lib/flexo/events/mode.rb

Instance Attribute Summary collapse

Attributes inherited from Flexo::Event

#data, #nickname

Instance Method Summary collapse

Methods inherited from Flexo::Event

#me?

Constructor Details

#initialize(*args) ⇒ ModeEvent

Returns a new instance of ModeEvent.



6
7
8
9
10
# File 'lib/flexo/events/mode.rb', line 6

def initialize(*args)
  super
  @channelmode = Flexo::Constants::CHANPREFIX.include?(@data.params[0][0])
  @modes       = @data.params[1..-1].join(' ')
end

Instance Attribute Details

#modesObject (readonly)

Returns the value of attribute modes.



4
5
6
# File 'lib/flexo/events/mode.rb', line 4

def modes
  @modes
end

Instance Method Details

#channelmode?Boolean Also known as: chanmode?

Returns:

  • (Boolean)


16
17
18
# File 'lib/flexo/events/mode.rb', line 16

def channelmode?
  @channelmode
end

#usermode?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/flexo/events/mode.rb', line 12

def usermode?
  !@channelmode
end