make config.cfg a distribution template

This commit is contained in:
fusion32 2025-10-16 00:47:01 -03:00
parent c3b333af90
commit 85b75f7737
4 changed files with 13 additions and 13 deletions

1
.gitignore vendored
View File

@ -5,5 +5,6 @@ build
local local
*.log *.log
*.db *.db
config.cfg
compile_commands.json compile_commands.json

View File

@ -3,8 +3,8 @@ MaxCachedHostNames = 100
HostNameExpireTime = 30m HostNameExpireTime = 30m
# SQLite Config # SQLite Config
#SQLite.File = "tibia.db" SQLite.File = "tibia.db"
#SQLite.MaxCachedStatements = 100 SQLite.MaxCachedStatements = 100
# PostgreSQL Config # PostgreSQL Config
# NOTE(fusion): These options are passed directly to `PQconnectdbParams`. # NOTE(fusion): These options are passed directly to `PQconnectdbParams`.
@ -15,8 +15,7 @@ PostgreSQL.Host = "localhost"
PostgreSQL.Port = "5432" PostgreSQL.Port = "5432"
PostgreSQL.DBName = "tibia" PostgreSQL.DBName = "tibia"
PostgreSQL.User = "tibia" PostgreSQL.User = "tibia"
#PostgreSQL.Password = "" PostgreSQL.Password = ""
PostgreSQL.Password = "password"
PostgreSQL.ConnectTimeout = "" PostgreSQL.ConnectTimeout = ""
PostgreSQL.ClientEncoding = "UTF8" PostgreSQL.ClientEncoding = "UTF8"
PostgreSQL.ApplicationName = "QueryManager" PostgreSQL.ApplicationName = "QueryManager"
@ -25,13 +24,13 @@ PostgreSQL.SSLRootCert = ""
PostgreSQL.MaxCachedStatements = 100 PostgreSQL.MaxCachedStatements = 100
# MySQL/MariaDB Config # MySQL/MariaDB Config
#MySQL.Host = "localhost" MySQL.Host = "localhost"
#MySQL.Port = "3306" MySQL.Port = "3306"
#MySQL.DBName = "tibia" MySQL.DBName = "tibia"
#MySQL.User = "tibia" MySQL.User = "tibia"
#MySQL.Password = "" MySQL.Password = ""
#MySQL.UnixSocket = "" MySQL.UnixSocket = ""
#MySQL.MaxCachedStatements = 100 MySQL.MaxCachedStatements = 100
# Connection Config # Connection Config
QueryManagerPort = 7173 QueryManagerPort = 7173

View File

@ -145,7 +145,7 @@ static void ParamBool(ParamBuffer *Params, bool Value){
if(Params->PreferredFormat == 1){ // BINARY FORMAT if(Params->PreferredFormat == 1){ // BINARY FORMAT
uint8 Data = (Value ? 0x01 : 0x00); uint8 Data = (Value ? 0x01 : 0x00);
InsertBinaryParam(Params, &Data, 1); InsertBinaryParam(Params, &Data, 1);
}else{ // TEXT FORMAT }else{
InsertTextParam(Params, (Value ? "TRUE" : "FALSE")); InsertTextParam(Params, (Value ? "TRUE" : "FALSE"));
} }
} }

View File

@ -642,7 +642,7 @@ public:
// String Buffer // String Buffer
//============================================================================== //==============================================================================
template<int N = KB(2)> template<int N>
struct StringBuffer{ struct StringBuffer{
private: private:
STATIC_ASSERT(N > 0); STATIC_ASSERT(N > 0);