/* $Id: db.h,v 1.1 1999/04/29 13:13:46 turrican Exp pinkfish $ */ /* Modified by Shadyman@QS to work with upgraded SQL capabilities, 11-Aug-2008 */ /** * The header file for the database package. Include this if your * object is going to make SQL queries to the database. */ #ifndef DB_H #define DB_H /** * Use this macro to properly escape text that you wish to use in an * SQL query. */ #define db_escape(query) replace_string((query), "'", "\\'") /** * This is the handler to the database object. */ #define DB_HANDLER "/secure/daemon/mysql" /** * This should be the value returned if we have success. */ #define DB_SUCCESS 0 /** * THis is the error value if a socket was unable to be opened for * some reason. */ #define DB_ERROR_BAD_SOCKET -1 /** * Set up Database Log */ #define SQL_LOG "sql" /** * Set up Database Access * This is the database and username that the mud in general will use to connect * Never allow this user access to 'sensitive' tables, like passwords, etc. * ALWAYS treat this user like it is insecure, because it likely IS. */ //Default database name #define CONFIG_DB "mud" //General database user (least priviledges) #define CONFIG_DB_USER "mud" //General database user's password #define CONFIG_DB_PASS "" /** * Set up Database Connection */ //If your sql server is on another machine, enter its IP here. Otherwise, use "127.0.0.1" #define CONFIG_DB_HOST "127.0.0.1" //If your sql server is not on the default port, enter its port here. Otherwise, use "3306" #define CONFIG_DB_PORT "3306" /** * Enable/Disable SQL features: * Global switch for SQL features */ //Save basic user data and encrypted password to MySQL (for access from a web app?) #define SQL_PLAYERSAVE 1 //Save chat logs to MySQL instead of to file? #define SQL_CHAT_LOGGING 1 //Save backups of .o files to MySQL... Revisioning? #define SQL_OBJECT_BACKUP 1 //Log deaths and kills to MySQL. #define SQL_DEATH_LOGGING 1 //Log connections, disconnections, linkdeads and reconnects to MySQL #define SQL_CONNECT_LOGGING 1 //Log to MySQL instead of /log or /secure/log. #define SQL_FILE_LOGGING 1 //Save and load the economy (currency and exchange) to MySQL. #define SQL_ECONOMY 1 //Save and load races to MySQL. LATER. #define SQL_RACES 0 //Save and load bug reports to MySQL. LATER. #define SQL_BUGS 0 //Save and load bulletin boards to MySQL. LATER. #define SQL_BBOARD 0 #endif /* DB_H */