CLIENT PREFS ARE GO!!1!shiftone!!1!
Fully implemented amb734 - Including console interface and menu for clients to use. --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402140
This commit is contained in:
@@ -35,11 +35,16 @@
|
||||
#define MAXCLIENTS 64
|
||||
|
||||
#include "smsdk_ext.h"
|
||||
#include "sh_list.h"
|
||||
#include "cookie.h"
|
||||
#include "menus.h"
|
||||
|
||||
#define DRIVER_MYSQL 1
|
||||
#define DRIVER_SQLITE 0
|
||||
|
||||
#define MAX_TRANSLATE_PARAMS 32
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sample implementation of the SDK Extension.
|
||||
* Note: Uncomment one of the pre-defined virtual functions in order to use it.
|
||||
@@ -117,10 +122,7 @@ public:
|
||||
public:
|
||||
IDBDriver *Driver;
|
||||
IDatabase *Database;
|
||||
|
||||
IPreparedQuery *Query_InsertCookie;
|
||||
IPreparedQuery *Query_SelectData;
|
||||
IPreparedQuery *Query_InsertData;
|
||||
IPhraseCollection *phrases;
|
||||
};
|
||||
|
||||
class CookieTypeHandler : public IHandleTypeDispatch
|
||||
@@ -128,16 +130,37 @@ class CookieTypeHandler : public IHandleTypeDispatch
|
||||
public:
|
||||
void OnHandleDestroy(HandleType_t type, void *object)
|
||||
{
|
||||
/* No delete needed since this Cookies are persistant */
|
||||
/* No delete needed since Cookies are persistant */
|
||||
}
|
||||
};
|
||||
|
||||
class CookieIteratorHandler : public IHandleTypeDispatch
|
||||
{
|
||||
public:
|
||||
void OnHandleDestroy(HandleType_t type, void *object)
|
||||
{
|
||||
delete (SourceHook::List<Cookie *>::iterator *)object;
|
||||
}
|
||||
};
|
||||
|
||||
size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...);
|
||||
|
||||
extern sp_nativeinfo_t g_ClientPrefNatives[];
|
||||
|
||||
extern ClientPrefs g_ClientPrefs;
|
||||
extern HandleType_t g_CookieType;
|
||||
extern CookieTypeHandler g_CookieTypeHandler;
|
||||
|
||||
extern HandleType_t g_CookieIterator;
|
||||
extern CookieIteratorHandler g_CookieIteratorHandler;
|
||||
|
||||
bool Translate(char *buffer,
|
||||
size_t maxlength,
|
||||
const char *format,
|
||||
unsigned int numparams,
|
||||
size_t *pOutLength,
|
||||
...);
|
||||
|
||||
extern int driver;
|
||||
|
||||
#endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
|
||||
|
||||
Reference in New Issue
Block a user