From 2a8202c83251f495191c95ba26428d9e545e252e Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 18 May 2013 23:45:10 -0400 Subject: Give botserv bots assigned by persist the same botmodes as normal bots, fix some typos, remove unused variable --- modules/commands/cs_set.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'modules/commands/cs_set.cpp') 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("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("botmodes")); + ChanServ->Join(ci->c, &status); + } } /* Set the perm mode */ -- cgit