]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_sqlutils.h
'svn propset -R svn:eol-style CR *' Set to UNIX-style always. Binaries are auto skipp...
[user/henk/code/inspircd.git] / src / modules / extra / m_sqlutils.h
index 92fbdf5c7607b4686c8641bd69b27f43355a555d..cdde51f6771e174992b8b205e577b460809c7b0a 100644 (file)
@@ -1,143 +1 @@
-/*       +------------------------------------+
- *       | Inspire Internet Relay Chat Daemon |
- *       +------------------------------------+
- *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
- *
- * This program is free but copyrighted software; see
- *            the file COPYING for details.
- *
- * ---------------------------------------------------
- */
-
-#ifndef INSPIRCD_SQLUTILS
-#define INSPIRCD_SQLUTILS
-
-#include "modules.h"
-
-#define SQLUTILAU "SQLutil AssociateUser"
-#define SQLUTILAC "SQLutil AssociateChan"
-#define SQLUTILUA "SQLutil UnAssociate"
-#define SQLUTILGU "SQLutil GetAssocUser"
-#define SQLUTILGC "SQLutil GetAssocChan"
-#define SQLUTILSUCCESS "You shouldn't be reading this (success)"
-
-/** Used to associate an SQL query with a user
- */
-class AssociateUser : public Request
-{
-public:
-       /** Query ID
-        */
-       unsigned long id;
-       /** User
-        */
-       userrec* user;
-       
-       AssociateUser(Module* s, Module* d, unsigned long i, userrec* u)
-       : Request(s, d, SQLUTILAU), id(i), user(u)
-       {
-       }
-       
-       AssociateUser& S()
-       {
-               Send();
-               return *this;
-       }
-};
-
-/** Used to associate an SQL query with a channel
- */
-class AssociateChan : public Request
-{
-public:
-       /** Query ID
-        */
-       unsigned long id;
-       /** Channel
-        */
-       chanrec* chan;
-       
-       AssociateChan(Module* s, Module* d, unsigned long i, chanrec* u)
-       : Request(s, d, SQLUTILAC), id(i), chan(u)
-       {
-       }
-       
-       AssociateChan& S()
-       {
-               Send();
-               return *this;
-       }
-};
-
-/** Unassociate a user or  class from an SQL query
- */
-class UnAssociate : public Request
-{
-public:
-       /** The query ID
-        */
-       unsigned long id;
-
-       UnAssociate(Module* s, Module* d, unsigned long i)
-       : Request(s, d, SQLUTILUA), id(i)
-       {
-       }
-       
-       UnAssociate& S()
-       {
-               Send();
-               return *this;
-       }
-};
-
-/** Get the user associated with an SQL query ID
- */
-class GetAssocUser : public Request
-{
-public:
-       /** The query id
-        */
-       unsigned long id;
-       /** The user
-        */
-       userrec* user;
-
-       GetAssocUser(Module* s, Module* d, unsigned long i)
-       : Request(s, d, SQLUTILGU), id(i), user(NULL)
-       {
-       }
-       
-       GetAssocUser& S()
-       {
-               Send();
-               return *this;
-       }
-};
-
-/** Get the channel associated with an SQL query ID
- */
-class GetAssocChan : public Request
-{
-public:
-       /** The query id
-        */
-       unsigned long id;
-       /** The channel
-        */
-       chanrec* chan;
-
-       GetAssocChan(Module* s, Module* d, unsigned long i)
-       : Request(s, d, SQLUTILGC), id(i), chan(NULL)
-       {
-       }
-       
-       GetAssocChan& S()
-       {
-               Send();
-               return *this;
-       }
-};
-
-#endif
+/*       +------------------------------------+\r *       | Inspire Internet Relay Chat Daemon |\r *       +------------------------------------+\r *\r *  InspIRCd: (C) 2002-2007 InspIRCd Development Team\r * See: http://www.inspircd.org/wiki/index.php/Credits\r *\r * This program is free but copyrighted software; see\r *            the file COPYING for details.\r *\r * ---------------------------------------------------\r */\r\r#ifndef INSPIRCD_SQLUTILS\r#define INSPIRCD_SQLUTILS\r\r#include "modules.h"\r\r#define SQLUTILAU "SQLutil AssociateUser"\r#define SQLUTILAC "SQLutil AssociateChan"\r#define SQLUTILUA "SQLutil UnAssociate"\r#define SQLUTILGU "SQLutil GetAssocUser"\r#define SQLUTILGC "SQLutil GetAssocChan"\r#define SQLUTILSUCCESS "You shouldn't be reading this (success)"\r\r/** Used to associate an SQL query with a user\r */\rclass AssociateUser : public Request\r{\rpublic:\r      /** Query ID\r    */\r    unsigned long id;\r      /** User\r        */\r    userrec* user;\r \r       AssociateUser(Module* s, Module* d, unsigned long i, userrec* u)\r       : Request(s, d, SQLUTILAU), id(i), user(u)\r     {\r      }\r      \r       AssociateUser& S()\r     {\r              Send();\r                return *this;\r  }\r};\r\r/** Used to associate an SQL query with a channel\r */\rclass AssociateChan : public Request\r{\rpublic:\r     /** Query ID\r    */\r    unsigned long id;\r      /** Channel\r     */\r    chanrec* chan;\r \r       AssociateChan(Module* s, Module* d, unsigned long i, chanrec* u)\r       : Request(s, d, SQLUTILAC), id(i), chan(u)\r     {\r      }\r      \r       AssociateChan& S()\r     {\r              Send();\r                return *this;\r  }\r};\r\r/** Unassociate a user or  class from an SQL query\r */\rclass UnAssociate : public Request\r{\rpublic:\r      /** The query ID\r        */\r    unsigned long id;\r\r     UnAssociate(Module* s, Module* d, unsigned long i)\r     : Request(s, d, SQLUTILUA), id(i)\r      {\r      }\r      \r       UnAssociate& S()\r       {\r              Send();\r                return *this;\r  }\r};\r\r/** Get the user associated with an SQL query ID\r */\rclass GetAssocUser : public Request\r{\rpublic:\r       /** The query id\r        */\r    unsigned long id;\r      /** The user\r    */\r    userrec* user;\r\r        GetAssocUser(Module* s, Module* d, unsigned long i)\r    : Request(s, d, SQLUTILGU), id(i), user(NULL)\r  {\r      }\r      \r       GetAssocUser& S()\r      {\r              Send();\r                return *this;\r  }\r};\r\r/** Get the channel associated with an SQL query ID\r */\rclass GetAssocChan : public Request\r{\rpublic:\r    /** The query id\r        */\r    unsigned long id;\r      /** The channel\r         */\r    chanrec* chan;\r\r        GetAssocChan(Module* s, Module* d, unsigned long i)\r    : Request(s, d, SQLUTILGC), id(i), chan(NULL)\r  {\r      }\r      \r       GetAssocChan& S()\r      {\r              Send();\r                return *this;\r  }\r};\r\r#endif\r
\ No newline at end of file