Skip to content

Commit 7f239bb

Browse files
authored
Prevent clients from spamming global chat using sm_nominate (#1217)
1 parent 23efe26 commit 7f239bb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugins/nominations.sp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,11 @@ void AttemptNominate(int client, const char[] map, int size)
351351
char name[MAX_NAME_LENGTH];
352352
GetClientName(client, name, sizeof(name));
353353

354-
PrintToChatAll("[SM] %t", "Map Nominated", name, displayName);
354+
if (result == Nominate_Added) {
355+
PrintToChatAll("[SM] %t", "Map Nominated", name, displayName);
356+
} else {
357+
ReplyToCommand(client, "[SM] %t", "Map Nominated", name, displayName);
358+
}
355359

356360
return;
357361
}

0 commit comments

Comments
 (0)