summary refs log tree commit diff
AgeCommit message (Collapse)Author
13 daysAllow lf as well as crlfNakidai
For configuration it's important to allow IRC messages to end with \n. This also fixes a TODO from a previous commit and allows to connect to ircd using netcat
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-01FixesNakidai
- Now code depends on config.h in Makefile - By default the smallest timeout is chosen for poll() - Somewhy there was sizeof(PEER_QUIT_MAX)...
2026-02-01Added copyright notice to the config.hNakidai
Well, example config values don't need licesing that much, but as every other file has that notice I think this one should have it as well
2026-02-01Enhance registration messagesNakidai
Now ircd responds with all replies up to 4 Plus memchr was wrong, yep
2026-02-01Update READMENakidai
It wasn't very accurate for this time
2026-02-01Add validationNakidai
Now there can't be single \r or \n in the message, erroneous nicks and channel names are rejected, and usernames are stripped on '@'
2026-02-01Fix all the warningsNakidai
The one in user.c is the funniest one
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 exiting from a channel in user_removeNakidai
I think it should guarantee that nothing will break, including chanels
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-30Add PING command v0.1.0Nakidai
Then I should make some logic for pinging others...
2026-01-30Add support for NOTICENakidai
Well, it's the same as PRIVMSG but different name
2026-01-30Invert the logic in nick()Nakidai
Well... yes
2026-01-30Simplify join commandNakidai Perumenei
- Instead of checking users in the channel check user's channels - Ensure thing looks really dumb here, so remove it
2026-01-30Add nickname change announcementNakidai Perumenei
2026-01-30Add self announcingNakidai Perumenei
If user hasn't joined any channels, announcement still should be delivered to them
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-30Add nickname checkingNakidai Perumenei
Yay, adding some validation to the data ^^
2026-01-30Speed up user removingNakidai
Now it's O(n) instead of O(n^2)
2026-01-29Simplify client's buffer overflowNakidai
So I decided to kill a link when there's no IRC message within 512 bytes, because doing so removes code and IMO makes it more clear If peer->recvd == sizeof(peer->buf), then buffer size passed into next read(peer->fd) will be 0, therefore its return value will be 0. Though, this means that link is almost dropped if it sent exactly 512 bytes not containing an \r\n: they can get information, but on next send ircd will close the connection. But this state is unachievable with an IRC client: it either sends a message <= 512 bytes containing an \r\n, or, if one or more bytes longer, well that's already > 512 bytes hence link is still ready to be read and will be kicked after the next poll()
2026-01-12Implement 443Nakidai
2026-01-10Check whether user was registered or not in user_reg()Nakidai
So, it fixes a situation when an already registered user wants to change their nick and ircd welcomes they
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-10Make all files dependent on ircd.hNakidai
There were bugs when struct layout was changed, and this was right because needed files were not rebuilt. This is fixed now
2026-01-10Simplify pledgeNakidai
In the past there was a configpath parameter, and unveil was allowing to read at this path. But now accessing filesystem is redundant completely
2026-01-07Add comments for some macrosNakidai
2026-01-07Use function with switch() in reply.cNakidai
Overall, this solution looks better. Also, now macro is better
2026-01-07Move quit announcement code to quit()Nakidai
Well, it's more appropriate for that function to handle this rather than for ircd(). Now code looks simpler, ircd() is not that complex, and support for optional quit message is present
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-06Replace for (;;) with gotoNakidai
It reduces indentation, which was quite pointless in that loop
2026-01-06Use strtoul instead of strtodNakidai
I really thought strtod was converting to integers...
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