summaryrefslogtreecommitdiff
path: root/functions.c
AgeCommit message (Collapse)Author
2019-07-18Fix compiler warnings emitted by Clang/LLVM and some older GCC versions.Luke Bratch
2019-07-10Fix some potential buffer overflows when sending to client/server.Luke Bratch
2019-07-10Ensure log filenames are safe for writing.Luke Bratch
2019-07-10Make setting configuration option "replayseconds" optional if "replaymode" ↵Luke Bratch
!= "time".
2019-07-09Make sure debug lines printed to file end with a trailing newline.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-16Correctly return success when handling new replay modes.Luke Bratch
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-12Allow reloading the configuration file at runtime using a BLABOUNCER command ↵Luke Bratch
or by issuing the SIGHUP signal.
2019-06-12Don't print a message to the terminal when a channel already exists (it is a ↵Luke Bratch
normal occurence when reconnecting, but might be bad in some other situation).
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-11Prepend timestamps when writing to the debug log file.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-10Add copyright and GPL 3 notices.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.
2019-05-30Remove most (all?) exit()s with error handling without exiting where ↵Luke Bratch
possible. Convert most remaining printing to stdout/stderr to debugprint() instead.
2019-05-30Convert debugprint() from being to file/screen/disabled to always being to ↵Luke Bratch
file with configurable verbosity.
2019-05-28Implement debugging to file and set the default configuration file to be that.Luke Bratch
2019-05-27Make debug output optional and disabled by default.Luke Bratch
2019-05-27Only compare nick instead of full nick!user@host when processing server ↵Luke Bratch
JOIN/PART/NICK. Also handle the "new" nick already being set in greeting strings during a server NICK if it's changing our nick.
2019-05-21Support multiple nick prefixes in channels by storing/relaying server ↵Luke Bratch
005/RPL_ISUPPORT messages and implementing the start of IRCv3 CAP negotiations (multi-prefix only at the moment).
2019-05-18Add underflow safety check in appendcrlf().Luke Bratch
2019-05-17Properly support changing our nick while connecting by updating it ↵Luke Bratch
everywhere including initial server welcome strings. Make sure channels are cleared when PARTing them. Ignore most commands from clients until they are registered with us. Send the correct current nick when sending NOTICEs.
2019-05-16Correctly handle nicks changing and actually track users PARTing channels.Luke Bratch
Also change nickuserhost to store the leading colon (:) since it's always needed (so far).
2019-05-12Make configuration file path configurable on the command line. Also finish ↵Luke Bratch
removing the non-functional debug() stuff.
2019-05-12Completely rewrite configuration file reading to remove lots of duplicated ↵Luke Bratch
code and to simplify things. Alter everything that called the old functions.
2019-05-08Make TOPIC tracking/following/setting/etc. work for most/all scenarios and ↵Luke Bratch
ensure it's always given out to new clients correctly. Also misc other bug fixes.
2019-04-21Fix appendcrlf() to strip both CR and LF, fixes mysterious newlines in PRIVMSGsLuke Bratch
2019-04-20We are bouncing! You can now:Luke Bratch
- connect the bouncer to a server - connect to the bouncer with a real client - join channels - have new clients connect and have the bouncer join those new clients to the channels - relay PRIVMSGs between all clients Some random current big bugs: - Joining channels whilst multiple clients are already connected doesn't join all clients properly - Parting channels doesn't work - No idea what will happen if the nick is in use, etc. Features missing: - Almost everything :)
2019-04-19Lots and lots of refactoring and comments work in preparation for more ↵Luke Bratch
actual IRC/bouncer functionality
2019-04-18Split functions into different filesLuke Bratch