diff options
author | Adam <Adam@anope.org> | 2012-04-23 05:08:26 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-04-23 05:08:26 -0400 |
commit | 573e49a7ead331219eb6f0d3ca9cf83e793a5c9c (patch) | |
tree | e145e04fa3d041cf92ce46da4ac790b63231059c /modules/commands/cs_register.cpp | |
parent | 63c639e108a00d7dbb0d7ac9891684fc83a3b207 (diff) |
Reworked live SQL support yet again
Diffstat (limited to 'modules/commands/cs_register.cpp')
-rw-r--r-- | modules/commands/cs_register.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/commands/cs_register.cpp b/modules/commands/cs_register.cpp index 570fd8125..fd62ff754 100644 --- a/modules/commands/cs_register.cpp +++ b/modules/commands/cs_register.cpp @@ -46,7 +46,7 @@ class CommandCSRegister : public Command else if (c && !c->HasUserStatus(u, CMODE_OP)) source.Reply(_("You must be a channel operator to register the channel.")); else if (Config->CSMaxReg && u->Account()->channelcount >= Config->CSMaxReg && !u->HasPriv("chanserv/no-register-limit")) - source.Reply(u->Account()->channelcount > Config->CSMaxReg ? CHAN_EXCEEDED_CHANNEL_LIMIT : _(CHAN_REACHED_CHANNEL_LIMIT), Config->CSMaxReg); + source.Reply(u->Account()->channelcount > Config->CSMaxReg ? CHAN_EXCEEDED_CHANNEL_LIMIT : CHAN_REACHED_CHANNEL_LIMIT, Config->CSMaxReg); else { ci = new ChannelInfo(chan); @@ -54,11 +54,12 @@ class CommandCSRegister : public Command if (!chdesc.empty()) ci->desc = chdesc; - ci->mode_locks = def_mode_locks; - for (ChannelInfo::ModeList::iterator it = ci->mode_locks.begin(), it_end = ci->mode_locks.end(); it != it_end; ++it) + for (ChannelInfo::ModeList::iterator it = def_mode_locks.begin(), it_end = def_mode_locks.end(); it != it_end; ++it) { - it->second.setter = u->nick; - it->second.ci = ci; + ModeLock *ml = new ModeLock(*it->second); + ml->setter = u->nick; + ml->ci = ci; + ci->mode_locks->insert(std::make_pair(it->first, ml)); } if (c && !c->topic.empty()) |