1 #ifndef INSPIRCD_SQLUTILS
2 #define INSPIRCD_SQLUTILS
6 #define SQLUTILAU "SQLutil AssociateUser"
7 #define SQLUTILAC "SQLutil AssociateChan"
8 #define SQLUTILUA "SQLutil UnAssociate"
9 #define SQLUTILGU "SQLutil GetAssocUser"
10 #define SQLUTILGC "SQLutil GetAssocChan"
11 #define SQLUTILSUCCESS "You shouldn't be reading this (success)"
13 /** Used to associate an SQL query with a user
15 class AssociateUser : public Request
25 AssociateUser(Module* s, Module* d, unsigned long i, userrec* u)
26 : Request(s, d, SQLUTILAU), id(i), user(u)
37 /** Used to associate an SQL query with a channel
39 class AssociateChan : public Request
49 AssociateChan(Module* s, Module* d, unsigned long i, chanrec* u)
50 : Request(s, d, SQLUTILAC), id(i), chan(u)
61 /** Unassociate a user or class from an SQL query
63 class UnAssociate : public Request
70 UnAssociate(Module* s, Module* d, unsigned long i)
71 : Request(s, d, SQLUTILUA), id(i)
82 /** Get the user associated with an SQL query ID
84 class GetAssocUser : public Request
94 GetAssocUser(Module* s, Module* d, unsigned long i)
95 : Request(s, d, SQLUTILGU), id(i), user(NULL)
106 /** Get the channel associated with an SQL query ID
108 class GetAssocChan : public Request
118 GetAssocChan(Module* s, Module* d, unsigned long i)
119 : Request(s, d, SQLUTILGC), id(i), chan(NULL)