diff options
| author | Adam <Adam@anope.org> | 2011-05-06 18:02:53 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-05-16 04:10:18 -0400 |
| commit | fd4b52ec385167794eaadb18ee635bef757728ee (patch) | |
| tree | 49d3e835b072a10887309d8d9155982a5aa61ed0 /modules | |
| parent | b59602abf85d522bb2f188be70b6cb7c9556a856 (diff) | |
Added os_forbid
Diffstat (limited to 'modules')
50 files changed, 545 insertions, 644 deletions
diff --git a/modules/core/bs_main.cpp b/modules/core/bs_main.cpp index 43c4d8fb2..159adde93 100644 --- a/modules/core/bs_main.cpp +++ b/modules/core/bs_main.cpp @@ -38,16 +38,9 @@ class BotServBotInfo : public BotInfo ChannelInfo *ci = cs_findchan(param); if (ci) { - if (ci->HasFlag(CI_FORBIDDEN) && !c->HasFlag(CFLAG_ALLOW_FORBIDDEN)) + if (ci->HasFlag(CI_SUSPENDED) && !c->HasFlag(CFLAG_ALLOW_SUSPENDED)) { - u->SendMessage(this, _(_(CHAN_X_FORBIDDEN)), ci->name.c_str()); - Log(LOG_COMMAND, "denied", this) << "Access denied for user " << u->GetMask() << " with command " << command << " because of FORBIDDEN channel " << ci->name; - PopLanguage(); - return; - } - else if (ci->HasFlag(CI_SUSPENDED) && !c->HasFlag(CFLAG_ALLOW_SUSPENDED)) - { - u->SendMessage(this, _(_(CHAN_X_FORBIDDEN)), ci->name.c_str()); + u->SendMessage(this, _(_(CHAN_X_SUSPENDED)), ci->name.c_str()); Log(LOG_COMMAND, "denied", this) << "Access denied for user " << u->GetMask() << " with command " << command << " because of SUSPENDED channel " << ci->name; PopLanguage(); return; diff --git a/modules/core/cs_access.cpp b/modules/core/cs_access.cpp index 243d62057..23d8c4e16 100644 --- a/modules/core/cs_access.cpp +++ b/modules/core/cs_access.cpp @@ -202,11 +202,6 @@ class CommandCSAccess : public Command NickAlias *na = findnick(mask); if (!na && mask.find_first_of("!@*") == Anope::string::npos) mask += "!*@*"; - else if (na && na->HasFlag(NS_FORBIDDEN)) - { - source.Reply(_(NICK_X_FORBIDDEN), mask.c_str()); - return MOD_CONT; - } ChanAccess *access = ci->GetAccess(mask, 0, false); if (access) diff --git a/modules/core/cs_akick.cpp b/modules/core/cs_akick.cpp index 8650aebd4..149e782a9 100644 --- a/modules/core/cs_akick.cpp +++ b/modules/core/cs_akick.cpp @@ -181,15 +181,7 @@ class CommandCSAKick : public Command mask = nick + "!" + user + "@" + host; } else - { - if (na->HasFlag(NS_FORBIDDEN)) - { - source.Reply(_(NICK_X_FORBIDDEN), mask.c_str()); - return; - } - nc = na->nc; - } /* Check excepts BEFORE we get this far */ if (ci->c) @@ -240,16 +232,13 @@ class CommandCSAKick : public Command * or higher access. - Viper */ for (nickalias_map::const_iterator it = NickAliasList.begin(), it_end = NickAliasList.end(); it != it_end; ++it) { - NickAlias *na2 = it->second; - - if (na2->HasFlag(NS_FORBIDDEN)) - continue; + na = it->second; - ChanAccess *na2_access = ci->GetAccess(na2->nc), *u_access = ci->GetAccess(u); - int16 na2_level = na2_access ? na2_access->level : 0, u_level = u_access ? u_access->level : 0; - if (na2->nc && (na2->nc == ci->founder || na2_level >= u_level)) + ChanAccess *na_access = ci->GetAccess(na->nc), *u_access = ci->GetAccess(u); + int16 na_level = na_access ? na_access->level : 0, u_level = u_access ? u_access->level : 0; + if (na->nc && (na->nc == ci->founder || na_level >= u_level)) { - Anope::string buf = na2->nick + "!" + na2->last_usermask; + Anope::string buf = na->nick + "!" + na->last_usermask; if (Anope::Match(buf, mask)) { source.Reply(_(ACCESS_DENIED)); diff --git a/modules/core/cs_drop.cpp b/modules/core/cs_drop.cpp index 3a1026f21..a13006196 100644 --- a/modules/core/cs_drop.cpp +++ b/modules/core/cs_drop.cpp @@ -19,7 +19,6 @@ class CommandCSDrop : public Command public: CommandCSDrop() : Command("DROP", 1, 1) { - this->SetFlag(CFLAG_ALLOW_FORBIDDEN); this->SetFlag(CFLAG_ALLOW_SUSPENDED); this->SetDesc(_("Cancel the registration of a channel")); } @@ -39,15 +38,9 @@ class CommandCSDrop : public Command ci = cs_findchan(chan); - if (ci->HasFlag(CI_FORBIDDEN) && !u->HasCommand("chanserv/drop")) - { - source.Reply(_(CHAN_X_FORBIDDEN), chan.c_str()); - return MOD_CONT; - } - if (ci->HasFlag(CI_SUSPENDED) && !u->HasCommand("chanserv/drop")) { - source.Reply(_(CHAN_X_FORBIDDEN), chan.c_str()); + source.Reply(_(CHAN_X_SUSPENDED), chan.c_str()); return MOD_CONT; } @@ -60,12 +53,6 @@ class CommandCSDrop : public Command if (ci->c && ModeManager::FindChannelModeByName(CMODE_REGISTERED)) ci->c->RemoveMode(NULL, CMODE_REGISTERED, "", false); - if (ircd->chansqline && ci->HasFlag(CI_FORBIDDEN)) - { - XLine x(ci->name); - ircdproto->SendSQLineDel(&x); - } - bool override = (ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !check_access(u, ci, CA_FOUNDER)); Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "founder: " << (ci->founder ? ci->founder->display : "none"); diff --git a/modules/core/cs_forbid.cpp b/modules/core/cs_forbid.cpp deleted file mode 100644 index e7f2b7894..000000000 --- a/modules/core/cs_forbid.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* ChanServ core functions - * - * (C) 2003-2011 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - */ - -/*************************************************************************/ - -#include "module.h" -#include "chanserv.h" - -class CommandCSForbid : public Command -{ - public: - CommandCSForbid() : Command("FORBID", 1, 2, "chanserv/forbid") - { - this->SetFlag(CFLAG_ALLOW_UNREGISTEREDCHANNEL); - this->SetDesc(_("Prevent a channel from being used")); - } - - CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) - { - const Anope::string &chan = params[0]; - const Anope::string &reason = params.size() > 1 ? params[1] : ""; - - User *u = source.u; - ChannelInfo *ci = source.ci; - - if (Config->ForceForbidReason && reason.empty()) - { - SyntaxError(source, "FORBID", _("FORBID \037channel\037 \037reason\037")); - return MOD_CONT; - } - - if (chan[0] != '#') - { - source.Reply(_(CHAN_SYMBOL_REQUIRED)); - return MOD_CONT; - } - - if (readonly) - { - source.Reply(_(READ_ONLY_MODE)); - return MOD_CONT; - } - - if ((ci = cs_findchan(chan))) - delete ci; - - ci = new ChannelInfo(chan); - ci->SetFlag(CI_FORBIDDEN); - ci->forbidby = u->nick; - ci->forbidreason = reason; - - Channel *c = ci->c; - if (c) - { - /* Before banning everyone, it might be prudent to clear +e and +I lists.. - * to prevent ppl from rejoining.. ~ Viper */ - std::pair<Channel::ModeList::iterator, Channel::ModeList::iterator> modes = c->GetModeList(CMODE_EXCEPT); - for (; modes.first != modes.second; ++modes.first) - c->RemoveMode(NULL, CMODE_EXCEPT, modes.first->second); - modes = c->GetModeList(CMODE_INVITEOVERRIDE); - for (; modes.first != modes.second; ++modes.first) - c->RemoveMode(NULL, CMODE_INVITEOVERRIDE, modes.first->second); - - for (CUserList::iterator it = c->users.begin(), it_end = c->users.end(); it != it_end; ) - { - UserContainer *uc = *it++; - - if (uc->user->HasMode(UMODE_OPER)) - continue; - - c->Kick(chanserv->Bot(), uc->user, "%s", !reason.empty() ? reason.c_str() : GetString(uc->user->Account(), "This channel has been forbidden.").c_str()); - } - } - - if (ircd->chansqline) - { - XLine x(chan, "Forbidden"); - ircdproto->SendSQLine(NULL, &x); - } - - Log(LOG_ADMIN, u, this, ci) << (!ci->forbidreason.empty() ? ci->forbidreason : "No reason"); - - source.Reply(_("Channel \002%s\002 is now forbidden."), chan.c_str()); - - FOREACH_MOD(I_OnChanForbidden, OnChanForbidden(ci)); - - return MOD_CONT; - } - - bool OnHelp(CommandSource &source, const Anope::string &subcommand) - { - source.Reply(_("Syntax: \002FORBID \037channel\037 [\037reason\037]\002\n" - " \n" - "Disallows anyone from registering or using the given\n" - "channel. May be cancelled by dropping the channel.\n" - " \n" - "Reason may be required on certain networks.")); - return true; - } - - void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) - { - SyntaxError(source, "FORBID", _("FORBID \037channel\037 [\037reason\037]")); - } -}; - -class CSForbid : public Module -{ - CommandCSForbid commandcsforbid; - - public: - CSForbid(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE) - { - this->SetAuthor("Anope"); - - if (!chanserv) - throw ModuleException("ChanServ is not loaded!"); - - this->AddCommand(chanserv->Bot(), &commandcsforbid); - } -}; - -MODULE_INIT(CSForbid) diff --git a/modules/core/cs_info.cpp b/modules/core/cs_info.cpp index 71a8b132f..ba26a8c77 100644 --- a/modules/core/cs_info.cpp +++ b/modules/core/cs_info.cpp @@ -32,7 +32,6 @@ class CommandCSInfo : public Command { this->SetFlag(CFLAG_ALLOW_UNREGISTERED); this->SetFlag(CFLAG_ALLOW_SUSPENDED); - this->SetFlag(CFLAG_ALLOW_FORBIDDEN); this->SetDesc(_("Lists information about the named registered channel")); } @@ -46,16 +45,6 @@ class CommandCSInfo : public Command bool has_auspex = u->IsIdentified() && u->HasPriv("chanserv/auspex"); bool show_all = false; - if (ci->HasFlag(CI_FORBIDDEN)) - { - if (u->HasMode(UMODE_OPER) && !ci->forbidby.empty()) - source.Reply(_(CHAN_X_FORBIDDEN_OPER), chan.c_str(), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : _(NO_REASON)); - else - source.Reply(_(CHAN_X_FORBIDDEN), chan.c_str()); - - return MOD_CONT; - } - /* Should we show all fields? Only for sadmins and identified users */ if (has_auspex || check_access(u, ci, CA_INFO)) show_all = true; @@ -106,7 +95,12 @@ class CommandCSInfo : public Command source.Reply(_(" Expires on: %s"), do_strftime(ci->last_used + Config->CSExpire).c_str()); } if (ci->HasFlag(CI_SUSPENDED)) - source.Reply(_(" Suspended: [%s] %s"), ci->forbidby.c_str(), !ci->forbidreason.empty() ? ci->forbidreason.c_str() : _(NO_REASON)); + { + Anope::string by, reason; + ci->GetExtRegular("suspend_by", by); + ci->GetExtRegular("suspend_reason", reason); + source.Reply(_(" Suspended: [%s] %s"), by.c_str(), !reason.empty() ? reason.c_str() : _(NO_REASON)); + } FOREACH_MOD(I_OnChanInfo, OnChanInfo(source, ci, show_all)); diff --git a/modules/core/cs_list.cpp b/modules/core/cs_list.cpp index e434abf80..7e9a7b21e 100644 --- a/modules/core/cs_list.cpp +++ b/modules/core/cs_list.cpp @@ -29,10 +29,9 @@ class CommandCSList : public Command Anope::string pattern = params[0]; unsigned nchans; - char buf[BUFSIZE]; bool is_servadmin = u->HasCommand("chanserv/list"); int count = 0, from = 0, to = 0; - bool forbidden = false, suspended = false, channoexpire = false; + bool suspended = false, channoexpire = false; if (Config->CSListOpersOnly && !u->HasMode(UMODE_OPER)) { @@ -69,8 +68,6 @@ class CommandCSList : public Command spacesepstream keywords(params[1]); while (keywords.GetToken(keyword)) { - if (keyword.equals_ci("FORBIDDEN")) - forbidden = true; if (keyword.equals_ci("SUSPENDED")) suspended = true; if (keyword.equals_ci("NOEXPIRE")) @@ -86,9 +83,7 @@ class CommandCSList : public Command { ChannelInfo *ci = it->second; - if (!is_servadmin && (ci->HasFlag(CI_PRIVATE) || ci->HasFlag(CI_FORBIDDEN) || ci->HasFlag(CI_SUSPENDED))) - continue; - if (forbidden && !ci->HasFlag(CI_FORBIDDEN)) + if (!is_servadmin && (ci->HasFlag(CI_PRIVATE) || ci->HasFlag(CI_SUSPENDED))) continue; else if (suspended && !ci->HasFlag(CI_SUSPENDED)) continue; @@ -103,14 +98,13 @@ class CommandCSList : public Command if (is_servadmin && (ci->HasFlag(CI_NO_EXPIRE))) noexpire_char = '!'; - if (ci->HasFlag(CI_FORBIDDEN)) - snprintf(buf, sizeof(buf), "%-20s [Forbidden]", ci->name.c_str()); - else if (ci->HasFlag(CI_SUSPENDED)) - snprintf(buf, sizeof(buf), "%-20s [Suspended]", ci->name.c_str()); + Anope::string buf; + if (ci->HasFlag(CI_SUSPENDED)) + buf = Anope::printf("%-20s [Suspended]", ci->name.c_str()); else - snprintf(buf, sizeof(buf), "%-20s %s", ci->name.c_str(), !ci->desc.empty() ? ci->desc.c_str() : ""); + buf = Anope::printf("%-20s %s", ci->name.c_str(), !ci->desc.empty() ? ci->desc.c_str() : ""); - source.Reply(" %c%s", noexpire_char, buf); + source.Reply(" %c%s", noexpire_char, buf.c_str()); } ++count; } diff --git a/modules/core/cs_main.cpp b/modules/core/cs_main.cpp index 20da089df..766f696a8 100644 --- a/modules/core/cs_main.cpp +++ b/modules/core/cs_main.cpp @@ -44,16 +44,9 @@ class ChanServBotInfo : public BotInfo ChannelInfo *ci = cs_findchan(param); if (ci) { - if (ci->HasFlag(CI_FORBIDDEN) && !c->HasFlag(CFLAG_ALLOW_FORBIDDEN)) + if (ci->HasFlag(CI_SUSPENDED) && !c->HasFlag(CFLAG_ALLOW_SUSPENDED)) { - u->SendMessage(this, _(_(CHAN_X_FORBIDDEN)), ci->name.c_str()); - Log(LOG_COMMAND, "denied", this) << "Access denied for user " << u->GetMask() << " with command " << command << " because of FORBIDDEN channel " << ci->name; - PopLanguage(); - return; - } - else if (ci->HasFlag(CI_SUSPENDED) && !c->HasFlag(CFLAG_ALLOW_SUSPENDED)) - { - u->SendMessage(this, _(_(CHAN_X_FORBIDDEN)), ci->name.c_str()); + u->SendMessage(this, _(_(CHAN_X_SUSPENDED)), ci->name.c_str()); Log(LOG_COMMAND, "denied", this) << "Access denied for user " << u->GetMask() << " with command " << command << " because of SUSPENDED channel " << ci->name; PopLanguage(); return; @@ -113,11 +106,6 @@ class ExpireCallback : public CallBack if (Config->CSSuspendExpire && Anope::CurTime - ci->last_used >= Config->CSSuspendExpire) expire = true; } - else if (ci->HasFlag(CI_FORBIDDEN)) - { - if (Config->CSForbidExpire && Anope::CurTime - ci->last_used >= Config->CSForbidExpire) - expire = true; - } else if (!ci->c && Anope::CurTime - ci->last_used >= Config->CSExpire) expire = true; @@ -132,9 +120,7 @@ class ExpireCallback : public CallBack continue; Anope::string extra; - if (ci->HasFlag(CI_FORBIDDEN)) - extra = "forbidden "; - else if (ci->HasFlag(CI_SUSPENDED)) + if (ci->HasFlag(CI_SUSPENDED)) extra = "suspended "; Log(LOG_NORMAL, "chanserv/expire", ChanServ) << "Expiring " << extra << "channel " << ci->name << " (founder: " << (ci->founder ? ci->founder->display : "(none)") << ")"; diff --git a/modules/core/cs_set_founder.cpp b/modules/core/cs_set_founder.cpp index e6430eb99..88ddabd86 100644 --- a/modules/core/cs_set_founder.cpp +++ b/modules/core/cs_set_founder.cpp @@ -43,11 +43,6 @@ class CommandCSSetFounder : public Command source.Reply(_(NICK_X_NOT_REGISTERED), params[1].c_str()); return MOD_CONT; } - else if (na->HasFlag(NS_FORBIDDEN)) - { - source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str()); - return MOD_CONT; - } nc = na->nc; if (Config->CSMaxReg && nc->channelcount >= Config->CSMaxReg && !u->HasPriv("chanserv/no-register-limit")) diff --git a/modules/core/cs_set_successor.cpp b/modules/core/cs_set_successor.cpp index a9a1e7498..25ee2b098 100644 --- a/modules/core/cs_set_successor.cpp +++ b/modules/core/cs_set_successor.cpp @@ -46,11 +46,6 @@ class CommandCSSetSuccessor : public Command source.Reply(_(NICK_X_NOT_REGISTERED), params[1].c_str()); return MOD_CONT; } - if (na->HasFlag(NS_FORBIDDEN)) - { - source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str()); - return MOD_CONT; - } if (na->nc == ci->founder) { source.Reply(_("%s cannot be the successor on channel %s because he is its founder."), na->nick.c_str(), ci->name.c_str()); diff --git a/modules/core/cs_suspend.cpp b/modules/core/cs_suspend.cpp index 374e44bc2..1836da858 100644 --- a/modules/core/cs_suspend.cpp +++ b/modules/core/cs_suspend.cpp @@ -37,20 +37,13 @@ class CommandCSSuspend : public Command return MOD_CONT; } - /* You should not SUSPEND a FORBIDEN channel */ - if (ci->HasFlag(CI_FORBIDDEN)) - { - source.Reply(_("Channel \002%s\002 may not be registered."), ci->name.c_str()); - return MOD_CONT; - } - if (readonly) source.Reply(_(READ_ONLY_MODE)); ci->SetFlag(CI_SUSPENDED); - ci->forbidby = u->nick; + ci->Extend("suspend_by", new ExtensibleItemRegular<Anope::string>(u->nick)); if (!reason.empty()) - ci->forbidreason = reason; + ci->Extend("suspend_reason", new ExtensibleItemRegular<Anope::string>(u->nick)); if (c) { @@ -115,11 +108,14 @@ class CommandCSUnSuspend : public Command return MOD_CONT; } - Log(LOG_ADMIN, u, this, ci) << " was suspended for: " << (!ci->forbidreason.empty() ? ci->forbidreason : "No reason"); + Anope::string by, reason; + ci->GetExtRegular("suspend_by", by); + ci->GetExtRegular("suspend_reason", reason); + Log(LOG_ADMIN, u, this, ci) << " which was suspended by " << by << " for: " << (!reason.empty() ? reason : "No reason"); ci->UnsetFlag(CI_SUSPENDED); - ci->forbidreason.clear(); - ci->forbidby.clear(); + ci->Shrink("suspend_by"); + ci->Shrink("suspend_reason"); source.Reply(_("Channel \002%s\002 is now released."), ci->name.c_str()); diff --git a/modules/core/cs_xop.cpp b/modules/core/cs_xop.cpp index 72471a868..666cb4da1 100644 --- a/modules/core/cs_xop.cpp +++ b/modules/core/cs_xop.cpp @@ -141,11 +141,6 @@ class XOPBase : public Command NickAlias *na = findnick(mask); if (!na && mask.find_first_of("!@*") == Anope::string::npos) mask += "!*@*"; - else if (na && na->HasFlag(NS_FORBIDDEN)) - { - source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str()); - return MOD_CONT; - } access = ci->GetAccess(mask, 0, false); if (access) diff --git a/modules/core/db_mysql.cpp b/modules/core/db_mysql.cpp index 386e20740..746dd8f25 100644 --- a/modules/core/db_mysql.cpp +++ b/modules/core/db_mysql.cpp @@ -348,8 +348,6 @@ class DBMySQL : public Module ci->last_topic = r.Get(i, "last_topic"); ci->last_topic_setter = r.Get(i, "last_topic_setter"); ci->last_topic_time = r.Get(i, "last_topic_time").is_number_only() ? convertTo<int>(r.Get(i, "last_topic_time")) : Anope::CurTime; - ci->forbidby = r.Get(i, "forbidby"); - ci->forbidreason = r.Get(i, "forbidreason"); ci->bantype = r.Get(i, "bantype").is_number_only() ? convertTo<int>(r.Get(i, "bantype")) : 2; ci->memos.memomax = r.Get(i, "memomax").is_number_only() ? convertTo<int16>(r.Get(i, "memomax")) : 20; ci->capsmin = r.Get(i, "capsmin").is_number_only() ? convertTo<int>(r.Get(i, "capsmin")) : 0; @@ -1080,13 +1078,11 @@ class DBMySQL : public Module void OnChanForbidden(ChannelInfo *ci) { - SQLQuery query("INSERT INTO `anope_cs_info` (name, time_registered, last_used, flags, forbidby, forbidreason) VALUES (@name, @time_registered, @last_used, @flags, @forbidby, @forbidreason)"); + SQLQuery query("INSERT INTO `anope_cs_info` (name, time_registered, last_used, flags) VALUES (@name, @time_registered, @last_used, @flags)"); query.setValue("name", ci->name); query.setValue("time_registered", ci->time_registered); query.setValue("last_used", ci->last_used); query.setValue("flags", ToString(ci->ToString())); - query.setValue("forbidby", ci->forbidby); - query.setValue("forbidreason", ci->forbidreason); this->RunQuery(query); } @@ -1099,7 +1095,7 @@ class DBMySQL : public Module void OnChanRegistered(ChannelInfo *ci) { - SQLQuery query("INSERT INTO `anope_cs_info` (name, founder, successor, descr, time_registered, last_used, last_topic, last_topic_setter, last_topic_time, flags, forbidby, forbidreason, bantype, memomax, botnick, botflags, capsmin, capspercent, floodlines, floodsecs, repeattimes) VALUES(@name, @founder, @successor, @descr, @time_registered, @last_used, @last_topic_text, @last_topic_setter, @last_topic_time, @flags, @forbidby, @forbidreason, @bantype, @memomax, @botnick, @botflags, @capsmin, @capspercent, @floodlines, @floodsecs, @repeattimes) ON DUPLICATE KEY UPDATE founder=VALUES(founder), successor=VALUES(successor), descr=VALUES(descr), time_registered=VALUES(time_registered), last_used=VALUES(last_used), last_topic=VALUES(last_topic), last_topic_setter=VALUES(last_topic_setter), last_topic_time=VALUES(last_topic_time), flags=VALUES(flags), forbidby=VALUES(forbidby), forbidreason=VALUES(forbidreason), bantype=VALUES(bantype), memomax=VALUES(memomax), botnick=VALUES(botnick), botflags=VALUES(botflags), capsmin=VALUES(capsmin), capspercent=VALUES(capspercent), floodlines=VALUES(floodlines), floodsecs=VALUES(floodsecs), repeattimes=VALUES(repeattimes)"); + SQLQuery query("INSERT INTO `anope_cs_info` (name, founder, successor, descr, time_registered, last_used, last_topic, last_topic_setter, last_topic_time, flags, bantype, memomax, botnick, botflags, capsmin, capspercent, floodlines, floodsecs, repeattimes) VALUES(@name, @founder, @successor, @descr, @time_registered, @last_used, @last_topic_text, @last_topic_setter, @last_topic_time, @flags, @bantype, @memomax, @botnick, @botflags, @capsmin, @capspercent, @floodlines, @floodsecs, @repeattimes) ON DUPLICATE KEY UPDATE founder=VALUES(founder), successor=VALUES(successor), descr=VALUES(descr), time_registered=VALUES(time_registered), last_used=VALUES(last_used), last_topic=VALUES(last_topic), last_topic_setter=VALUES(last_topic_setter), last_topic_time=VALUES(last_topic_time), flags=VALUES(flags), bantype=VALUES(bantype), memomax=VALUES(memomax), botnick=VALUES(botnick), botflags=VALUES(botflags), capsmin=VALUES(capsmin), capspercent=VALUES(capspercent), floodlines=VALUES(floodlines), floodsecs=VALUES(floodsecs), repeattimes=VALUES(repeattimes)"); query.setValue("name", ci->name); query.setValue("founder", ci->founder ? ci->founder->display : ""); query.setValue("successor", ci->successor ? ci->successor->display : ""); @@ -1110,8 +1106,6 @@ class DBMySQL : public Module query.setValue("last_topic_setter", ci-&g |
