diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-04-21 01:56:14 +0200 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-04-21 01:56:14 +0200 |
commit | 50d73b6938c62a3f5df91dda0fa3a91baee52127 (patch) | |
tree | c4913650fe772f932b685fbea287a9df55c7ad37 | |
parent | 1685960bd0b5686891f94f5e69990512626ffb61 (diff) |
Fix appendcrlf() to strip both CR and LF, fixes mysterious newlines in PRIVMSGs
-rw-r--r-- | blabouncer.c | 3 | ||||
-rw-r--r-- | functions.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/blabouncer.c b/blabouncer.c index f025912..489dccf 100644 --- a/blabouncer.c +++ b/blabouncer.c @@ -7,7 +7,8 @@ // - Get CAP from server and relay to client // - Add blabouncer MOTD (375, 372, 376) // - Need to delete channels from struct when PARTing them -// - Joining while connected doesn't properly join other clients +// - Disconnecting a client is slow for the client (Please wait, waiting for servers to close connections.." +// - "01:53:47 -!- ServerMode/#test [b] by irc.tghost.co.uk" on existing clients when new client connects // // Example WHOIS reply: // BOUNCER-SERVER RECEIVED: :irc.tghost.co.uk 307 blabounce l_bratch :is identified for this nick diff --git a/functions.c b/functions.c index 86a1f03..56b37d6 100644 --- a/functions.c +++ b/functions.c @@ -41,7 +41,7 @@ int getstdin(char *prompt, char *buff, size_t sz) { // Append CR-LF to the end of a string (after cleaning up any existing trailing CR or LF) void appendcrlf(char *string) { // Make sure it doesn't already end with CR or LF - while (string[strlen(string) - 1] == '\r' || string[strlen(string) - 1] == '\r') { + while (string[strlen(string) - 1] == '\r' || string[strlen(string) - 1] == '\n') { string[strlen(string) - 1] = '\0'; } |