summaryrefslogtreecommitdiff
path: root/functions.c
AgeCommit message (Collapse)Author
2019-12-22Make full debug output optional for extractnickfromprefix() and ↵Luke Bratch
stripprefix() to avoid huge debug logs when using replaymode = "lastspoke" combined with DEBUG_FULL.
2019-10-02Try to make removenickfromallchannels() much faster when another user QUITs ↵Luke Bratch
by ignoring unused channel indexes.
2019-09-16Make all log filenames lowercase - since IRC nicks and channel names are ↵Luke Bratch
case-insensitive, we can ensure a nick/channel with varying case always ends up in the same log file.
2019-09-15Make sure nicks passed to the "update all channels" functions have non-zero ↵Luke Bratch
lengths to avoid an enormous loop.
2019-09-15Don't try to socksend() in sendtoclient() if the client wasn't found in the ↵Luke Bratch
client array.
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-14Handle ignoring replay messages from before we launched better to avoid ↵Luke Bratch
misleading error messages going to clients.
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-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