summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-03-06 13:49:34 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-03-06 13:49:34 +0000
commitb790abb1545fc22d0f6799f48d4b7df22711db8a (patch)
tree0fccc47a24f0285e89977302c5465f956cf854e9 /include
parent767fc7ad41553d8f18988d2330d99c5c89f994e4 (diff)
This properly fixes options:hidebans and options:hidesplits by providing the facility to have two different quit messages for a user, one an oper sees and one a normal user sees.
There are default values on the oper_quit parameters through the entire source so that if oper_quit parameter is not given it defaults to the same as the user_quit git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6630 e03df62e-2008-0410-955e-edbf42e46eb7
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