PageRenderTime 206ms CodeModel.GetById 138ms app.highlight 64ms RepoModel.GetById 0ms app.codeStats 1ms

/ghost-legacy/ghostdbmysql.h

http://ghostcb.googlecode.com/
C++ Header | 497 lines | 270 code | 61 blank | 166 comment | 0 complexity | 92b0c38ef7ea513f68b59c985b5f15ec MD5 | raw file
  1/*
  2
  3   Copyright [2008] [Trevor Hogan]
  4
  5   Licensed under the Apache License, Version 2.0 (the "License");
  6   you may not use this file except in compliance with the License.
  7   You may obtain a copy of the License at
  8
  9       http://www.apache.org/licenses/LICENSE-2.0
 10
 11   Unless required by applicable law or agreed to in writing, software
 12   distributed under the License is distributed on an "AS IS" BASIS,
 13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14   See the License for the specific language governing permissions and
 15   limitations under the License.
 16
 17   CODE PORTED FROM THE ORIGINAL GHOST PROJECT: http://ghost.pwner.org/
 18
 19*/
 20
 21#ifdef GHOST_MYSQL
 22
 23#ifndef GHOSTDBMYSQL_H
 24#define GHOSTDBMYSQL_H
 25
 26/**************
 27 *** SCHEMA ***
 28 **************
 29
 30CREATE TABLE admins (
 31	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 32	botid INT NOT NULL,
 33	name VARCHAR(15) NOT NULL,
 34	server VARCHAR(100) NOT NULL
 35)
 36
 37CREATE TABLE bans (
 38	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 39	botid INT NOT NULL,
 40	server VARCHAR(100) NOT NULL,
 41	name VARCHAR(15) NOT NULL,
 42	ip VARCHAR(15) NOT NULL,
 43	date DATETIME NOT NULL,
 44	gamename VARCHAR(31) NOT NULL,
 45	admin VARCHAR(15) NOT NULL,
 46	reason VARCHAR(255) NOT NULL
 47)
 48
 49CREATE TABLE games (
 50	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 51	botid INT NOT NULL,
 52	server VARCHAR(100) NOT NULL,
 53	map VARCHAR(100) NOT NULL,
 54	datetime DATETIME NOT NULL,
 55	gamename VARCHAR(31) NOT NULL,
 56	ownername VARCHAR(15) NOT NULL,
 57	duration INT NOT NULL,
 58	gamestate INT NOT NULL,
 59	creatorname VARCHAR(15) NOT NULL,
 60	creatorserver VARCHAR(100) NOT NULL
 61)
 62
 63CREATE TABLE gameplayers (
 64	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 65	botid INT NOT NULL,
 66	gameid INT NOT NULL,
 67	name VARCHAR(15) NOT NULL,
 68	ip VARCHAR(15) NOT NULL,
 69	spoofed INT NOT NULL,
 70	reserved INT NOT NULL,
 71	loadingtime INT NOT NULL,
 72	`left` INT NOT NULL,
 73	leftreason VARCHAR(100) NOT NULL,
 74	team INT NOT NULL,
 75	colour INT NOT NULL,
 76	spoofedrealm VARCHAR(100) NOT NULL,
 77	INDEX( gameid )
 78)
 79
 80CREATE TABLE dotagames (
 81	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 82	botid INT NOT NULL,
 83	gameid INT NOT NULL,
 84	winner INT NOT NULL,
 85	min INT NOT NULL,
 86	sec INT NOT NULL
 87)
 88
 89CREATE TABLE dotaplayers (
 90	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 91	botid INT NOT NULL,
 92	gameid INT NOT NULL,
 93	colour INT NOT NULL,
 94	kills INT NOT NULL,
 95	deaths INT NOT NULL,
 96	creepkills INT NOT NULL,
 97	creepdenies INT NOT NULL,
 98	assists INT NOT NULL,
 99	gold INT NOT NULL,
100	neutralkills INT NOT NULL,
101	item1 CHAR(4) NOT NULL,
102	item2 CHAR(4) NOT NULL,
103	item3 CHAR(4) NOT NULL,
104	item4 CHAR(4) NOT NULL,
105	item5 CHAR(4) NOT NULL,
106	item6 CHAR(4) NOT NULL,
107	hero CHAR(4) NOT NULL,
108	newcolour INT NOT NULL,
109	towerkills INT NOT NULL,
110	raxkills INT NOT NULL,
111	courierkills INT NOT NULL,
112	INDEX( gameid, colour )
113)
114
115CREATE TABLE downloads (
116	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
117	botid INT NOT NULL,
118	map VARCHAR(100) NOT NULL,
119	mapsize INT NOT NULL,
120	datetime DATETIME NOT NULL,
121	name VARCHAR(15) NOT NULL,
122	ip VARCHAR(15) NOT NULL,
123	spoofed INT NOT NULL,
124	spoofedrealm VARCHAR(100) NOT NULL,
125	downloadtime INT NOT NULL
126)
127
128CREATE TABLE scores (
129	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
130	category VARCHAR(25) NOT NULL,
131	name VARCHAR(15) NOT NULL,
132	server VARCHAR(100) NOT NULL,
133	score REAL NOT NULL
134)
135
136CREATE TABLE w3mmdplayers (
137	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
138	botid INT NOT NULL,
139	category VARCHAR(25) NOT NULL,
140	gameid INT NOT NULL,
141	pid INT NOT NULL,
142	name VARCHAR(15) NOT NULL,
143	flag VARCHAR(32) NOT NULL,
144	leaver INT NOT NULL,
145	practicing INT NOT NULL
146)
147
148CREATE TABLE w3mmdvars (
149	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
150	botid INT NOT NULL,
151	gameid INT NOT NULL,
152	pid INT NOT NULL,
153	varname VARCHAR(25) NOT NULL,
154	value_int INT DEFAULT NULL,
155	value_real REAL DEFAULT NULL,
156	value_string VARCHAR(100) DEFAULT NULL
157)
158
159 **************
160 *** SCHEMA ***
161 **************/
162
163//
164// CGHostDBMySQL
165//
166
167class CGHostDBMySQL : public CGHostDB
168{
169private:
170	string m_Server;
171	string m_Database;
172	string m_User;
173	string m_Password;
174	uint16_t m_Port;
175	uint32_t m_BotID;
176	queue<void *> m_IdleConnections;
177	uint32_t m_NumConnections;
178	uint32_t m_OutstandingCallables;
179
180public:
181	CGHostDBMySQL( CConfig *CFG );
182	virtual ~CGHostDBMySQL( );
183
184	virtual string GetStatus( );
185
186	virtual void RecoverCallable( CBaseCallable *callable );
187
188	// threaded database functions
189
190	virtual void CreateThread( CBaseCallable *callable );
191	virtual CCallableAdminCount *ThreadedAdminCount( string server );
192	virtual CCallableAdminCheck *ThreadedAdminCheck( string server, string user );
193	virtual CCallableAdminAdd *ThreadedAdminAdd( string server, string user );
194	virtual CCallableAdminRemove *ThreadedAdminRemove( string server, string user );
195	virtual CCallableAdminList *ThreadedAdminList( string server );
196	virtual CCallableBanCount *ThreadedBanCount( string server );
197	virtual CCallableBanCheck *ThreadedBanCheck( string server, string user, string ip );
198	virtual CCallableBanAdd *ThreadedBanAdd( string server, string user, string ip, string gamename, string admin, string reason );
199	virtual CCallableBanRemove *ThreadedBanRemove( string server, string user );
200	virtual CCallableBanRemove *ThreadedBanRemove( string user );
201	virtual CCallableBanList *ThreadedBanList( string server );
202	virtual CCallableGameAdd *ThreadedGameAdd( string server, string map, string gamename, string ownername, uint32_t duration, uint32_t gamestate, string creatorname, string creatorserver );
203	virtual CCallableGamePlayerAdd *ThreadedGamePlayerAdd( uint32_t gameid, string name, string ip, uint32_t spoofed, string spoofedrealm, uint32_t reserved, uint32_t loadingtime, uint32_t left, string leftreason, uint32_t team, uint32_t colour );
204	virtual CCallableGamePlayerSummaryCheck *ThreadedGamePlayerSummaryCheck( string name );
205	virtual CCallableDotAGameAdd *ThreadedDotAGameAdd( uint32_t gameid, uint32_t winner, uint32_t min, uint32_t sec );
206	virtual CCallableDotAPlayerAdd *ThreadedDotAPlayerAdd( uint32_t gameid, uint32_t colour, uint32_t kills, uint32_t deaths, uint32_t creepkills, uint32_t creepdenies, uint32_t assists, uint32_t gold, uint32_t neutralkills, string item1, string item2, string item3, string item4, string item5, string item6, string hero, uint32_t newcolour, uint32_t towerkills, uint32_t raxkills, uint32_t courierkills );
207	virtual CCallableDotAPlayerSummaryCheck *ThreadedDotAPlayerSummaryCheck( string name );
208	virtual CCallableDownloadAdd *ThreadedDownloadAdd( string map, uint32_t mapsize, string name, string ip, uint32_t spoofed, string spoofedrealm, uint32_t downloadtime );
209	virtual CCallableScoreCheck *ThreadedScoreCheck( string category, string name, string server );
210	virtual CCallableW3MMDPlayerAdd *ThreadedW3MMDPlayerAdd( string category, uint32_t gameid, uint32_t pid, string name, string flag, uint32_t leaver, uint32_t practicing );
211	virtual CCallableW3MMDVarAdd *ThreadedW3MMDVarAdd( uint32_t gameid, map<VarP,int32_t> var_ints );
212	virtual CCallableW3MMDVarAdd *ThreadedW3MMDVarAdd( uint32_t gameid, map<VarP,double> var_reals );
213	virtual CCallableW3MMDVarAdd *ThreadedW3MMDVarAdd( uint32_t gameid, map<VarP,string> var_strings );
214
215	// other database functions
216
217	virtual void *GetIdleConnection( );
218};
219
220//
221// global helper functions
222//
223
224uint32_t MySQLAdminCount( void *conn, string *error, uint32_t botid, string server );
225bool MySQLAdminCheck( void *conn, string *error, uint32_t botid, string server, string user );
226bool MySQLAdminAdd( void *conn, string *error, uint32_t botid, string server, string user );
227bool MySQLAdminRemove( void *conn, string *error, uint32_t botid, string server, string user );
228vector<string> MySQLAdminList( void *conn, string *error, uint32_t botid, string server );
229uint32_t MySQLBanCount( void *conn, string *error, uint32_t botid, string server );
230CDBBan *MySQLBanCheck( void *conn, string *error, uint32_t botid, string server, string user, string ip );
231bool MySQLBanAdd( void *conn, string *error, uint32_t botid, string server, string user, string ip, string gamename, string admin, string reason );
232bool MySQLBanRemove( void *conn, string *error, uint32_t botid, string server, string user );
233bool MySQLBanRemove( void *conn, string *error, uint32_t botid, string user );
234vector<CDBBan *> MySQLBanList( void *conn, string *error, uint32_t botid, string server );
235uint32_t MySQLGameAdd( void *conn, string *error, uint32_t botid, string server, string map, string gamename, string ownername, uint32_t duration, uint32_t gamestate, string creatorname, string creatorserver );
236uint32_t MySQLGamePlayerAdd( void *conn, string *error, uint32_t botid, uint32_t gameid, string name, string ip, uint32_t spoofed, string spoofedrealm, uint32_t reserved, uint32_t loadingtime, uint32_t left, string leftreason, uint32_t team, uint32_t colour );
237CDBGamePlayerSummary *MySQLGamePlayerSummaryCheck( void *conn, string *error, uint32_t botid, string name );
238uint32_t MySQLDotAGameAdd( void *conn, string *error, uint32_t botid, uint32_t gameid, uint32_t winner, uint32_t min, uint32_t sec );
239uint32_t MySQLDotAPlayerAdd( void *conn, string *error, uint32_t botid, uint32_t gameid, uint32_t colour, uint32_t kills, uint32_t deaths, uint32_t creepkills, uint32_t creepdenies, uint32_t assists, uint32_t gold, uint32_t neutralkills, string item1, string item2, string item3, string item4, string item5, string item6, string hero, uint32_t newcolour, uint32_t towerkills, uint32_t raxkills, uint32_t courierkills );
240CDBDotAPlayerSummary *MySQLDotAPlayerSummaryCheck( void *conn, string *error, uint32_t botid, string name );
241bool MySQLDownloadAdd( void *conn, string *error, uint32_t botid, string map, uint32_t mapsize, string name, string ip, uint32_t spoofed, string spoofedrealm, uint32_t downloadtime );
242double MySQLScoreCheck( void *conn, string *error, uint32_t botid, string category, string name, string server );
243uint32_t MySQLW3MMDPlayerAdd( void *conn, string *error, uint32_t botid, string category, uint32_t gameid, uint32_t pid, string name, string flag, uint32_t leaver, uint32_t practicing );
244bool MySQLW3MMDVarAdd( void *conn, string *error, uint32_t botid, uint32_t gameid, map<VarP,int32_t> var_ints );
245bool MySQLW3MMDVarAdd( void *conn, string *error, uint32_t botid, uint32_t gameid, map<VarP,double> var_reals );
246bool MySQLW3MMDVarAdd( void *conn, string *error, uint32_t botid, uint32_t gameid, map<VarP,string> var_strings );
247
248//
249// MySQL Callables
250//
251
252class CMySQLCallable : virtual public CBaseCallable
253{
254protected:
255	void *m_Connection;
256	string m_SQLServer;
257	string m_SQLDatabase;
258	string m_SQLUser;
259	string m_SQLPassword;
260	uint16_t m_SQLPort;
261	uint32_t m_SQLBotID;
262
263public:
264	CMySQLCallable( void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), m_Connection( nConnection ), m_SQLBotID( nSQLBotID ), m_SQLServer( nSQLServer ), m_SQLDatabase( nSQLDatabase ), m_SQLUser( nSQLUser ), m_SQLPassword( nSQLPassword ), m_SQLPort( nSQLPort ) { }
265	virtual ~CMySQLCallable( ) { }
266
267	virtual void *GetConnection( )	{ return m_Connection; }
268
269	virtual void Init( );
270	virtual void Close( );
271};
272
273class CMySQLCallableAdminCount : public CCallableAdminCount, public CMySQLCallable
274{
275public:
276	CMySQLCallableAdminCount( string nServer, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableAdminCount( nServer ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
277	virtual ~CMySQLCallableAdminCount( ) { }
278
279	virtual void operator( )( );
280	virtual void Init( ) { CMySQLCallable :: Init( ); }
281	virtual void Close( ) { CMySQLCallable :: Close( ); }
282};
283
284class CMySQLCallableAdminCheck : public CCallableAdminCheck, public CMySQLCallable
285{
286public:
287	CMySQLCallableAdminCheck( string nServer, string nUser, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableAdminCheck( nServer, nUser ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
288	virtual ~CMySQLCallableAdminCheck( ) { }
289
290	virtual void operator( )( );
291	virtual void Init( ) { CMySQLCallable :: Init( ); }
292	virtual void Close( ) { CMySQLCallable :: Close( ); }
293};
294
295class CMySQLCallableAdminAdd : public CCallableAdminAdd, public CMySQLCallable
296{
297public:
298	CMySQLCallableAdminAdd( string nServer, string nUser, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableAdminAdd( nServer, nUser ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
299	virtual ~CMySQLCallableAdminAdd( ) { }
300
301	virtual void operator( )( );
302	virtual void Init( ) { CMySQLCallable :: Init( ); }
303	virtual void Close( ) { CMySQLCallable :: Close( ); }
304};
305
306class CMySQLCallableAdminRemove : public CCallableAdminRemove, public CMySQLCallable
307{
308public:
309	CMySQLCallableAdminRemove( string nServer, string nUser, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableAdminRemove( nServer, nUser ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
310	virtual ~CMySQLCallableAdminRemove( ) { }
311
312	virtual void operator( )( );
313	virtual void Init( ) { CMySQLCallable :: Init( ); }
314	virtual void Close( ) { CMySQLCallable :: Close( ); }
315};
316
317class CMySQLCallableAdminList : public CCallableAdminList, public CMySQLCallable
318{
319public:
320	CMySQLCallableAdminList( string nServer, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableAdminList( nServer ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
321	virtual ~CMySQLCallableAdminList( ) { }
322
323	virtual void operator( )( );
324	virtual void Init( ) { CMySQLCallable :: Init( ); }
325	virtual void Close( ) { CMySQLCallable :: Close( ); }
326};
327
328class CMySQLCallableBanCount : public CCallableBanCount, public CMySQLCallable
329{
330public:
331	CMySQLCallableBanCount( string nServer, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableBanCount( nServer ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
332	virtual ~CMySQLCallableBanCount( ) { }
333
334	virtual void operator( )( );
335	virtual void Init( ) { CMySQLCallable :: Init( ); }
336	virtual void Close( ) { CMySQLCallable :: Close( ); }
337};
338
339class CMySQLCallableBanCheck : public CCallableBanCheck, public CMySQLCallable
340{
341public:
342	CMySQLCallableBanCheck( string nServer, string nUser, string nIP, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableBanCheck( nServer, nUser, nIP ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
343	virtual ~CMySQLCallableBanCheck( ) { }
344
345	virtual void operator( )( );
346	virtual void Init( ) { CMySQLCallable :: Init( ); }
347	virtual void Close( ) { CMySQLCallable :: Close( ); }
348};
349
350class CMySQLCallableBanAdd : public CCallableBanAdd, public CMySQLCallable
351{
352public:
353	CMySQLCallableBanAdd( string nServer, string nUser, string nIP, string nGameName, string nAdmin, string nReason, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableBanAdd( nServer, nUser, nIP, nGameName, nAdmin, nReason ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
354	virtual ~CMySQLCallableBanAdd( ) { }
355
356	virtual void operator( )( );
357	virtual void Init( ) { CMySQLCallable :: Init( ); }
358	virtual void Close( ) { CMySQLCallable :: Close( ); }
359};
360
361class CMySQLCallableBanRemove : public CCallableBanRemove, public CMySQLCallable
362{
363public:
364	CMySQLCallableBanRemove( string nServer, string nUser, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableBanRemove( nServer, nUser ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
365	virtual ~CMySQLCallableBanRemove( ) { }
366
367	virtual void operator( )( );
368	virtual void Init( ) { CMySQLCallable :: Init( ); }
369	virtual void Close( ) { CMySQLCallable :: Close( ); }
370};
371
372class CMySQLCallableBanList : public CCallableBanList, public CMySQLCallable
373{
374public:
375	CMySQLCallableBanList( string nServer, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableBanList( nServer ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
376	virtual ~CMySQLCallableBanList( ) { }
377
378	virtual void operator( )( );
379	virtual void Init( ) { CMySQLCallable :: Init( ); }
380	virtual void Close( ) { CMySQLCallable :: Close( ); }
381};
382
383class CMySQLCallableGameAdd : public CCallableGameAdd, public CMySQLCallable
384{
385public:
386	CMySQLCallableGameAdd( string nServer, string nMap, string nGameName, string nOwnerName, uint32_t nDuration, uint32_t nGameState, string nCreatorName, string nCreatorServer, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableGameAdd( nServer, nMap, nGameName, nOwnerName, nDuration, nGameState, nCreatorName, nCreatorServer ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
387	virtual ~CMySQLCallableGameAdd( ) { }
388
389	virtual void operator( )( );
390	virtual void Init( ) { CMySQLCallable :: Init( ); }
391	virtual void Close( ) { CMySQLCallable :: Close( ); }
392};
393
394class CMySQLCallableGamePlayerAdd : public CCallableGamePlayerAdd, public CMySQLCallable
395{
396public:
397	CMySQLCallableGamePlayerAdd( uint32_t nGameID, string nName, string nIP, uint32_t nSpoofed, string nSpoofedRealm, uint32_t nReserved, uint32_t nLoadingTime, uint32_t nLeft, string nLeftReason, uint32_t nTeam, uint32_t nColour, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableGamePlayerAdd( nGameID, nName, nIP, nSpoofed, nSpoofedRealm, nReserved, nLoadingTime, nLeft, nLeftReason, nTeam, nColour ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
398	virtual ~CMySQLCallableGamePlayerAdd( ) { }
399
400	virtual void operator( )( );
401	virtual void Init( ) { CMySQLCallable :: Init( ); }
402	virtual void Close( ) { CMySQLCallable :: Close( ); }
403};
404
405class CMySQLCallableGamePlayerSummaryCheck : public CCallableGamePlayerSummaryCheck, public CMySQLCallable
406{
407public:
408	CMySQLCallableGamePlayerSummaryCheck( string nName, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableGamePlayerSummaryCheck( nName ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
409	virtual ~CMySQLCallableGamePlayerSummaryCheck( ) { }
410
411	virtual void operator( )( );
412	virtual void Init( ) { CMySQLCallable :: Init( ); }
413	virtual void Close( ) { CMySQLCallable :: Close( ); }
414};
415
416class CMySQLCallableDotAGameAdd : public CCallableDotAGameAdd, public CMySQLCallable
417{
418public:
419	CMySQLCallableDotAGameAdd( uint32_t nGameID, uint32_t nWinner, uint32_t nMin, uint32_t nSec, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableDotAGameAdd( nGameID, nWinner, nMin, nSec ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
420	virtual ~CMySQLCallableDotAGameAdd( ) { }
421
422	virtual void operator( )( );
423	virtual void Init( ) { CMySQLCallable :: Init( ); }
424	virtual void Close( ) { CMySQLCallable :: Close( ); }
425};
426
427class CMySQLCallableDotAPlayerAdd : public CCallableDotAPlayerAdd, public CMySQLCallable
428{
429public:
430	CMySQLCallableDotAPlayerAdd( uint32_t nGameID, uint32_t nColour, uint32_t nKills, uint32_t nDeaths, uint32_t nCreepKills, uint32_t nCreepDenies, uint32_t nAssists, uint32_t nGold, uint32_t nNeutralKills, string nItem1, string nItem2, string nItem3, string nItem4, string nItem5, string nItem6, string nHero, uint32_t nNewColour, uint32_t nTowerKills, uint32_t nRaxKills, uint32_t nCourierKills, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableDotAPlayerAdd( nGameID, nColour, nKills, nDeaths, nCreepKills, nCreepDenies, nAssists, nGold, nNeutralKills, nItem1, nItem2, nItem3, nItem4, nItem5, nItem6, nHero, nNewColour, nTowerKills, nRaxKills, nCourierKills ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
431	virtual ~CMySQLCallableDotAPlayerAdd( ) { }
432
433	virtual void operator( )( );
434	virtual void Init( ) { CMySQLCallable :: Init( ); }
435	virtual void Close( ) { CMySQLCallable :: Close( ); }
436};
437
438class CMySQLCallableDotAPlayerSummaryCheck : public CCallableDotAPlayerSummaryCheck, public CMySQLCallable
439{
440public:
441	CMySQLCallableDotAPlayerSummaryCheck( string nName, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableDotAPlayerSummaryCheck( nName ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
442	virtual ~CMySQLCallableDotAPlayerSummaryCheck( ) { }
443
444	virtual void operator( )( );
445	virtual void Init( ) { CMySQLCallable :: Init( ); }
446	virtual void Close( ) { CMySQLCallable :: Close( ); }
447};
448
449class CMySQLCallableDownloadAdd : public CCallableDownloadAdd, public CMySQLCallable
450{
451public:
452	CMySQLCallableDownloadAdd( string nMap, uint32_t nMapSize, string nName, string nIP, uint32_t nSpoofed, string nSpoofedRealm, uint32_t nDownloadTime, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableDownloadAdd( nMap, nMapSize, nName, nIP, nSpoofed, nSpoofedRealm, nDownloadTime ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
453	virtual ~CMySQLCallableDownloadAdd( ) { }
454
455	virtual void operator( )( );
456	virtual void Init( ) { CMySQLCallable :: Init( ); }
457	virtual void Close( ) { CMySQLCallable :: Close( ); }
458};
459
460class CMySQLCallableScoreCheck : public CCallableScoreCheck, public CMySQLCallable
461{
462public:
463	CMySQLCallableScoreCheck( string nCategory, string nName, string nServer, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableScoreCheck( nCategory, nName, nServer ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
464	virtual ~CMySQLCallableScoreCheck( ) { }
465
466	virtual void operator( )( );
467	virtual void Init( ) { CMySQLCallable :: Init( ); }
468	virtual void Close( ) { CMySQLCallable :: Close( ); }
469};
470
471class CMySQLCallableW3MMDPlayerAdd : public CCallableW3MMDPlayerAdd, public CMySQLCallable
472{
473public:
474	CMySQLCallableW3MMDPlayerAdd( string nCategory, uint32_t nGameID, uint32_t nPID, string nName, string nFlag, uint32_t nLeaver, uint32_t nPracticing, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableW3MMDPlayerAdd( nCategory, nGameID, nPID, nName, nFlag, nLeaver, nPracticing ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
475	virtual ~CMySQLCallableW3MMDPlayerAdd( ) { }
476
477	virtual void operator( )( );
478	virtual void Init( ) { CMySQLCallable :: Init( ); }
479	virtual void Close( ) { CMySQLCallable :: Close( ); }
480};
481
482class CMySQLCallableW3MMDVarAdd : public CCallableW3MMDVarAdd, public CMySQLCallable
483{
484public:
485	CMySQLCallableW3MMDVarAdd( uint32_t nGameID, map<VarP,int32_t> nVarInts, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableW3MMDVarAdd( nGameID, nVarInts ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
486	CMySQLCallableW3MMDVarAdd( uint32_t nGameID, map<VarP,double> nVarReals, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableW3MMDVarAdd( nGameID, nVarReals ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
487	CMySQLCallableW3MMDVarAdd( uint32_t nGameID, map<VarP,string> nVarStrings, void *nConnection, uint32_t nSQLBotID, string nSQLServer, string nSQLDatabase, string nSQLUser, string nSQLPassword, uint16_t nSQLPort ) : CBaseCallable( ), CCallableW3MMDVarAdd( nGameID, nVarStrings ), CMySQLCallable( nConnection, nSQLBotID, nSQLServer, nSQLDatabase, nSQLUser, nSQLPassword, nSQLPort ) { }
488	virtual ~CMySQLCallableW3MMDVarAdd( ) { }
489
490	virtual void operator( )( );
491	virtual void Init( ) { CMySQLCallable :: Init( ); }
492	virtual void Close( ) { CMySQLCallable :: Close( ); }
493};
494
495#endif
496
497#endif