sourcecomms: Logging fix
This commit is contained in:
parent
6fc117efa7
commit
3b40aa0a77
@ -2057,7 +2057,7 @@ stock CreateBlock(client, targetId = 0, length = -1, type, const String:sReason[
|
||||
|
||||
decl target_list[MAXPLAYERS], target_count, bool:tn_is_ml, String:target_name[MAX_NAME_LENGTH];
|
||||
new String:reason[256];
|
||||
new bool:skipped = false;
|
||||
new bool:success = false;
|
||||
|
||||
// checking args
|
||||
if (targetId)
|
||||
@ -2154,7 +2154,6 @@ stock CreateBlock(client, targetId = 0, length = -1, type, const String:sReason[
|
||||
{
|
||||
// The target has not been blocks verify. It must be completed before you can block anyone.
|
||||
ReplyToCommand(client, "%s%t", PREFIX, "Player Comms Not Verified");
|
||||
skipped = true;
|
||||
continue; // skip
|
||||
}
|
||||
|
||||
@ -2169,6 +2168,7 @@ stock CreateBlock(client, targetId = 0, length = -1, type, const String:sReason[
|
||||
#endif
|
||||
|
||||
PerformMute(target, _, length, g_sName[client], adminAuth, admImmunity, reason);
|
||||
success = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2178,7 +2178,6 @@ stock CreateBlock(client, targetId = 0, length = -1, type, const String:sReason[
|
||||
|
||||
ReplyToCommand(client, "%s%t", PREFIX, "Player already muted", g_sName[target]);
|
||||
|
||||
skipped = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -2192,6 +2191,7 @@ stock CreateBlock(client, targetId = 0, length = -1, type, const String:sReason[
|
||||
#endif
|
||||
|
||||
PerformGag(target, _, length, g_sName[client], adminAuth, admImmunity, reason);
|
||||
success = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2201,7 +2201,6 @@ stock CreateBlock(client, targetId = 0, length = -1, type, const String:sReason[
|
||||
|
||||
ReplyToCommand(client, "%s%t", PREFIX, "Player already gagged", g_sName[target]);
|
||||
|
||||
skipped = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -2216,6 +2215,7 @@ stock CreateBlock(client, targetId = 0, length = -1, type, const String:sReason[
|
||||
|
||||
PerformMute(target, _, length, g_sName[client], adminAuth, admImmunity, reason);
|
||||
PerformGag(target, _, length, g_sName[client], adminAuth, admImmunity, reason);
|
||||
success = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2225,13 +2225,12 @@ stock CreateBlock(client, targetId = 0, length = -1, type, const String:sReason[
|
||||
|
||||
ReplyToCommand(client, "%s%t", PREFIX, "Player already silenced", g_sName[target]);
|
||||
|
||||
skipped = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (target_count == 1 && !skipped)
|
||||
if (target_count == 1 && success)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@ -2249,8 +2248,9 @@ stock CreateBlock(client, targetId = 0, length = -1, type, const String:sReason[
|
||||
}
|
||||
}
|
||||
SavePunishment(client, target_list[0], type, length, reason);
|
||||
ShowActivityToServer(client, type, length, reason, target_name, tn_is_ml);
|
||||
}
|
||||
if (target_count > 1 || skipped)
|
||||
if (target_count > 1 && success)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user