summary refs log tree commit diff
path: root/ircd.h
AgeCommit message (Collapse)Author
3 daysAdd support for voice and +m channel modeNakidai
So now voices in code are not that useless. Also, code was fixed for their printing as it is valid for a user to be both an oper and voiced
4 daysAdd TOPIC and t channel flag supportNakidai
Yay, now there're topic!!
4 daysAdd SETHOSTNAME commandNakidai
Also remove hostname argument from the cli. It'd be better to have it in a config file rather than passing through an argument, it was like that since times config file didn't exist, but time has changed
4 daysAdd support for n channel flagNakidai
It's a flag that restricts a set of users able to write to a channel to those who joined. If not, reply 442 is sent upon PRIVMSG
7 daysAdd channel mode editing supportNakidai
Well, an oper should have some way to manage their channel :)
10 daysAdd basic support for channel operNakidai
At least it is now set to a first user :D
10 daysChange way to deal with modes in channelsNakidai
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
11 daysAdd OPER/SETOPERNakidai
SETOPER is a command for config, OPER is the one to authorize a user
11 daysAdd NAMESNakidai
So not it can show who's on the channel, yay. Though, no showing ops
13 daysAdd WHOIS and config parsingNakidai
Now users can query each other Plus, server info and creation date can be changed without recompiling using configuration file in IRC message format which is loaded on startup TODO: since readcfg uses IRC logic, handle() now should be able to deal with commands ending with simply \n
2026-02-01Refactor QUIT message sendingNakidai
After seeing same announcing code second time I decided it should be done before an actual quit in loop.c. Plus, channel exiting is now done in user_remove().
2026-02-01Add ping systemNakidai
Now users will be kicked for inactivity o.o
2026-02-01Remove magic numbers from ircd.hNakidai
Also make a new file config.h for storing that stuff
2026-01-30Move announcing code to writef.cNakidai Perumenei
Well, I guess that code is needed more then once, so it'll be good to move it to some function
2026-01-30Fix channel removeNakidai Perumenei
Channels are removed just like users, hence they have the same problem as users had before: when channel is removed, links to it must be updated. For users that was fixed[1], for users this commit provides the fix. [1] Commit where user quit was fixed - 63c0a8860459c0c9bf3b66d4d4ec631ece4bf56e
2026-01-10Add basic user mode handlingNakidai
So, now there're all modes listed in RFC 2812. The only what they do now, though, is a +r restricting user from changing their nick
2026-01-07Add comments for some macrosNakidai
2026-01-07Fix user quitNakidai
When user A leaves, last user in the peer list B is copied into the space left by leaving A. But, besides that it also important to not forget that there can be channels containing B: they store a link to every user belonging. So, it's important to adjust all links to B iterating every channel B belongs to.
2026-01-06Add basic channelsNakidai
Though they don't have modes, and JOIN/PART must be able to parse comma separated list of channels
2026-01-04Add codeNakidai