summary refs log tree commit diff
path: root/handle.c
AgeCommit message (Collapse)Author
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
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-22Track own host, handle CHGHOSTC. McEnroe
2020-03-22Handle RPL_CHANNELMODEISC. McEnroe
2020-03-22Handle user mode changesC. McEnroe
2020-03-22Rewrite handleModeC. McEnroe
2020-03-18Handle RPL_UMODEISC. McEnroe
2020-03-09Ignore 422 ERR_NOMOTDC. McEnroe
pounce will start sending these because some silly clients don't think they're connected until some MOTD reply...
2020-03-08Set self.pos before handling the messageC. McEnroe
This intuitively feels wrong, but isn't. Most importantly, handleError immediately exits, but we still need to "consume" that message, otherwise pounce will keep sending it on reconnect. The same goes for any other handler that might cause an exit, such as a require parameter count failure.
2020-02-29Implement the causal.agency/consumer capabilityC. McEnroe
2020-02-25Add raw modes to mode messageC. McEnroe
2020-02-25Handle changing setParamModes, paramModes and other channel modesC. McEnroe
2020-02-25Fix handling EXCEPTS and INVEX without valuesC. McEnroe
2020-02-25Add /mode, /except, /invex and handle lists repliesC. McEnroe
2020-02-23Accumulate mode changes into a buffer for one messageC. McEnroe
2020-02-20Handle ERR_CHANOPRIVSNEEDEDC. McEnroe
2020-02-20Handle MODE changing channel list modesC. McEnroe
2020-02-20Handle MODE setting channel prefix modesC. McEnroe
2020-02-20Change ban list formattingC. McEnroe
2020-02-20Rearrange some handlersC. McEnroe
2020-02-20Handle RPL_INVITING when no invite-notifyC. McEnroe
2020-02-20Handle ERR_BANLISTFULLC. McEnroe
2020-02-20Add handlers for user-in-channel errorsC. McEnroe
2020-02-20Add generic error reply handlerC. McEnroe
This should have been in way earlier...
2020-02-19Add /ban, /unban and handle ban list repliesC. McEnroe
2020-02-19Format WHOIS signon date with %F %TC. McEnroe
2020-02-16Replace a lot of snprintf with a catf implementationC. McEnroe