From 4a4c0886cc7108578c1d7dc55a7a6a562a9459b9 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 15 Dec 2010 12:18:20 -0500 Subject: Bug #1212 - Fixed some bad logic in /os exception preventing valid exceptions from being added --- modules/core/os_session.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/core/os_session.cpp b/modules/core/os_session.cpp index bde023aaa..8b2cb53af 100644 --- a/modules/core/os_session.cpp +++ b/modules/core/os_session.cpp @@ -256,7 +256,7 @@ class CommandOSException : public Command } else { - if (mask.find('!') == Anope::string::npos || mask.find('@') == Anope::string::npos) + if (mask.find('!') != Anope::string::npos || mask.find('@') != Anope::string::npos) { source.Reply(OPER_EXCEPTION_INVALID_HOSTMASK); return MOD_CONT; -- cgit From eb9b12ed113a238662000cf9ff38e4762a3595a1 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 15 Dec 2010 12:47:35 -0500 Subject: Bug #1211 - Fixed loading and saving anope_os_sxlines --- modules/extra/db_mysql.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules') diff --git a/modules/extra/db_mysql.cpp b/modules/extra/db_mysql.cpp index 93f540be3..07135757c 100644 --- a/modules/extra/db_mysql.cpp +++ b/modules/extra/db_mysql.cpp @@ -890,15 +890,15 @@ class DBMySQL : public Module Anope::string by = r.Get(i, "xby"); Anope::string reason = r.Get(i, "reason"); time_t seton = r.Get(i, "seton").is_pos_number_only() ? convertTo(r.Get(i, "seton")) : Anope::CurTime; - time_t expires = r.Get(i, "expires").is_pos_number_only() ? convertTo(r.Get(i, "expires")) : Anope::CurTime; + time_t expires = r.Get(i, "expire").is_pos_number_only() ? convertTo(r.Get(i, "expire")) : Anope::CurTime; XLine *x = NULL; if (SNLine && r.Get(i, "type").equals_cs("SNLINE")) - SNLine->Add(NULL, NULL, mask, expires, reason); + x = SNLine->Add(NULL, NULL, mask, expires, reason); else if (SQLine && r.Get(i, "type").equals_cs("SQLINE")) - SQLine->Add(NULL, NULL, mask, expires, reason); + x = SQLine->Add(NULL, NULL, mask, expires, reason); else if (SZLine && r.Get(i, "type").equals_cs("SZLINE")) - SZLine->Add(NULL, NULL, mask, expires, reason); + x = SZLine->Add(NULL, NULL, mask, expires, reason); if (x) { x->By = by; @@ -1418,7 +1418,7 @@ class DBMySQL : public Module EventReturn OnAddXLine(User *, XLine *x, XLineType Type) { - this->RunQuery(Anope::string("INSERT INTO `anope_os_sxlines` (type, mask, xby, reason, seton, expire) VALUES('") + + this->RunQuery(Anope::string("INSERT INTO `anope_os_xlines` (type, mask, xby, reason, seton, expire) VALUES('") + (Type == X_SNLINE ? "SNLINE" : (Type == X_SQLINE ? "SQLINE" : "SZLINE")) + "', '" + this->Escape(x->Mask) + "', '" + this->Escape(x->By) + "', '" + this->Escape(x->Reason) + "', " + stringify(x->Created) + ", " + stringify(x->Expires) + ")"); -- cgit From 0d20c4770350f30cfa5563c913464a37fdf9a067 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 18 Dec 2010 19:41:13 -0500 Subject: Don't send SXLines until after we start bursting with our uplink --- modules/core/cs_access.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'modules') diff --git a/modules/core/cs_access.cpp b/modules/core/cs_access.cpp index 0f15b1ce5..fac34b263 100644 --- a/modules/core/cs_access.cpp +++ b/modules/core/cs_access.cpp @@ -80,7 +80,6 @@ class AccessViewCallback : public AccessListCallback static void DoList(CommandSource &source, unsigned Number, ChanAccess *access) { - User *u = source.u; ChannelInfo *ci = source.ci; Anope::string timebuf; if (ci->c && nc_on_chan(ci->c, access->nc)) -- cgit