1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-09 12:13:12 +02:00

Fix +H not working in set::modes-on-join.

Reported by ZarTek-Creole in https://bugs.unrealircd.org/view.php?id=6114

We now call HOOKTYPE_LOCAL_CHANMODE on the modes we set in modes-on-join,
where 'client' is '&me'. Should be fine, as we already did the same for
+P modes (indirectly) in channeldb.
This commit is contained in:
Bram Matthys
2022-05-26 07:14:12 +02:00
parent 1548137e31
commit fe11f77be6
+2
View File
@@ -262,6 +262,7 @@ void _join_channel(Channel *channel, Client *client, MessageTag *recv_mtags, con
MessageTag *mtags_mode = NULL;
Cmode *cm;
char modebuf[BUFSIZE], parabuf[BUFSIZE];
int should_destroy = 0;
channel->mode.mode = MODES_ON_JOIN;
@@ -281,6 +282,7 @@ void _join_channel(Channel *channel, Client *client, MessageTag *recv_mtags, con
sendto_server(NULL, 0, 0, mtags_mode, ":%s MODE %s %s %s %lld",
me.id, channel->name, modebuf, parabuf, (long long)channel->creationtime);
sendto_one(client, mtags_mode, ":%s MODE %s %s %s", me.name, channel->name, modebuf, parabuf);
RunHook(HOOKTYPE_LOCAL_CHANMODE, &me, channel, mtags_mode, modebuf, parabuf, 0, 0, &should_destroy);
free_message_tags(mtags_mode);
}