mirror of
https://github.com/anope/anope.git
synced 2026-07-09 23:23:13 +02:00
Give botserv bots assigned by persist the same botmodes as normal bots, fix some typos, remove unused variable
This commit is contained in:
@@ -504,11 +504,14 @@ class CommandCSSetPersist : public Command
|
||||
bool created;
|
||||
Channel *c = Channel::FindOrCreate(ci->name, created);
|
||||
if (ci->bi)
|
||||
ci->bi->Join(c);
|
||||
{
|
||||
ChannelStatus status(Config->GetModule("botserv")->Get<const Anope::string>("botmodes"));
|
||||
ci->bi->Join(c, &status);
|
||||
}
|
||||
}
|
||||
|
||||
/* No botserv bot, no channel mode, give them ChanServ.
|
||||
* Yes, this works fine with no Config->BotServ.
|
||||
* Yes, this works fine with no BotServ.
|
||||
*/
|
||||
if (!ci->bi && !cm)
|
||||
{
|
||||
@@ -519,7 +522,10 @@ class CommandCSSetPersist : public Command
|
||||
}
|
||||
ChanServ->Assign(NULL, ci);
|
||||
if (!ci->c->FindUser(ChanServ))
|
||||
ChanServ->Join(ci->c);
|
||||
{
|
||||
ChannelStatus status(Config->GetModule("botserv")->Get<const Anope::string>("botmodes"));
|
||||
ChanServ->Join(ci->c, &status);
|
||||
}
|
||||
}
|
||||
|
||||
/* Set the perm mode */
|
||||
|
||||
Reference in New Issue
Block a user