diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-12-01 18:10:22 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-12-01 18:10:22 +0000 |
commit | fc7eba500a05eaf51a0f72d6ca1e91085698b38a (patch) | |
tree | 14a096eb36d69a18e33dfe5a0cb99e92a2729210 | |
parent | f58879f3591b2ee296561bd0879832ae45cec49d (diff) |
Remove OverPenalty, saves sizeof(bool) per user.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10836 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/users.h | 4 | ||||
-rw-r--r-- | src/command_parse.cpp | 2 | ||||
-rw-r--r-- | src/userprocess.cpp | 8 | ||||
-rw-r--r-- | src/users.cpp | 2 |
4 files changed, 2 insertions, 14 deletions
diff --git a/include/users.h b/include/users.h index 35c2647d8..729121bea 100644 --- a/include/users.h +++ b/include/users.h @@ -693,10 +693,6 @@ class CoreExport User : public EventHandler */ int Penalty; - /** True if we are flushing penalty lines - */ - bool OverPenalty; - /** If this bool is set then penalty rules do not apply to this user */ bool ExemptFromPenalty; diff --git a/src/command_parse.cpp b/src/command_parse.cpp index e6b38242c..886824d20 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -356,8 +356,6 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd) { user->IncreasePenalty(cm->second->Penalty); do_more = (user->Penalty < 10); - if (!do_more) - user->OverPenalty = true; } /* activity resets the ping pending timer */ diff --git a/src/userprocess.cpp b/src/userprocess.cpp index b179622aa..1f6eac6e9 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -131,7 +131,7 @@ void ProcessUserHandler::Call(User* cu) } /* If user is over penalty, dont process here, just build up */ - if (!current->OverPenalty) + if (!curr->Penalty < 10) Server->Parser->DoLines(current); return; @@ -180,12 +180,6 @@ void InspIRCd::DoBackgroundUserStuff() Parser->DoLines(curr, true); } - if (curr->OverPenalty) - { - if (curr->sendq.empty()) - curr->OverPenalty = false; - } - switch (curr->registered) { case REG_ALL: diff --git a/src/users.cpp b/src/users.cpp index a8a1ba6b3..18ab02837 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -214,7 +214,7 @@ User::User(InspIRCd* Instance, const std::string &uid) : ServerInstance(Instance Penalty = 0; lines_in = lastping = signon = idle_lastmsg = nping = registered = 0; bytes_in = bytes_out = cmds_in = cmds_out = 0; - quietquit = OverPenalty = ExemptFromPenalty = quitting = exempt = haspassed = dns_done = false; + quietquit = ExemptFromPenalty = quitting = exempt = haspassed = dns_done = false; fd = -1; recvq.clear(); sendq.clear(); |