mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r5284) -Backport: r5264
-Fix: The wrong IP could get unbanned, e.g. 'unban 1.2.3.42' could result in unbanning 1.2.3.4
This commit is contained in:
parent
91fc18dcdc
commit
73dab80259
|
@ -433,7 +433,7 @@ DEF_CONSOLE_CMD(ConUnBan)
|
||||||
for (i = 0; i < lengthof(_network_ban_list); i++) {
|
for (i = 0; i < lengthof(_network_ban_list); i++) {
|
||||||
if (_network_ban_list[i] == NULL) continue;
|
if (_network_ban_list[i] == NULL) continue;
|
||||||
|
|
||||||
if (strncmp(_network_ban_list[i], argv[1], strlen(_network_ban_list[i])) == 0 || index == i) {
|
if (strcmp(_network_ban_list[i], argv[1]) == 0 || index == i) {
|
||||||
free(_network_ban_list[i]);
|
free(_network_ban_list[i]);
|
||||||
_network_ban_list[i] = NULL;
|
_network_ban_list[i] = NULL;
|
||||||
IConsolePrint(_icolour_def, "IP unbanned.");
|
IConsolePrint(_icolour_def, "IP unbanned.");
|
||||||
|
|
Loading…
Reference in New Issue