summaryrefslogtreecommitdiff
path: root/state.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Implement draft/read-markerJune McEnroe2023-07-161-6/+4
|
* Factor out caps pounce doesn't request from the serverJune McEnroe2023-07-161-1/+9
|
* Handle servers not sending NUH-origin in NICKJune McEnroe2023-07-031-2/+3
| | | | | Apparently Unreal does this. Only having :nick in the NICK would confuse the check for self.
* Send 900 as part of stateSyncJune McEnroe2022-03-291-0/+7
| | | | Sent before 001 since that is normally when you would receive it.
* Track account name from 900 numericJune McEnroe2022-03-291-7/+9
|
* Replace ORIGIN #define with clientOrigin variableJune McEnroe2022-03-291-4/+4
|
* Use EX_USAGE for all local configuration errorsC. McEnroe2021-09-051-2/+2
|
* Separate stateSync intro messagesC. McEnroe2021-08-311-8/+13
| | | | | So each message can be logged with its prefix. All other calls to clientFormat and serverFormat write one message at a time.
* Correct handling of colons in SASL PLAINC. McEnroe2021-08-301-12/+11
| | | | Only the first colon should be replaced with a null byte.
* Avoid overwriting manual AWAY messagesC. McEnroe2021-08-211-0/+13
| | | | | | Setting an AWAY message then disconnecting will no longer replace the AWAY message with the default one. Reconnecting continues to always clear AWAY.
* Use seprintf to build final 005C. McEnroe2021-07-081-3/+5
| | | | Rather than causing a tls_write(3) for each remaining token.
* Stop accumulating ISUPPORT tokens once MOTD startsC. McEnroe2021-06-101-0/+9
| | | | | This avoids duplicating tokens when a client sends VERSION and the server responds with its 005s again.
* Support echo-message capabilityC. McEnroe2021-01-241-0/+3
| | | | | | | Only request it with labeled-response, since it is impossible to correlate messages to clients without. For clients without echo-message, synthesize a label on PRIVMSG/NOTICE/TAGMSG, then filter out received messages with that label.
* Send CAP END if CAP LS response is emptyC. McEnroe2020-12-211-1/+5
| | | | | Or only unsupported caps. Or, as the corresponding commit in catgirl says, "if CAP LS doesn't list anything good."
* Handle 437 ERR_UNAVAILRESOURCE like ERR_NICKNAMEINUSEC. McEnroe2020-12-051-0/+1
| | | | | Not totally clear under what conditions 437 is returned, but if it happens during registration, we should pick a new nick.
* Say "OpenSSL" in additional permission noticesC. McEnroe2020-08-061-2/+2
| | | | LibreSSL is "a modified version of that library".
* Add -R blind-req optionC. McEnroe2020-07-061-15/+13
| | | | | Allows requesting userhost-in-names on freenode, which is available but hidden.
* Add additional permission for linking with LibreSSLC. McEnroe2020-06-081-0/+11
| | | | https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs
* Add server send queueing with time intervalC. McEnroe2020-05-111-1/+1
| | | | | | | | | This addresses pounce getting killed with "Excess flood" when it sends NAMES commands for too many channels when a client connects. These commands, as well as automatic AWAY commands, are by default throttled to 5 per second. Tested on freenode with 36 channels and 200ms interval.
* Send ERR_NOMOTD during syncC. McEnroe2020-03-081-0/+5
| | | | | Some clients (Revolution) mistakenly believe they are not connected until a MOTD has been received. Sending this is harmless, I guess.
* Advertise STS policyC. McEnroe2020-02-271-1/+1
| | | | | Duration is set to INT_MAX since pounce will never accept cleartext connections.
* Send CAP LS 302 to the serverC. McEnroe2020-02-271-2/+7
|
* Support CAP LS 302 from clientsC. McEnroe2020-02-271-2/+2
|
* Support cap-notifyC. McEnroe2020-02-271-2/+5
|
* Request server-time from the server and filter tags for clientsC. McEnroe2020-02-251-1/+1
| | | | | | | | This doesn't yet, but it will break the "robustness principle" according to which a server "SHOULD NOT" assume that a client capable of parsing one tag is capable of parsing all tags. In future, TagCaps will have all other caps that use tags ORed into it, and only if the client supports none of them will tags be filtered out.
* Declare globals as extern in headers, and define in source fileMichael Forney2019-11-211-0/+3
| | | | | | | | | | | | | | | Otherwise, each source file that includes the header gets its own definition, and according to the C standard (C99 6.9p5): > If an identifier declared with external linkage is used in an > expression (other than as part of the operand of a sizeof operator > whose result is an integer constant), somewhere in the entire > program there shall be exactly one external definition for the > identifier Most compilers use the .bss section for zero data, but if it uses .data instead, or if -Wl,--warn-common is used, this will cause a linking error.
* Zero temporary SASL PLAIN bufferC. McEnroe2019-11-211-0/+1
|
* Use a static buffer for plainBase64C. McEnroe2019-11-211-11/+7
|
* Use a fixed buffer size for SASL PLAIN authenticationMichael Forney2019-11-211-3/+9
| | | | | | | handleAuthenticate only sends a single AUTHENTICATE message, so according to https://ircv3.net/specs/extensions/sasl-3.1.html, its maximum length is 399. So, we know that the authentication string can be at most 299 bytes.
* Request NAMES on sync by defaultC. McEnroe2019-11-151-1/+2
| | | | This inverts the meaning of -N!
* Filter invite-notifyC. McEnroe2019-11-101-3/+5
|
* Request all supported caps from serverC. McEnroe2019-11-101-2/+9
|
* Maintain stateCaps and offer them to clientsC. McEnroe2019-11-091-4/+12
|
* Use #defines for constant stringsC. McEnroe2019-11-061-2/+2
| | | | | GCC hates declaring static consts in headers and not using them, for some stupid reason.
* Change license to GPLv3C. McEnroe2019-11-061-5/+5
| | | | | | | | | | | | | | > Notwithstanding any other provision of this License, if you modify the > Program, your modified version must prominently offer all users > interacting with it remotely through a computer network (if your version > supports such interaction) an opportunity to receive the Corresponding > Source of your version by providing access to the Corresponding Source > from a network server at no charge, through some standard or customary > means of facilitating copying of software. This potentially means that every freenode user, for example, is interacting with this software, and offering the corresponding source to each of them is an unreasonable burden.
* Use explicit_bzero from LibreSSLC. McEnroe2019-11-061-2/+2
|
* Implement SASL EXTERNALC. McEnroe2019-11-051-17/+22
|
* Hash client passwords with cryptC. McEnroe2019-11-041-1/+1
|
* Move base64 to bounce.hC. McEnroe2019-11-041-32/+3
|
* Use explicit_bzero to clear passwordsCurtis McEnroe2019-10-311-4/+3
| | | | | GNU doesn't implement memset_s, but both FreeBSD and GNU implement explicit_bzero. Darwin doesn't, so #define it in terms of memset_s.
* Clear passwords from memory with memset_sCurtis McEnroe2019-10-311-0/+3
|
* Do not duplicate origin on nick changeCurtis McEnroe2019-10-291-1/+2
| | | | Oops!
* Update self origin on nick changeCurtis McEnroe2019-10-291-1/+10
|
* Relay optional 5th RPL_MYINFO parameterCurtis McEnroe2019-10-291-3/+5
|
* Move entire login flow to state and reorganize itCurtis McEnroe2019-10-281-119/+178
|
* Wait for SASL success before sending CAP ENDCurtis McEnroe2019-10-271-0/+14
| | | | | | | Also refuse to continue logging in if SASL authentication fails. I should really just move all of log in and authentication from server.c to state.c...
* Handle nick collisionCurtis McEnroe2019-10-261-0/+7
|
* Wait for AUTHENTICATE + from serverCurtis McEnroe2019-10-261-0/+6
|
* Do not require RPL_ISUPPORT for stateReadyCurtis McEnroe2019-10-261-2/+1
|
* Track channel topicsCurtis McEnroe2019-10-261-19/+56
|