Skip to content

Commit

Permalink
Add a check after connecting for the dbi driver and fail if it's not …
Browse files Browse the repository at this point in the history
…mysql
  • Loading branch information
Impact123 committed Jan 9, 2019
1 parent a658db0 commit e291dac
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gameserver/calladmin_mysql.sp
Expand Up @@ -373,6 +373,15 @@ public void SQLT_ConnectCallback(Database db, const char[] error, any data)
{
g_hDbHandle = db;

// We only support the mysql driver
char ident[32];
g_hDbHandle.Driver.GetIdentifier(ident, sizeof(ident));
if (!StrEqual(ident, "mysql"))
{
CallAdmin_LogMessage("ConErr: driver id %s, expected mysql", ident);
SetFailState("ConErr: driver id %s, expected mysql", ident);
}

g_hDbHandle.SetCharset("utf8");

// Create main Table
Expand Down

0 comments on commit e291dac

Please sign in to comment.