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];
|
decl target_list[MAXPLAYERS], target_count, bool:tn_is_ml, String:target_name[MAX_NAME_LENGTH];
|
||||||
new String:reason[256];
|
new String:reason[256];
|
||||||
new bool:skipped = false;
|
new bool:success = false;
|
||||||
|
|
||||||
// checking args
|
// checking args
|
||||||
if (targetId)
|
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.
|
// 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");
|
ReplyToCommand(client, "%s%t", PREFIX, "Player Comms Not Verified");
|
||||||
skipped = true;
|
|
||||||
continue; // skip
|
continue; // skip
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2169,6 +2168,7 @@ stock CreateBlock(client, targetId = 0, length = -1, type, const String:sReason[
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
PerformMute(target, _, length, g_sName[client], adminAuth, admImmunity, reason);
|
PerformMute(target, _, length, g_sName[client], adminAuth, admImmunity, reason);
|
||||||
|
success = true;
|
||||||
}
|
}
|
||||||
else
|
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]);
|
ReplyToCommand(client, "%s%t", PREFIX, "Player already muted", g_sName[target]);
|
||||||
|
|
||||||
skipped = true;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2192,6 +2191,7 @@ stock CreateBlock(client, targetId = 0, length = -1, type, const String:sReason[
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
PerformGag(target, _, length, g_sName[client], adminAuth, admImmunity, reason);
|
PerformGag(target, _, length, g_sName[client], adminAuth, admImmunity, reason);
|
||||||
|
success = true;
|
||||||
}
|
}
|
||||||
else
|
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]);
|
ReplyToCommand(client, "%s%t", PREFIX, "Player already gagged", g_sName[target]);
|
||||||
|
|
||||||
skipped = true;
|
|
||||||
continue;
|
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);
|
PerformMute(target, _, length, g_sName[client], adminAuth, admImmunity, reason);
|
||||||
PerformGag(target, _, length, g_sName[client], adminAuth, admImmunity, reason);
|
PerformGag(target, _, length, g_sName[client], adminAuth, admImmunity, reason);
|
||||||
|
success = true;
|
||||||
}
|
}
|
||||||
else
|
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]);
|
ReplyToCommand(client, "%s%t", PREFIX, "Player already silenced", g_sName[target]);
|
||||||
|
|
||||||
skipped = true;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (target_count == 1 && !skipped)
|
if (target_count == 1 && success)
|
||||||
{
|
{
|
||||||
switch (type)
|
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);
|
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)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user