summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/cull_list.h14
-rw-r--r--include/modules.h2
-rw-r--r--include/users.h7
3 files changed, 16 insertions, 7 deletions
diff --git a/include/cull_list.h b/include/cull_list.h
index 64e6b3bdb..beafc1e80 100644
--- a/include/cull_list.h
+++ b/include/cull_list.h
@@ -39,6 +39,9 @@ class CullItem : public classbase
/** Holds the quit reason to use for this user.
*/
std::string reason;
+ /** Holds the quit reason opers see, if different from users
+ */
+ std::string oper_reason;
public:
/** Constrcutor.
* Initializes the CullItem with a user pointer
@@ -46,8 +49,8 @@ class CullItem : public classbase
* @param u The user to add
* @param r The quit reason of the added user
*/
- CullItem(userrec* u, std::string &r);
- CullItem(userrec* u, const char* r);
+ CullItem(userrec* u, std::string &r, const char* ro = "");
+ CullItem(userrec* u, const char* r, const char* ro = "");
~CullItem();
@@ -57,6 +60,9 @@ class CullItem : public classbase
/** Returns the user's quit reason
*/
std::string& GetReason();
+ /** Returns oper reason
+ */
+ std::string& GetOperReason();
};
/** The CullList class can be used by modules, and is used
@@ -102,8 +108,8 @@ class CullList : public classbase
* @param user The user to add
* @param reason The quit reason of the user being added
*/
- void AddItem(userrec* user, std::string &reason);
- void AddItem(userrec* user, const char* reason);
+ void AddItem(userrec* user, std::string &reason, const char* o_reason = "");
+ void AddItem(userrec* user, const char* reason, const char* o_reason = "");
/** Applies the cull list, quitting all the users
* on the list with their quit reasons all at once.
diff --git a/include/modules.h b/include/modules.h
index 473f84547..59d777b71 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -75,7 +75,7 @@ enum MessageType {
* ipv4 servers, so this value will be ten times as
* high on ipv6 servers.
*/
-#define NATIVE_API_VERSION 11014
+#define NATIVE_API_VERSION 11015
#ifdef IPV6
#define API_VERSION (NATIVE_API_VERSION * 10)
#else
diff --git a/include/users.h b/include/users.h
index d6d6fe0ab..8da80d62f 100644
--- a/include/users.h
+++ b/include/users.h
@@ -669,10 +669,11 @@ class userrec : public connection
/** Disconnect a user gracefully
* @param user The user to remove
- * @param r The quit reason
+ * @param r The quit reason to show to normal users
+ * @param oreason The quit reason to show to opers
* @return Although this function has no return type, on exit the user provided will no longer exist.
*/
- static void QuitUser(InspIRCd* Instance, userrec *user, const std::string &r);
+ static void QuitUser(InspIRCd* Instance, userrec *user, const std::string &r, const char* oreason = "");
/** Add the user to WHOWAS system
*/
@@ -803,6 +804,8 @@ class userrec : public connection
*/
void WriteCommonExcept(const std::string &text);
+ void WriteCommonQuit(const std::string &normal_text, const std::string &oper_text);
+
/** Write a WALLOPS message from this user to all local opers.
* If this user is not opered, the function will return without doing anything.
* @param text The format string to send in the WALLOPS message