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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user