]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/numeric.h
Replace HandleEvent() references in the SocketEngine documentation with OnEventHandler*()
[user/henk/code/inspircd.git] / include / numeric.h
index e7438b53a326c65b822c896b1d2b1fdf2d895c2a..8044fe5bf1df052177bb60956f9bbe8ef6f2b1bc 100644 (file)
@@ -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
         */