diff options
| author | 2016-02-25 16:28:58 +0100 | |
|---|---|---|
| committer | 2016-02-25 16:28:58 +0100 | |
| commit | ee7567584e4792166a4d6455ca306731d8b5f28a (patch) | |
| tree | 29da7bf0fbcf873e02b58a8b52775398b66e8bc0 /include | |
| parent | Convert WhoisContext::SendLine() calls to pass the parameters of the numeric ... (diff) | |
| download | inspircd++-ee7567584e4792166a4d6455ca306731d8b5f28a.tar.gz inspircd++-ee7567584e4792166a4d6455ca306731d8b5f28a.tar.bz2 inspircd++-ee7567584e4792166a4d6455ca306731d8b5f28a.zip | |
Make source server settable in Numeric::Numeric
Diffstat (limited to 'include')
| -rw-r--r-- | include/numeric.h | 15 |
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 */ |
