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

Specifying multiple channels ("#one,#two") in set::auto-join,

set::oper-auto-join or tld::channel was broken. It worked for the
very first user since boot or rehash, but after that only the
first channel was joined. Reported by PeGaSuS in
https://bugs.unrealircd.org/view.php?id=5535
This commit is contained in:
Bram Matthys
2020-01-20 15:41:12 +01:00
parent f3019f89a1
commit d30f7e006d
2 changed files with 17 additions and 10 deletions
+5 -3
View File
@@ -299,12 +299,14 @@ CMD_FUNC(cmd_oper)
if (!BadPtr(OPER_AUTO_JOIN_CHANS) && strcmp(OPER_AUTO_JOIN_CHANS, "0"))
{
char *chans[3] = {
char *chans = strdup(OPER_AUTO_JOIN_CHANS);
char *args[3] = {
client->name,
OPER_AUTO_JOIN_CHANS,
chans,
NULL
};
do_cmd(client, NULL, "JOIN", 3, chans);
do_cmd(client, NULL, "JOIN", 3, args);
safe_free(chans);
/* Theoretically the oper may be killed on join. Would be fun, though */
if (IsDead(client))
return;