summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/users.h7
-rw-r--r--src/users.cpp2
2 files changed, 8 insertions, 1 deletions
diff --git a/include/users.h b/include/users.h
index 21214062c..f516a8038 100644
--- a/include/users.h
+++ b/include/users.h
@@ -681,6 +681,13 @@ class CoreExport User : public connection
*/
bool exempt;
+ /** If this bool is set for a user, then the user is under penalty, in short they
+ * are waiting for some held commands to be executed. If this is the case, then
+ * any commands they have in their sendq are executed on a timer tick rather than in
+ * their event handler.
+ */
+ bool UnderPenalty;
+
/** Default constructor
* @throw CoreException if the UID allocated to the user already exists
* @param Instance Creator instance
diff --git a/src/users.cpp b/src/users.cpp
index 78af0ba8d..f2eb5ba8f 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -177,7 +177,7 @@ User::User(InspIRCd* Instance, const std::string &uid) : ServerInstance(Instance
age = ServerInstance->Time(true);
lines_in = lastping = signon = idle_lastmsg = nping = registered = 0;
ChannelCount = timeout = flood = bytes_in = bytes_out = cmds_in = cmds_out = 0;
- muted = exempt = haspassed = dns_done = false;
+ UnderPenalty = muted = exempt = haspassed = dns_done = false;
fd = -1;
recvq.clear();
sendq.clear();