fixed sm_unmute not removing session mutes from the DB

This commit is contained in:
BotoX 2016-05-12 21:31:12 +02:00
parent 5bc361b5bb
commit 5528e16739

View File

@ -2338,7 +2338,6 @@ stock ProcessUnBlock(client, targetId = 0, type, String:sReason[] = "", const St
else
{
decl String:typeWHERE[100];
new bool:dontCheckDB = false;
new target = target_list[0];
if (IsClientInGame(target))
@ -2360,11 +2359,7 @@ stock ProcessUnBlock(client, targetId = 0, type, String:sReason[] = "", const St
return;
}
else
{
FormatEx(typeWHERE, sizeof(typeWHERE), "c.type = '%d'", TYPE_MUTE);
if (g_MuteType[target] == bSess)
dontCheckDB = true;
}
}
//-------------------------------------------------------------------------------------------------
case TYPE_UNGAG:
@ -2375,11 +2370,7 @@ stock ProcessUnBlock(client, targetId = 0, type, String:sReason[] = "", const St
return;
}
else
{
FormatEx(typeWHERE, sizeof(typeWHERE), "c.type = '%d'", TYPE_GAG);
if (g_GagType[target] == bSess)
dontCheckDB = true;
}
}
//-------------------------------------------------------------------------------------------------
case TYPE_UNSILENCE:
@ -2390,11 +2381,7 @@ stock ProcessUnBlock(client, targetId = 0, type, String:sReason[] = "", const St
return;
}
else
{
FormatEx(typeWHERE, sizeof(typeWHERE), "(c.type = '%d' OR c.type = '%d')", TYPE_MUTE, TYPE_GAG);
if (g_MuteType[target] == bSess && g_GagType[target] == bSess)
dontCheckDB = true;
}
}
}
@ -2408,7 +2395,7 @@ stock ProcessUnBlock(client, targetId = 0, type, String:sReason[] = "", const St
WritePackString(dataPack, reason);
// Check current player status. If player has temporary punishment - don't get info from DB
if (!dontCheckDB && DB_Connect())
if (DB_Connect())
{
decl String:sAdminAuthEscaped[sizeof(adminAuth) * 2 + 1];
decl String:sAdminAuthYZEscaped[sizeof(adminAuth) * 2 + 1];