summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-02-25 16:28:58 +0100
committerAttila Molnar <attilamolnar@hush.com>2016-02-25 16:28:58 +0100
commitee7567584e4792166a4d6455ca306731d8b5f28a (patch)
tree29da7bf0fbcf873e02b58a8b52775398b66e8bc0 /include
parent0c42bcde16c3141ccd4bb8c5f7b22d65cc8e1909 (diff)
Make source server settable in Numeric::Numeric
Diffstat (limited to 'include')
-rw-r--r--include/numeric.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/numeric.h b/include/numeric.h
index e7438b53a..8044fe5bf 100644
--- a/include/numeric.h
+++ b/include/numeric.h
@@ -36,12 +36,17 @@ class Numeric::Numeric
*/
std::vector<std::string> params;
+ /** Source server of the numeric, if NULL (the default) then it is the local server
+ */
+ Server* sourceserver;
+
public:
/** Constructor
* @param num Numeric number (RPL_*, ERR_*)
*/
Numeric(unsigned int num)
: numeric(num)
+ , sourceserver(NULL)
{
}
@@ -55,6 +60,16 @@ class Numeric::Numeric
return *this;
}
+ /** Set the source server of the numeric. The source server defaults to the local server.
+ * @param server Server to set as source
+ */
+ void SetServer(Server* server) { sourceserver = server; }
+
+ /** Get the source server of the numeric
+ * @return Source server or NULL if the source is the local server
+ */
+ Server* GetServer() const { return sourceserver; }
+
/** Get the number of the numeric as an unsigned integer
* @return Numeric number as an unsigned integer
*/