Method: IIRC::ISupport::Inquiry#prefix_modes

Defined in:
lib/iirc/modules/isupport.rb

#prefix_modesHash<String,String>

Modes which grant privileges to a user in a channel and their respective prefix characters seen in NAMES, WHO and WHOIS replies.

Examples:

qaohv

isupport.prefix_modes # => {'q'=>'~', 'a'=>'&', 'o'=>'@', 'h'=>'%', 'v'=>'+'}

Returns:

  • (Hash<String,String>)

    channel mode => prefix character

See Also:



81
82
83
84
85
86
87
88
# File 'lib/iirc/modules/isupport.rb', line 81

def prefix_modes
  if self['PREFIX'].is_a? String
    modes, symbols = self['PREFIX'][1..].split(')').map!(&:chars)
    Hash[modes.zip(symbols)].freeze
  else
    {}.freeze
  end
end