summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-13 12:41:46 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-13 12:41:46 +0000
commitc0f731e19d61a971af5cf26d073ccd25bfc5c91c (patch)
treecb070a261330b5110d30ecbcf4e446e1419886e2 /include/modules.h
parent58f076212f6330429e027576eb32cfc75bde82ae (diff)
Added Server::AddGLine
Added Server::AddKLine Added Server::AddZLine Added Server::AddQLine Added Server::AddELine Added Server::DelGLine Added Server::DelKLine Added Server::DelZLine Added Server::DelQLine Added Server::DelELine Added Server::Duration git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1071 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/include/modules.h b/include/modules.h
index a366ebb73..44c91a47c 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -692,6 +692,78 @@ class Server : public classbase
*/
virtual bool PseudoToUser(userrec* alive,userrec* zombie,std::string message);
+ /** Adds a G-line
+ * The G-line is propogated to all of the servers in the mesh and enforced as soon as it is added.
+ * The duration must be in seconds, however you can use the Server::CalcDuration method to convert
+ * durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used
+ * to indicate who or what sent the data, usually this is the nickname of a person, or a server
+ * name.
+ */
+ virtual void AddGLine(long duration, std::string source, std::string reason, std::string hostmask);
+
+ /** Adds a Q-line
+ * The Q-line is propogated to all of the servers in the mesh and enforced as soon as it is added.
+ * The duration must be in seconds, however you can use the Server::CalcDuration method to convert
+ * durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used
+ * to indicate who or what sent the data, usually this is the nickname of a person, or a server
+ * name.
+ */
+ virtual void AddQLine(long duration, std::string source, std::string reason, std::string nickname);
+
+ /** Adds a Z-line
+ * The Z-line is propogated to all of the servers in the mesh and enforced as soon as it is added.
+ * The duration must be in seconds, however you can use the Server::CalcDuration method to convert
+ * durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used
+ * to indicate who or what sent the data, usually this is the nickname of a person, or a server
+ * name.
+ */
+ virtual void AddZLine(long duration, std::string source, std::string reason, std::string ipaddr);
+
+ /** Adds a K-line
+ * The K-line is enforced as soon as it is added.
+ * The duration must be in seconds, however you can use the Server::CalcDuration method to convert
+ * durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used
+ * to indicate who or what sent the data, usually this is the nickname of a person, or a server
+ * name.
+ */
+ virtual void AddKLine(long duration, std::string source, std::string reason, std::string hostmask);
+
+ /** Adds a E-line
+ * The E-line is enforced as soon as it is added.
+ * The duration must be in seconds, however you can use the Server::CalcDuration method to convert
+ * durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used
+ * to indicate who or what sent the data, usually this is the nickname of a person, or a server
+ * name.
+ */
+ virtual void AddELine(long duration, std::string source, std::string reason, std::string hostmask);
+
+ /** Deletes a G-Line from all servers on the mesh
+ */
+ virtual bool DelGLine(std::string hostmask);
+
+ /** Deletes a Q-Line from all servers on the mesh
+ */
+ virtual bool DelQLine(std::string nickname);
+
+ /** Deletes a Z-Line from all servers on the mesh
+ */
+ virtual bool DelZLine(std::string ipaddr);
+
+ /** Deletes a local K-Line
+ */
+ virtual bool DelKLine(std::string hostmask);
+
+ /** Deletes a local E-Line
+ */
+ virtual bool DelELine(std::string hostmask);
+
+ /** Calculates a duration
+ * This method will take a string containing a formatted duration (e.g. "1w2d") and return its value
+ * as a total number of seconds. This is the same function used internally by /GLINE etc to set
+ * the ban times.
+ */
+ virtual long CalcDuration(std::string duration);
+
};
#define CONF_NOT_A_NUMBER 0x000010