summaryrefslogtreecommitdiff
path: root/client.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Also skip the origin in wordcmpC. McEnroe2020-02-261-13/+17
| | | | I think for some caps we need to filter messages without origins.
* Use %n for tags when formatting intercepted PRIVMSG/NOTICEC. McEnroe2020-02-261-12/+8
|
* Tweak buffer sizesC. McEnroe2020-02-261-3/+3
| | | | | | Filter functions are dealing with lines not including CRLF, so they already have extra space. serverFormat is using snprintf which wants to always write a NUL at the end of the string.
* Add time tag to lines missing itC. McEnroe2020-02-251-1/+11
| | | | | If a line was produced by another client, it won't have one from the server.
* Support message-tagsC. McEnroe2020-02-251-5/+49
|
* Request server-time from the server and filter tags for clientsC. McEnroe2020-02-251-3/+18
| | | | | | | | 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.
* Bump buffer sizes to allow for tagsC. McEnroe2020-02-251-5/+5
| | | | | I still think this limit is unreasonably large in comparison to 512 for the actual message.
* Remove bad assertC. McEnroe2020-02-181-1/+0
| | | | | If there's no room left in the buffer, tls_read will return 0 (since we gave it zero length to read into) and cause client->error to be set.
* Add option to set local client CAC. McEnroe2020-01-121-0/+28
| | | | | | | | | This is a little bit messy. Allows setting either -A or -W or both. Implements SASL EXTERNAL for clients that expect that when connecting with a client certificate. Need to test that reloading still works inside capsicum, since I suspect that rewind call may be blocked.
* Add a vendor capability for passive clientsC. McEnroe2020-01-101-5/+4
| | | | | | This way things like litterbox can do it automatically without having to be configured with a hyphen-prefixed username, which is usually invalid anywhere else.
* Intercept client QUIT with no parameterC. McEnroe2019-12-281-0/+1
| | | | Oops! Clients could get pounce to quit if they didn't send a message.
* Don't send self-PMs to the serverC. McEnroe2019-12-081-0/+1
|
* Fix wordcmp return value when the words have differing lengthsMichael Forney2019-11-211-1/+1
| | | | | | | | | | Otherwise, the result of strncmp gets converted size_t, since size_t has greater rank than int. Since wordcmp is only ever used as a boolean condition, this poses no real issue, but presumably, it is meant to behave like the other *cmp function and return a value less than, equal to, or greater than 0 depending on the result of the comparison.
* 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.
* client: Include time.h for gmtime and strftimeMichael Forney2019-11-201-0/+1
|
* Format milliseconds as intC. McEnroe2019-11-201-3/+2
| | | | | I don't know what I was thinking. I'm expecting a number less than 1000 of course that fits in int.
* Add concept of passive clientsC. McEnroe2019-11-141-3/+9
|
* Use struct timeval for sub-second precisionC. McEnroe2019-11-141-5/+9
|
* Remove server-time filter TODOC. McEnroe2019-11-141-1/+0
| | | | | I think it's fine to keep it separate since it's a core function of the bouncer.
* Tweak filter regexesC. McEnroe2019-11-141-3/+3
|
* Filter multi-prefixC. McEnroe2019-11-141-1/+22
|
* Replace filters with regex replacesC. McEnroe2019-11-141-32/+43
|
* Refactor filterUserhostInNamesC. McEnroe2019-11-131-24/+25
|
* Factor out wordcpy for filtersC. McEnroe2019-11-131-11/+21
|
* Skip initial NAMES parametersC. McEnroe2019-11-111-2/+9
| | | | | | | Channel names can contain '!' so splitting the whole message on it won't work. I hate this code though.
* Filter userhost-in-namesC. McEnroe2019-11-111-0/+17
| | | | I really want to be writing tests for these functions...
* Compare words without copying in filtersC. McEnroe2019-11-101-12/+13
|
* Filter invite-notifyC. McEnroe2019-11-101-7/+14
|
* Filter extended-joinC. McEnroe2019-11-101-0/+13
|
* Filter ACCOUNT, AWAY, CHGHOST for incapable clientsC. McEnroe2019-11-101-0/+42
|
* Maintain stateCaps and offer them to clientsC. McEnroe2019-11-091-5/+3
|
* Parse capabilitiesC. McEnroe2019-11-091-7/+11
| | | | | | The list that I've defined are the ones that I expect to be able to enable probably without any clients breaking... And of course server-time which pounce implements itself.
* Define macro for bit flag enumsC. McEnroe2019-11-091-4/+4
|
* Only change AWAY status for registered clientsC. McEnroe2019-11-081-1/+9
| | | | | | Turns out I did eventually fix this, because I may want to implement "passive clients" for logging or notification stuff, which wouldn't affect AWAY status either.
* Use #defines for constant stringsC. McEnroe2019-11-061-6/+6
| | | | | GCC hates declaring static consts in headers and not using them, for some stupid reason.
* Change license to GPLv3C. McEnroe2019-11-061-4/+4
| | | | | | | | | | | | | | > 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
|
* Zero PASS parameterC. McEnroe2019-11-041-1/+3
|
* Hash client passwords with cryptC. McEnroe2019-11-041-7/+12
|
* Use explicit_bzero to clear passwordsCurtis McEnroe2019-10-311-2/+2
| | | | | 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.
* Shrink client buffer sizeCurtis McEnroe2019-10-311-1/+2
| | | | | | | Clients are generally not going to send huge amounts at a time, and IRC messages are limited to 512 bytes. If in the future we supported message tags from clients, which have a size limit of 8191 bytes, this would unfortunately have to be set much higher.
* Specify when command is allowed in Handlers listCurtis McEnroe2019-10-281-12/+10
|
* Disallow PRIVMSG/NOTICE before registrationCurtis McEnroe2019-10-281-1/+6
|
* Move entire login flow to state and reorganize itCurtis McEnroe2019-10-281-11/+8
|
* Only increment consumer after successful sendCurtis McEnroe2019-10-271-1/+2
|
* Improve client/server error messagesCurtis McEnroe2019-10-271-2/+2
|
* Drop clients on zero-length readsCurtis McEnroe2019-10-271-2/+2
|
* Require PASS before USERCurtis McEnroe2019-10-261-3/+7
| | | | Prevent creating a ring consumer without authentication.
* OopsCurtis McEnroe2019-10-261-1/+1
|
* Disconnect client on unknown commandCurtis McEnroe2019-10-261-0/+1
| | | | | During registration, no other commands should be sent. Afterwards, only intercepted commands will get parsed.