summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/command_parse.h10
-rw-r--r--include/users.h12
2 files changed, 15 insertions, 7 deletions
diff --git a/include/command_parse.h b/include/command_parse.h
index be18db4f9..d5c7049db 100644
--- a/include/command_parse.h
+++ b/include/command_parse.h
@@ -54,7 +54,7 @@ class CoreExport CommandParser : public classbase
* @param user The user to parse the command for
* @param cmd The command string to process
*/
- void ProcessCommand(User *user, std::string &cmd);
+ bool ProcessCommand(User *user, std::string &cmd);
/** Finds the init_command symbol in a .so file
* @param v A function pointer to be initialized
@@ -179,7 +179,13 @@ class CoreExport CommandParser : public classbase
* @param buffer The buffer line to process
* @param user The user to whom this line belongs
*/
- void ProcessBuffer(std::string &buffer,User *user);
+ bool ProcessBuffer(std::string &buffer,User *user);
+
+ /** Process lines in a users sendq.
+ * @param current The user to process
+ * @param one_only if one_only is set only one command is processed from the sendq.
+ */
+ void DoLines(User* current, bool one_only = false);
/** Remove all commands relating to module 'source'.
* @param source A module name which has introduced new commands
diff --git a/include/users.h b/include/users.h
index f43c787a0..d927890f0 100644
--- a/include/users.h
+++ b/include/users.h
@@ -681,12 +681,14 @@ 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.
+ /** This value contains how far into the penalty threshold the user is. Once its over
+ * the penalty threshold then commands are held and processed on-timer.
*/
- bool UnderPenalty;
+ 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
*/