super simple queries for retired and mappers
This commit is contained in:
parent
42dec7581b
commit
d80a354e18
@ -180,7 +180,7 @@ public void SQL_FUCKYOU(Database db, DBResultSet results, const char[] error, in
|
||||
{
|
||||
int client;
|
||||
if ((client = GetClientFromSerial(data)) == 0)
|
||||
return;
|
||||
return;
|
||||
|
||||
if (results.RowCount && results.FetchRow())
|
||||
{
|
||||
@ -188,6 +188,52 @@ public void SQL_FUCKYOU(Database db, DBResultSet results, const char[] error, in
|
||||
}
|
||||
else
|
||||
{
|
||||
char sSID[32];
|
||||
GetClientAuthId(client, AuthId_Steam2, sSID, sizeof(sSID));
|
||||
char sSteamID64[32];
|
||||
SteamID32toSteamID64(sSID, sSteamID64, sizeof(sSteamID64));
|
||||
char sRequest[256];
|
||||
Format(sRequest, sizeof(sRequest), "select * from unloze_forum.xf_user xfu inner join unloze_forum.xf_user_external_auth xuea ON xfu.user_id = xuea.user_id where find_in_set('6',secondary_group_ids) <> 0 and provider_key = '%s'", sSteamID64);
|
||||
g_hDatabase.Query(SQL_FUCKYOU_mapper, sRequest, GetClientSerial(client));
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void SQL_FUCKYOU_mapper(Database db, DBResultSet results, const char[] error, int data)
|
||||
{
|
||||
int client;
|
||||
if ((client = GetClientFromSerial(data)) == 0)
|
||||
return;
|
||||
|
||||
if (results.RowCount && results.FetchRow())
|
||||
{
|
||||
OnClientAuthorized_OnTransferResponse("Game-Donator", data);
|
||||
}
|
||||
else
|
||||
{
|
||||
char sSID[32];
|
||||
GetClientAuthId(client, AuthId_Steam2, sSID, sizeof(sSID));
|
||||
char sSteamID64[32];
|
||||
SteamID32toSteamID64(sSID, sSteamID64, sizeof(sSteamID64));
|
||||
char sRequest[256];
|
||||
Format(sRequest, sizeof(sRequest), "select * from unloze_forum.xf_user xfu inner join unloze_forum.xf_user_external_auth xuea ON xfu.user_id = xuea.user_id where find_in_set('21',secondary_group_ids) <> 0 and provider_key = '%s'", sSteamID64);
|
||||
g_hDatabase.Query(SQL_FUCKYOU_retired, sRequest, GetClientSerial(client));
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void SQL_FUCKYOU_retired(Database db, DBResultSet results, const char[] error, int data)
|
||||
{
|
||||
if (results.RowCount && results.FetchRow())
|
||||
{
|
||||
OnClientAuthorized_OnTransferResponse("Game-Donator", data);
|
||||
}
|
||||
else
|
||||
{
|
||||
OnClientAuthorized_OnTransferResponse("NOGROUP", data);
|
||||
}
|
||||
}
|
||||
@ -205,7 +251,7 @@ public int OnClientAuthorized_OnTransferResponse(char[] sData, int iSerial)
|
||||
TrimString(sData);
|
||||
StripQuotes(sData);
|
||||
|
||||
LogMessage("reached sData with status 200: %s", sData);
|
||||
//LogMessage("reached sData with status 200: %s", sData);
|
||||
strcopy(G_sGroup[client], sizeof(G_sGroup[]), sData);
|
||||
|
||||
G_bResponsePassed[client] = true;
|
||||
@ -305,6 +351,44 @@ public void SQL_FUCKYOU2(Database db, DBResultSet results, const char[] error, D
|
||||
}
|
||||
else
|
||||
{
|
||||
char sSID[32];
|
||||
ResetPack(fuck);
|
||||
fuck.ReadString(sSID, sizeof(sSID));
|
||||
char sSteamID64[32];
|
||||
SteamID32toSteamID64(sSID, sSteamID64, sizeof(sSteamID64));
|
||||
char sRequest[256];
|
||||
Format(sRequest, sizeof(sRequest), "select * from unloze_forum.xf_user xfu inner join unloze_forum.xf_user_external_auth xuea ON xfu.user_id = xuea.user_id where find_in_set('6',secondary_group_ids) <> 0 and provider_key = '%s'", sSteamID64);
|
||||
g_hDatabase.Query(SQL_FUCKYOU_mapper2, sRequest, fuck);
|
||||
}
|
||||
}
|
||||
|
||||
public void SQL_FUCKYOU_mapper2(Database db, DBResultSet results, const char[] error, DataPack fuck)
|
||||
{
|
||||
if (results.RowCount && results.FetchRow())
|
||||
{
|
||||
Native_AsyncHasSteamIDReservedSlot_OnTransferResponse("Game-Donator", fuck);
|
||||
}
|
||||
else
|
||||
{
|
||||
char sSID[32];
|
||||
ResetPack(fuck);
|
||||
fuck.ReadString(sSID, sizeof(sSID));
|
||||
char sSteamID64[32];
|
||||
SteamID32toSteamID64(sSID, sSteamID64, sizeof(sSteamID64));
|
||||
char sRequest[256];
|
||||
Format(sRequest, sizeof(sRequest), "select * from unloze_forum.xf_user xfu inner join unloze_forum.xf_user_external_auth xuea ON xfu.user_id = xuea.user_id where find_in_set('21',secondary_group_ids) <> 0 and provider_key = '%s'", sSteamID64);
|
||||
g_hDatabase.Query(SQL_FUCKYOU_retired2, sRequest, fuck);
|
||||
}
|
||||
}
|
||||
|
||||
public void SQL_FUCKYOU_retired2(Database db, DBResultSet results, const char[] error, DataPack fuck)
|
||||
{
|
||||
if (results.RowCount && results.FetchRow())
|
||||
{
|
||||
Native_AsyncHasSteamIDReservedSlot_OnTransferResponse("Game-Donator", fuck);
|
||||
}
|
||||
else
|
||||
{
|
||||
Native_AsyncHasSteamIDReservedSlot_OnTransferResponse("NOGROUP", fuck);
|
||||
}
|
||||
}
|
||||
@ -407,4 +491,4 @@ stock void PrintToMe(char[] sText, any:...)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user