summary refs log tree commit diff
path: root/config.c
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2026-02-06 17:04:09 +0300
committerNakidai <nakidai@disroot.org>2026-02-06 17:04:09 +0300
commit9ae659fd6c792407f3d80ea4d313bf850c2332ec (patch)
tree9bd14003e61c4d6a66216e50f4deddb266898118 /config.c
parentb7e7843214ba36ca06289d1925c05e6586acac41 (diff)
downloadlibreircd-9ae659fd6c792407f3d80ea4d313bf850c2332ec.tar.gz
libreircd-9ae659fd6c792407f3d80ea4d313bf850c2332ec.zip
Change way to deal with modes in channels
I thought it'd be fine to store modes as an array. But using this is
awful experience. Take a look at simple NAMES command: it just needs
to check whether some user is oper or voice or not, and with that
approach it will need to iterate over an array of users, and for each
user iterate over an array of modes. Or it is possible to optimize it,
saving all interesting modes to a local buffer and then iterating over
it. But those are attempts to fix broken design

So, instead of array of modes there'll be lots of fields regarding each
mode or kind of mode

From now on (struct Channel).peers is not a simple array of peers, but
the one with metainformation. This is done by making an array of
structures, so there are renames throughout the code

Also, I didn't like that it was users and not peers and this is a nice
opportunity to rename it: in first place this was done to avoid thing
that compiler somehow could silently ignore type change, but this is
also a stylistic change reflecting my view on naming
Diffstat (limited to 'config.c')
0 files changed, 0 insertions, 0 deletions