summary refs log tree commit diff
path: root/handle.c
AgeCommit message (Collapse)Author
2021-06-17Handle 338 as whois replyC. McEnroe
Used by Solanum for "actually using host".
2021-06-12Reset formatting after realname in setnameC. McEnroe
Missed this one.
2021-06-10Avoid trailing comma in whois channels listsC. McEnroe
The format of the reply is defined as "<nick> :{[@|+]<channel><space>}".
2021-06-09Replace catf with seprintfC. McEnroe
2021-05-25Use reverse video not colors for topic change when disabledKlemens Nanni
`-H 0,0`/"hash = 0,0" makes catgirl mostly colorless which is great, but topic changes still hardcode brown/green colors to show differences which is usually not desired by users (like me) disabling colors. Go for a less eye stressing topic change message that shows both old and new in reverse video with default terminal colors. This isn't perfect, other parts of catgirl still hardcode colors and `-H 0,0`/"hash = 0,0" was never meant to disable colors completely, but topics change often enough that avoiding less readable^Waccessible topic diffs seems sensible enough. NB: parseHash() is brittle and "0,0" is not the only value disabling colors...
2021-05-25Use color enum instead of hardcoded valueKlemens Nanni
2021-05-20Don't require 4 parameters to ERR_USERONCHANNELC. McEnroe
It should have 4, but the handler only uses 3.
2021-04-27Reset formatting after realnamesC. McEnroe
2021-04-16Always show 341 RPL_INVITINGC. McEnroe
At least in InspIRCd's implementation, you only get invite-notify INVITEs if you are op, so inviting with no op (where allowed by a channel mode) results in only a 341. On the other hand, inviting as an op produces both a 341 and an INVITE, so will be displayed twice, but showing something sometimes twice is better than not showing it at all.
2021-04-02Skip STATUSMSG prefixesC. McEnroe
This feature is rarely used, so just skip STATUSMSG prefixes in the target so messages get routed correctly.
2021-02-21Use separate reply counts for automatic join topics/namesC. McEnroe
This restores showing the topic and names for automatic joined channels, while still avoiding touching the windows, by using Cold heat.
2021-02-04Only treat a single -j join as explicitC. McEnroe
In other words, only automatically switch to an automatically joined channel window if there's only one. Otherwise, stay on the <network> window and avoid touching the channel windows with their automatic topic and names replies. This fixes unintentionally clearing saved window unread counts when rejoining channels automatically by switching to them as they are joined.
2021-01-28Add 335 to WHOIS responsesC. McEnroe
This is used by InspIRCd to indicate if a user is a bot (if it set user mode +B).
2021-01-26Use Warm heat for replies to user-initiated commandsC. McEnroe
Otherwise they are invisible with M-+ and commands having no output is confusing.
2021-01-16Add -I highlight option and /highlightC. McEnroe
2021-01-16Rename ignore code to filterC. McEnroe
2021-01-11Don't pass nick to urlScan for MOTD and helpC. McEnroe
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-12-29Handle so-called Standard RepliesC. McEnroe
2020-12-05Handle 437 ERR_UNAVAILRESOURCE like ERR_NICKNAMEINUSEC. McEnroe
Not totally clear under what conditions 437 is returned, but if it happens during registration, we should pick a new nick.
2020-11-08Remove static buffer from colorMentionsC. McEnroe
2020-11-08Remove static buffer from capListC. McEnroe
2020-11-08Highlight changed portion of topicC. McEnroe
"%.*ls" is useless.
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-18Switch back to checking for server by nick with '.'C. McEnroe
This fixes a bug where if you send a private message before joining any channels, your message will be routed to the <network> window. That happens because without a JOIN, self.user remains unset, which means that require will copy self.nick (set by echoMessage) to self.host. The easiest solution is to go back to checking for '.' and add a '.' to the default nick, so now if a server sends a NOTICE with no origin it will look like -*.*- which is kinda cute.
2020-09-02Don't call completeTouch for ignored messagesC. McEnroe
2020-08-18Match mentions case-sensitivelyC. McEnroe
The mention coloring code already matches case-sensitively, and any proper ping should be using tab-complete anyway so there's no reason for differing case. And the month of June should not ping me.
2020-08-16Set origin fields to "*" if missingC. McEnroe
Also determine if a message is from the server by if the host field has been copied from the nick field. EFNet sends NOTICEs with no origin during registration. RFC 1459 has this to say: > If the prefix is missing from the message, it is assumed to have > originated from the connection from which it was received. I suppose a more correct implementation would be to set the origin to the hostname of the server, but we don't store that globally, so this is good enough.
2020-08-04Say "OpenSSL" in additional permission noticesC. McEnroe
LibreSSL is "a modified version of that library".
2020-07-30Replace catf with something that tracks lenC. McEnroe
Also the old catf would be broken with -DNDEBUG oops!
2020-07-30Remove use of strlcatC. McEnroe
catf is not better though and should really be replaced.
2020-07-13Add current topic to tab-complete so it can editedC. McEnroe
2020-07-09Don't scan ignored messages for URLsC. McEnroe
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-16Color mentions up to first ": " rather than just ":"C. McEnroe
Avoids coloring everything up to a ":)".
2020-06-08Add additional permission for linking with LibreSSLC. McEnroe
https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs
2020-04-07Check ignores against idC. McEnroe
Otherwise they do not work correctly for QUIT and NICK. This also lets you ignore private messages only by putting the nick in the third field.
2020-04-05Error on missing MODE parametersC. McEnroe
2020-04-05Error on invalid ISUPPORT valuesC. 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-03-31Add /ignore message filtering patternsC. McEnroe
2020-03-30Replace some declaration; while loops with for loopsC. McEnroe
I should have been using this for getopt loops already but the call here is slightly too long to fit on one line as a for loop.
2020-03-28Rewrite mode formatting again and write to logC. McEnroe
Going back to one line per mode change again because it's easier.
2020-03-25Log chat eventsC. McEnroe
Still missing is logging MODE changes, which will be hell, unless it just logs the raw stuff.
2020-03-23Track MODE in repliesC. McEnroe