Libera-Chat / sable

GNU Affero General Public License v3.0
84 stars 8 forks source link

Simplify mode flags #116

Closed progval closed 5 months ago

progval commented 5 months ago
  1. Rename *Flag::to_char and MembershipFlagFlag::to_prefix to MembershipFlagFlag::mode_char and MembershipFlagFlag::prefix_char, because the prefix is also a char
  2. Remove *Set::char_for and MembershipFlagSet::prefix_for, they are less efficient duplicates of the above
  3. Move *Set::flag_for and MembershipFlagSet::flag_for_prefix to *Flag::from_mode_char and MembershipFlagFlag::from_prefix_char because they don't belong on a set and "flag_for" is an unclear name
  4. Remove chars from ALL and all() because they are not needed anymore
  5. Removed parser support for specifying extra chars that would be ignored
progval commented 5 months ago

(I'm aware of mode_letter and from_char, I'll send another PR after this one to fix the inconsistency)

actually I just added it to this PR