1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2009 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
14 #ifndef INSPIRCD_SQLUTILS
15 #define INSPIRCD_SQLUTILS
19 #define SQLUTILAU "SQLutil AssociateUser"
20 #define SQLUTILAC "SQLutil AssociateChan"
21 #define SQLUTILUA "SQLutil UnAssociate"
22 #define SQLUTILGU "SQLutil GetAssocUser"
23 #define SQLUTILGC "SQLutil GetAssocChan"
24 #define SQLUTILSUCCESS "You shouldn't be reading this (success)"
26 /** Used to associate an SQL query with a user
28 class AssociateUser : public Request
38 AssociateUser(Module* s, Module* d, unsigned long i, User* u)
39 : Request(s, d, SQLUTILAU), id(i), user(u)
50 /** Used to associate an SQL query with a channel
52 class AssociateChan : public Request
62 AssociateChan(Module* s, Module* d, unsigned long i, Channel* u)
63 : Request(s, d, SQLUTILAC), id(i), chan(u)
74 /** Unassociate a user or class from an SQL query
76 class UnAssociate : public Request
83 UnAssociate(Module* s, Module* d, unsigned long i)
84 : Request(s, d, SQLUTILUA), id(i)
95 /** Get the user associated with an SQL query ID
97 class GetAssocUser : public Request
107 GetAssocUser(Module* s, Module* d, unsigned long i)
108 : Request(s, d, SQLUTILGU), id(i), user(NULL)
119 /** Get the channel associated with an SQL query ID
121 class GetAssocChan : public Request
131 GetAssocChan(Module* s, Module* d, unsigned long i)
132 : Request(s, d, SQLUTILGC), id(i), chan(NULL)