176 Commits

Author SHA1 Message Date
bx
7bae4f2285 changed colors to be based on nicks, and to mirror gur colours used by weechat 2.8, also changed usernames to be aligned, max 12 chars 2023-01-22 08:51:12 +00:00
June McEnroe
91ad4c4163 Handle missing LIST reply topic parameter 2022-09-23 10:55:53 -04:00
June McEnroe
c5c7067e63 Remove WHO reply handlers 2022-09-11 17:36:56 -04:00
June McEnroe
fcbe7af1e2 Generate /ops from cache 2022-09-11 17:34:41 -04:00
June McEnroe
d043bad63d Set pointer to Entry in Cursor
This feels a little redundant but the API makes sense, I think?
2022-09-11 17:28:19 -04:00
June McEnroe
c273621244 Don't use cached color to route away reply
Doesn't work when colors are disabled.
2022-08-06 15:38:51 -04:00
June McEnroe
adfd1d2d8d Track prefix bits 2022-08-02 20:46:25 -04:00
June McEnroe
93e841b29e Move cache color to an Entry struct
So that more values can be added sensibly.
2022-07-31 18:17:08 -04:00
June McEnroe
b373a5c091 Rename cache{Prefix,Substr} to cache{Complete,Search} 2022-07-30 18:55:09 -04:00
June McEnroe
14a6486b9b Switch to cache interfaces 2022-07-30 18:47:26 -04:00
June McEnroe
b917a590db Show STATUSMSG prefix 2022-07-30 15:43:11 -04:00
June McEnroe
8d654bc3a4 Refactor colorMentions to be seprintf-like 2022-07-30 15:25:25 -04:00
June McEnroe
4aaa2050e2 Only show old topic if something was removed 2022-06-26 16:38:19 -04:00
June McEnroe
b744089d6a Use two lines to show topic diffs 2022-06-24 14:29:44 -04:00
June McEnroe
3475f03ec8 Allow setting fallback nicks and highlight on any
As a side-effect, even with only one nick set you'll still be
highlighted by it even if your current nick is different.
2022-05-29 18:09:52 -04:00
June McEnroe
f7b3c2f8ca Put unknown numerics in parentheses
For some reason this makes it look so much better to me.
2022-05-29 15:24:06 -04:00
June McEnroe
fc518e301f Route unknown channel replies to channels
Also prefix with the numeric. I don't really want to show numerics
to the user, but I'm not sure these really make sense without.
2022-05-08 17:49:20 -04:00
June McEnroe
7ee327ccb6 Show "You arrive" message only once 2022-05-08 16:39:31 -04:00
June McEnroe
6cfb1ad301 Write unknown replies to Network with Ice heat 2022-05-08 16:38:00 -04:00
June McEnroe
b6c7280649 Specify commands which depend on caps
Currently only /setname.
2022-02-26 15:51:42 -05:00
June McEnroe
073cebec7a Factor out input handling to input.c 2022-02-19 20:20:19 -05:00
June McEnroe
3359a5d69b Factor out window management to window.c 2022-02-19 18:28:45 -05:00
June McEnroe
397b4ce6bd Prompt for empty server or SASL passwords 2022-02-12 13:26:38 -05:00
June McEnroe
605f889ab5 Avoid sending null byte in SASL PLAIN
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-16 14:17:46 -05:00
June McEnroe
e7cec13723 Use Cold for away notices in queries
So that they can be hidden with M-+.
2022-01-16 14:17:03 -05:00
C. McEnroe
bd3e0ac76b Make the /ops response more flavourful
How did this normal sounding format string get in there!
2021-11-16 14:16:43 -05:00
C. McEnroe
d06ac675c6 Handle RPL_WHOISSPECIAL
<https://modern.ircdocs.horse/index.html#rplwhoisspecial-320>
2021-11-10 20:31:27 -05:00
psykose
27b5fd0251 Fix strptime decode for musl libc
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-26 12:27:54 -04:00
C. McEnroe
506c5ad906 Correct handling of colons in SASL PLAIN
Only the first colon should be replaced with a null byte.

Ported from pounce.
2021-09-09 12:44:01 -04:00
C. McEnroe
44457f85c6 Save invited channel for /join 2021-07-02 15:24:11 -04:00
C. McEnroe
e2bebca7dc Handle "\1ACTION\1" empty actions 2021-06-20 19:22:20 -04:00
C. McEnroe
da374e6e61 Don't match actions in notices 2021-06-20 18:17:38 -04:00
C. McEnroe
a5a225c52c Add -m mode option to set user modes 2021-06-18 12:28:09 -04:00
C. McEnroe
d3b2f86a4b Handle 338 as whois reply
Used by Solanum for "actually using host".
2021-06-17 20:18:37 -04:00
C. McEnroe
2dcadaf260 Reset formatting after realname in setname
Missed this one.
2021-06-12 10:35:53 -04:00
C. McEnroe
7e4fa80c96 Avoid trailing comma in whois channels lists
The format of the reply is defined as "<nick> :{[@|+]<channel><space>}".
2021-06-10 19:38:12 -04:00
C. McEnroe
e066a954f5 Replace catf with seprintf 2021-06-09 11:56:35 -04:00
Klemens Nanni
868c604a55 Use reverse video not colors for topic change when disabled
`-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-25 16:11:31 -04:00
Klemens Nanni
f9a36441e0 Use color enum instead of hardcoded value 2021-05-25 14:33:08 -04:00
C. McEnroe
7bacf63d9e Don't require 4 parameters to ERR_USERONCHANNEL
It should have 4, but the handler only uses 3.
2021-05-20 16:38:22 -04:00
C. McEnroe
94f79e889f Reset formatting after realnames 2021-04-27 21:06:16 -04:00
C. McEnroe
63bffae8c1 Always show 341 RPL_INVITING
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-16 16:39:24 -04:00
C. McEnroe
df6bc07f44 Skip STATUSMSG prefixes
This feature is rarely used, so just skip STATUSMSG prefixes in the
target so messages get routed correctly.
2021-04-02 17:26:43 -04:00
C. McEnroe
761979d33e Use separate reply counts for automatic join topics/names
This restores showing the topic and names for automatic joined
channels, while still avoiding touching the windows, by using Cold
heat.
2021-02-21 14:23:17 -05:00
C. McEnroe
180287164c Only treat a single -j join as explicit
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-02-04 21:25:59 -05:00
C. McEnroe
75b0c02227 Add 335 to WHOIS responses
This is used by InspIRCd to indicate if a user is a bot (if it set
user mode +B).
2021-01-28 15:31:00 -05:00
C. McEnroe
6cab788e6a Use Warm heat for replies to user-initiated commands
Otherwise they are invisible with M-+ and commands having no output
is confusing.
2021-01-26 17:24:05 -05:00
C. McEnroe
063f2aaa0c Add -I highlight option and /highlight 2021-01-16 14:15:00 -05:00
C. McEnroe
5a490945ea Rename ignore code to filter 2021-01-16 13:36:39 -05:00
C. McEnroe
763802cae6 Don't pass nick to urlScan for MOTD and help 2021-01-11 17:59:12 -05:00