summary refs log tree commit diff
path: root/command.c
AgeCommit message (Collapse)Author
2022-02-26Only add available commands to completeJune McEnroe
2022-02-26Factor out commandAvailableJune McEnroe
2022-02-19Factor out window management to window.cJune McEnroe
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-07-13Disable /exec in Kiosk mode (as documented)Klemens Nanni
2021-07-13Use CS command for paramless /op and /voiceC. McEnroe
Should match the actual /cs command.
2021-07-02Save invited channel for /joinC. McEnroe
2021-06-21Use NS and CS server aliasesC. McEnroe
I think I didn't use these originally because they were misconfigured on tilde.chat, but they work now, and supposedly server aliases should be more secure/reliable.
2021-06-17Match windows by substring in /windowC. McEnroe
This could just iterate over idNames instead, but using complete means more recently used windows will match first.
2021-06-13/exec without controlling terminalKlemens Nanni
Otherwise "/exec sh </dev/tty" takes over and catgirl must effectively be killed to stop the madness; with this diff: catgirl input| /exec sh </dev/tty catgirl output| /bin/sh: cannot open /dev/tty: Device not configured catgirl output| Process exits with status 1 Do the same for `-C/Copy', `-N/notify' and `-O/open' alike.
2021-05-28List windows with /window 1.8C. McEnroe
Reuse the /window command to preserve /wi abbreviation.
2021-05-28Improve missing param behavior for /msg, /whois, /ns, /csC. McEnroe
2021-04-16Set id color from completion in /msgC. McEnroe
In the same way that /query copies the id color from completion. Also make both first check that a color isn't already set.
2021-03-17Show where too-long-messages will be automatically splitC. McEnroe
2021-03-14Allow multi-line /me and split long /me messagesC. McEnroe
/me shouldn't behave differently from a regular message.
2021-02-08Fix /help LESS setting for updated manualC. McEnroe
The new reference to the COMMANDS section at the beginning of the manual would get matched instead.
2021-01-23Fix /unignore commandC. McEnroe
Yikes, copy-paste fail.
2021-01-23Separate kiosk mode from restrict modeC. McEnroe
Restrict mode will focus on sandboxing, while kiosk will continue to restrict IRC access through a public kiosk. Kiosk mode without restrict mode allows execution of man 1 catgirl with /help, assuming external sandboxing. The /list and /part commands are also added to the list of disabled commands in kiosk mode, since they are pointless without access to /join.
2021-01-16Add -I highlight option and /highlightC. McEnroe
2021-01-16Rename ignore code to filterC. McEnroe
2021-01-07Use execl rather than execlp for shellC. McEnroe
SHELL is an absolute path.
2021-01-01Split ignore fields to avoid over-eager * matchingC. McEnroe
Split ignore fields and match each separately to avoid an early * eagerly matching across several fields. For example, "* JOIN * *" should not match messages which happen to contain the word "JOIN" followed by two other words. Ignore capacity is reduced to 64 to keep the size of the array the same. I don't think it's an issue.
2020-12-30Factor out reply count checking and decrementingC. McEnroe
2020-12-30Add /whowasC. McEnroe
2020-12-30Show setnames like nick changesC. McEnroe
2020-12-29Add /setname commandC. McEnroe
I'm not sure about that replies check in handleStandardReply. If more of those are added the reply counter system will definitely need refactoring.
2020-10-02Double up /help for server helpC. McEnroe
While the automatic search via LESS is neat, I don't think it's very useful. Just always open the manual to the COMMANDS section, and fix it to append to LESS rather than replace it.
2020-09-30Use WHO for /opsC. McEnroe
Accumulate names in a buffer and show away status.
2020-09-30Add /ops commandC. McEnroe
It's pretty awkward with large channels since NAMES isn't sorted by prefixes or anything... But having it accumulate names across many replies would require more reworking.
2020-09-18Allow 2-param form of /whois, count comma-separated nicksC. McEnroe
I do not feel like documenting the 2-param form of /whois because it is weird, but it should work for those who already know about it.
2020-08-04Say "OpenSSL" in additional permission noticesC. McEnroe
LibreSSL is "a modified version of that library".
2020-06-24Bump ParamCap to 254C. McEnroe
Apparently IRCds have decided that the 15-parameter limit doesn't matter anymore. 254 is the maximum number of single-byte parameters (following a single-byte command) which fit in a 512-byte CR-LF-terminated line. When everyone decides that the 512-byte line length limit doesn't matter either, I will delete my software and people can use some JavaScript garbage instead. This makes struct Message 2080 bytes, but there's only ever one or two of them around at once. Avoid passing it by value to handle.
2020-06-15Add null terminator to modes in channelListModeC. McEnroe
Otherwise passing more than 13 parameters reads past the end of the array.
2020-06-08Add additional permission for linking with LibreSSLC. McEnroe
https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs
2020-04-06Voice, devoice self on /voice, /devoice with no paramsC. McEnroe
2020-04-06Op, deop self on /op, /deop without paramsC. McEnroe
2020-04-03Use gnu-case-range and gnu-conditional-omitted-operand extensionsC. McEnroe
I'm sad to do this but I just can't stand writing (foo ? foo : bar) anymore.
2020-04-03Only treat /open param as count if single digitC. McEnroe
2020-03-31Add /ignore message filtering patternsC. McEnroe
2020-03-30Add text macrosC. McEnroe
2020-03-30Add /o alias for /openC. McEnroe
I can't live without it.
2020-03-29Add /op, /deop, /voice, /devoiceC. McEnroe
This collides with using /o for /open which I'm sad about, but I think these commands should exist...
2020-03-23Track MODE in repliesC. McEnroe
2020-03-23Fix non-multiline command newline handlingC. McEnroe
2020-03-23Allow commands to take multiline inputC. McEnroe
2020-03-23Assume worst case for unknown user and host in splitMessageC. McEnroe
The default USERLEN of 9 doesn't have a great source, the RFC only says that nicks are length 9, so my assumption is that usernames are not longer.
2020-03-22Implement message splittingC. McEnroe
2020-03-22Handle empty input directly in commandC. McEnroe
2020-03-22Add /sayC. McEnroe
2020-03-02Prevent entering commands in <debug> if restrictedC. McEnroe
Because the <debug> ID always exists, it's possible to create a window for it even while restricted with "/window <debug>" and try to enter commands there.