1
0
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:
Adam
2013-05-18 23:45:10 -04:00
parent be4a39ceb6
commit 2a8202c832
4 changed files with 11 additions and 6 deletions
+9 -3
View File
@@ -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 */