summaryrefslogtreecommitdiff
path: root/blabouncer.c
AgeCommit message (Collapse)Author
2024-03-30Implement changing client-side TLS certificate and key paths, and reloading ↵Luke Bratch
certificate/key at runtime when doing a REHASH (BLABOUNCER command or SIGHUP).
2023-08-01Correctly handle too many clients by doing accept() and close() immediately ↵Luke Bratch
rather than trying to add to clients[] struct.
2023-07-24Add some extra debugging for truncated messages.Luke Bratch
2023-07-24Fix incorrectly printed debug message.Luke Bratch
2023-04-08Improve stdin handling (only available when running in foreground mode) - ↵Luke Bratch
don't get stuck in a loop when handling EOF/^D/Ctrl+D, improve debug output, improve comments, initialise variables more safely, exit main loop on errors.
2021-01-18Make the "channels" configuration file entry an array.Luke Bratch
2020-10-21Don't have arrindex() return 0 on failure as 0 is a valid index. Instead ↵Luke Bratch
return -1 and change callers to check this.
2020-10-21Mark each channel as not having received nick names yet so existing clients ↵Luke Bratch
get channel nicks after server reconnections.
2020-01-05Fix some situations where the remote IP of a connecting/disconnecting client ↵Luke Bratch
is wrong in the debug log and NOTICEs.
2019-12-22Significantly reduce memory usage by only initialising channel struct ↵Luke Bratch
elements when they are used for the first time.
2019-10-02Various typo fixes.Luke Bratch
2019-09-16Correctly log and NOTICE new connections' remote IP addresses.Luke Bratch
2019-09-15Don't print stashed truncated strings in the debug log.Luke Bratch
2019-09-15Use global signal(SIGPIPE, SIG_IGN) instead of the send() flag MSG_NOSIGNAL ↵Luke Bratch
since we can't pass MSG_NOSIGNAL to OpenSSL's SSL_write when using TLS connections.
2019-09-15Start tracking nicks in channels (upon JOIN/PART/QUIT/NICK) and use that to ↵Luke Bratch
correctly log QUITs in the replay log and normal log(s).
2019-09-14Specify multiple nicks using a configuration array instead of multiple ↵Luke Bratch
individual settings.
2019-09-14Implement arrays in the configuration file and start using them to allow for ↵Luke Bratch
multiple connect commands.
2019-09-12Log server messages to file named <ircdname>.log.Luke Bratch
2019-09-12Adopt the locale of the environment for locale-dependent things like date ↵Luke Bratch
formats.
2019-09-07Avoid more replay log NICK synchronisation issues by ignoring replay log ↵Luke Bratch
nick changes from us if not our current nick, and by completely ignoring replaying any type of replay log line from before blabouncer was launched.
2019-09-07Add a configuration option to include the date in the timestamp when ↵Luke Bratch
replaying the replay log.
2019-09-06Send remote IP addresses instead of fd numbers in NOTICEs to clients and ↵Luke Bratch
print both in related debugprint()s.
2019-09-06Change how the received client string length check is done before stripping ↵Luke Bratch
newlines to avoid a potential buffer underflow.
2019-07-18Release version 0.1!v0.1Luke Bratch
Also add version information (client welcome message, -v, and --version).
2019-07-18Only check for newlines at the end of client strings if the string length is ↵Luke Bratch
at least one.
2019-07-10Make sure messages aren't too long after combining truncated messages.Luke Bratch
2019-07-10Make setting configuration option "replayseconds" optional if "replaymode" ↵Luke Bratch
!= "time".
2019-07-09Rename selret to pselret since it's now the return code for pselect().Luke Bratch
2019-07-09Avoid SSL_accept() blocking if the client fails to do TLS negotiation.Luke Bratch
2019-06-17Implement a per-client identifier so auto replay can replay everything a ↵Luke Bratch
given client has missed.
2019-06-16Implement two new auto replay modes:Luke Bratch
- replaymode = "noclients": All messages since the bouncer last had no clients connected - replaymode = "lastchange": All messages since the last client connect or disconnect
2019-06-16Handle very long lines and very short lines. Print to terminal if we fail ↵Luke Bratch
to connect to server at startup. Don't print to terminal if sending to a client or to the server fails.
2019-06-16Load all settings from configuration file at startup instead of reading it ↵Luke Bratch
for certain settings (password/nick/nick2/nick3).
2019-06-16Handle failing to connect to the real IRC even after the socket has been ↵Luke Bratch
created.
2019-06-16Log OpenSSL errors properly instead of printing to stderr.Luke Bratch
2019-06-13Just debugprint() the socket fd number if there was a client read error.Luke Bratch
2019-06-12Allow reloading the configuration file at runtime using a BLABOUNCER command ↵Luke Bratch
or by issuing the SIGHUP signal.
2019-06-12Don't print server or client recv() errors to the terminal, debugprint() ↵Luke Bratch
them properly instead.
2019-06-12Handle failing to reconnect to the server upon timeout or disconnection by ↵Luke Bratch
looping the reconnection and keeping clients informed.
2019-06-12Handle failing to connect to the server on startup.Luke Bratch
2019-06-11Implement configurable auto replay modes. So far there is "none", "time" ↵Luke Bratch
(auto replay the last X seconds), and "lastspoke" (auto replay everything since you last spoke).
2019-06-11Refactoring - rename ircdstrings struct to ircdstate since it doesn't just ↵Luke Bratch
contain strings.
2019-06-11Send a PING to the server before assuming a timeout is definite.Luke Bratch
2019-06-10Use debugprint() instead of printf() if the server times out.Luke Bratch
2019-06-10Refactoring - split giant processircmessage() switch statement into separate ↵Luke Bratch
server and client functions in message.h/message.c.
2019-06-10Refactoring - move most functions into functions.h/functions.c except ↵Luke Bratch
connect/exit functions only relevant in main.c.
2019-06-10Refactoring - move structs into a separate file structures.h.Luke Bratch
2019-06-10Add copyright and GPL 3 notices.Luke Bratch
2019-06-01Use errno to handle getconfint() failing.Luke Bratch
2019-06-01Put debug logs in subdirectory and have max number to keep be configurable. ↵Luke Bratch
Also fix possible crash in debugprint() if debug directory doesn't exist yet.