summary refs log tree commit diff
AgeCommit message (Collapse)Author
2022-02-20Use separate edit buffers for each IDJune McEnroe
2022-02-20Make sure new cap is actually larger than new lengthJune McEnroe
2022-02-20Remove unused mbs.len field from struct EditJune McEnroe
2022-02-19Remove unneeded includes in ui.cJune McEnroe
2022-02-19Reimplement tab completeJune McEnroe
2022-02-19Handle errors from editFn, etc.June McEnroe
2022-02-19Reimplement text macrosJune McEnroe
2022-02-19Factor out input handling to input.cJune McEnroe
2022-02-19Factor out window management to window.cJune McEnroe
2022-02-19Enable -Wmissing-prototypesJune McEnroe
In other words, warn when a function is missing static. I don't see why this isn't in -Wextra.
2022-02-19Fix edit.[ch] license notice additional permissionsJune McEnroe
2022-02-19Run line editing testsJune McEnroe
I know, it feels wrong.
2022-02-18Implement new line editing "library"June McEnroe
Losing tab complete and text macros, for now. This new implementation works on an instance of a struct and does not interact with the rest of catgirl, making it possible to copy into another project. Unlike existing line editing libraries, this one is entirely abstract and can be rendered externally. My goal with this library is to be able to implement vi mode. Since it operates on struct instances rather than globals, it might also be possible to give catgirl separate line editing buffers for each window, which would be a nice UX improvement.
2022-02-18Simplify cursor positioning in inputJune McEnroe
Do some extra work by adding the portion before the cursor to the input window twice, but simplify the interaction with the split point. This fixes the awkward behaviour when moving the cursor across colour codes where the code would be partially interpreted up to the cursor.
2022-02-18Fix M-f orderingJune McEnroe
2022-02-12Move sandman build to scripts/MakefileJune McEnroe
2022-02-12Use compat_readpassphrase.c on LinuxJune McEnroe
2022-02-12Copy RPP defines from oconfigureJune McEnroe
We don't use any flags, so just define them in the compat source file.
2022-02-12Import compat_readpassphrase.c from oconfigureJune McEnroe
At 5d08070de6aadd979e3752263d2ec1e709bf037e.
2022-02-12Prompt for empty server or SASL passwordsJune McEnroe
2022-02-09Treat any amount of space and punctuation as word boundariesJune McEnroe
This matches behaviour of, e.g. zsh -o emacs.
2022-02-03Add M-s to (temporarily) reveal spoiler textJune McEnroe
2022-02-03Add C-z s to set spoiler textJune McEnroe
2022-01-16Avoid sending null byte in SASL PLAIN 2.0aJune McEnroe
Woops! BASE64_SIZE is the size of the string buffer. Somehow ergo is the only server software (that I know of) to reject the accidental null byte. Reported by smlavine.
2022-01-16Use Cold for away notices in queriesJune McEnroe
So that they can be hidden with M-+.
2021-12-11Refer to long option names, prefix commands with $ 2.0June McEnroe
2021-11-22Support custom pkg-config executable namesAlyssa Ross
When cross-compiling, it's common to have executables prefixed with the name of the architecture you're building for, e.g. aarch64-unknown-linux-musl-cc or x86_64-unknown-freebsd-pkg-config. Lots of build tools support a PKG_CONFIG environment variable to enable this use case. With this change, I was able to successfully cross-compile and run catgirl.
2021-11-19Cycle between adding colon suffix and not in tab completeC. McEnroe
Allows completing a nick at the beginning of a message without a colon by continuing to press tab, as well as after another nick already followed by a colon without turning it into a comma-separated list of nicks all followed by a colon. For example, tab can be used to cycle between the following pairs: nick1: | nick1 | nick1, nick2: | nick1: nick2 |
2021-11-16Make the /ops response more flavourfulC. McEnroe
How did this normal sounding format string get in there!
2021-11-10Handle RPL_WHOISSPECIALC. McEnroe
<https://modern.ircdocs.horse/index.html#rplwhoisspecial-320>
2021-10-28Parse IRC formatting in timestamp stringC. McEnroe
Strip formatting when calculating the timestamp width to avoid moving a bunch of code around. Use styleAdd (now with an initial style parameter) to show timestamps. This allows changing the style of the timestamps from the default gray using literal IRC formatting codes in the string. Not ideal, but no new options needed. Suggested by Hoël Bézier and Sebastian LaVine.
2021-10-26Fix strptime decode for musl libcpsykose
POSIX does not define a %F for strptime[1], but does define %F for strftime[2]. Afaik most libc's implement %F for both, but musl is very standards-compliant and does not have %F on strptime, leading to unparsed message tag times, which causes all backlog sent from bouncer on startup to have a timestamp of the current time, instead of the actual timestamp sent. [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html [2] https://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html
2021-10-17Increment replies for list modes with /modeC. McEnroe
Otherwise only /ban can be used to list bans and /mode b or /mode +b won't show the listing.
2021-10-16Import refactored xdg.c from pounceC. McEnroe
2021-09-27chroot: Factor out and add OpenBSD buildC. McEnroe
2021-09-20Request znc.in/self-message if availableC. McEnroe
catgirl correctly handles receiving "self-messages". pounce always sends them. [1]: https://wiki.znc.in/Query_buffers [2]: https://defs.ircdocs.horse/info/selfmessages.html
2021-09-09Correct handling of colons in SASL PLAINC. McEnroe
Only the first colon should be replaced with a null byte. Ported from pounce.
2021-08-26Match id names case-insensitivelyC. McEnroe
This fixes the case where an IRCd does not normalize channel names, e.g. PRIVMSG #TEST is relayed as-is, rather than as #test or whatever the canonical casing of the channel name is. It also fixes the case of opening a query window with incorrect case, e.g. /query nickserv. However, this solution is only completely correct when CASEMAPPING=ascii.[1] I do not think the extra mappings of CASEMAPPING=rfc1459 are relevant enough to justify adding the code to handle it. [1]: https://modern.ircdocs.horse/#casemapping-parameter
2021-08-25Remove trailing tabC. McEnroe
How embarrassing.
2021-08-15Handle tags without values 1.9aC. McEnroe
Otherwise a tag with no value would cause a segfault trying to unescape the NULL tag pointer. This shouldn't happen for the server tags we parse, but clients could send @+draft/reply with no value.
2021-08-09Fix missing include for flock(2)C. McEnroe
On OpenBSD it's in <fcntl.h>, and it gets declared anyway on FreeBSD and macOS. Curiously, on GNU/Linux, LOCK_* are defined, but flock(2) isn't declared.
2021-08-09Silence maybe uninitialized warningC. McEnroe
Wouldn't happen anyway since configPath will always return at least one path.
2021-07-26Use (bright) red for \com text macro 1.9C. McEnroe
2021-07-20chroot: Avoid passing paths to -sC. McEnroe
2021-07-20FreeBSD: Revert caph_enter(3) call to cap_enter(2)C. McEnroe
caph_enter(3) is the same as cap_enter(2) except that it returns success even if the kernel does not support capability mode. Since we only enter capability mode when explicitly requested by the restrict option, it should fail loudly if it is not supported. On the other hand, we make calls to caph_rights_limit(3) and friends in some places regardless of whether we actually enter capability mode (to keep the code simple), so those should continue to succeed even if capability mode is not supported.
2021-07-20Don't apply uiThreshold to Network and DebugC. McEnroe
Messages don't really need to be hidden from <network> and I think it could be confusing. Debug messages are all Cold so everything would be hidden, and I want to keep them that way so that <debug> doesn't clutter the status line needlessly.
2021-07-20Add -q/quiet option to raise default message visibility thresholdKlemens Nanni
Silencing all windows with `M-+' (across multiple catgirl instances) can be cumbersome, so provide an option to hide events, JOIN/PART noise, etc. by default (each window's threshold will persist across load/save cycles, i.e. when using the `-s/save' option). Started out as `-v | visibility = threshold' to set a specific level, the idea of a simpler toggle comes from june, who also squashed other bugs (as usual).
2021-07-15chat.tmux.conf: Fix base-index settingKlemens Nanni
"base-index" expects integer values, tmux prints a warning at load-time but otherwise ignores the configuration line.
2021-07-15Use /ns in manual exampleKlemens Nanni
Follow a79a3fc "Use NS and CS server aliases".
2021-07-13Move platform-dependent sandboxing code out of mainC. McEnroe
To keep the "main" sequence of events on one screen, while emphasizing that sandboxing happens either side of ircConnect().