def parse_modes(modes)
      mode_changes = []
      modes.scan(/[-+]\w+/).each do |modegroup|
        set, modegroup = modegroup.split '', 2
        set = set == '+' ? true : false
        modegroup.split('').each do |mode|
          mode_changes << { set: set, mode: mode }
        end
      end
      return mode_changes
    end
def parse_modes(modes)
      mode_changes = []
      modes.scan(/[-+]\w+/).each do |modegroup|
        set, modegroup = modegroup.split '', 2
        set = set == '+' ? true : false
        modegroup.split('').each do |mode|
          mode_changes << { set: set, mode: mode }
        end
      end
      return mode_changes
    end
Parse mode changes.
 @param [Array] modes The modes you want to parse. A string of mode
   changes (e.g. `'-i+k+l'`) followed by any arguments (e.g. `'secret', 25`).
 @return [Array] Each element will be a hash with two keys: `:set`,
   a boolean indicating whether the mode is being set (instead of unset);
   and `:mode`, the mode character.