diff options
author | Adam <Adam@anope.org> | 2013-05-18 23:45:10 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-18 23:45:10 -0400 |
commit | 2a8202c83251f495191c95ba26428d9e545e252e (patch) | |
tree | ef3531ad944e7af884129918363a61372b81716e /modules/commands/cs_set.cpp | |
parent | be4a39ceb6f1abb7e558eaeb46168ef5dbbe9809 (diff) |
Give botserv bots assigned by persist the same botmodes as normal bots, fix some typos, remove unused variable
Diffstat (limited to 'modules/commands/cs_set.cpp')
-rw-r--r-- | modules/commands/cs_set.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp index 4c49c9a21..028ff0069 100644 --- a/modules/commands/cs_set.cpp +++ b/modules/commands/cs_set.cpp @@ -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 */ |