X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fnumeric.h;h=8044fe5bf1df052177bb60956f9bbe8ef6f2b1bc;hb=4d3601938593685b3f45439227838f16ee773cdc;hp=e7438b53a326c65b822c896b1d2b1fdf2d895c2a;hpb=28dcc1f9e017152f03b0d9bfbcc494260b015a0a;p=user%2Fhenk%2Fcode%2Finspircd.git 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 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 */