summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorRyan Schmidt <skizzerz@skizzerz.net>2021-10-01 12:18:33 -0700
committerPatrick <tingping@tingping.se>2021-10-01 14:50:44 -0500
commitdd6f53f5040738f1349d4f0147a2204dc6ffab16 (patch)
tree83b016a5e3431cd0e86ace7732250f9d3e235102 /src/common
parent3f07670b34512c9242ae2c20984f38cb453ce51f (diff)
Fix user list not tracking mode changes
The `PREFIX` key in `ISUPPORT` (usually) takes the form
`(modes)prefixes` e.g. `(ov)@+`. The current implementation will
therefore set `serv->nick_modes` to a string like `"(ov"` instead
of the desired `"ov"`. This causes the nick list to not properly
update with which users have which prefix modes. Skip over the
initial `'('` so we capture the correct modes and fix that issue.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/modes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/modes.c b/src/common/modes.c
index 188d2197..756f0858 100644
--- a/src/common/modes.c
+++ b/src/common/modes.c
@@ -880,7 +880,7 @@ inbound_005 (server * serv, char *word[], const message_tags_data *tags_data)
 				g_free (serv->nick_prefixes);
 				g_free (serv->nick_modes);
 				serv->nick_prefixes = g_strdup (pre + 1);
-				serv->nick_modes = g_strdup (tokvalue);
+				serv->nick_modes = g_strdup (tokvalue + 1);
 			} else
 			{
 				/* bad! some ircds don't give us the modes. */