Merge branch 'master' into jgrpp

# Conflicts:
#	src/genworld_gui.cpp
#	src/group_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings_gui.cpp
#	src/toolbar_gui.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
This commit is contained in:
Jonathan G Rennison
2019-04-11 18:12:22 +01:00
53 changed files with 587 additions and 627 deletions

View File

@@ -556,7 +556,7 @@ DEF_CONSOLE_CMD(ConUnBan)
/* Try by IP. */
uint index;
for (index = 0; index < _network_ban_list.size(); index++) {
if (strcmp(_network_ban_list[index], argv[1]) == 0) break;
if (_network_ban_list[index] == argv[1]) break;
}
/* Try by index. */
@@ -566,9 +566,8 @@ DEF_CONSOLE_CMD(ConUnBan)
if (index < _network_ban_list.size()) {
char msg[64];
seprintf(msg, lastof(msg), "Unbanned %s", _network_ban_list[index]);
seprintf(msg, lastof(msg), "Unbanned %s", _network_ban_list[index].c_str());
IConsolePrint(CC_DEFAULT, msg);
free(_network_ban_list[index]);
_network_ban_list.erase(_network_ban_list.begin() + index);
} else {
IConsolePrint(CC_DEFAULT, "Invalid list index or IP not in ban-list.");
@@ -588,8 +587,8 @@ DEF_CONSOLE_CMD(ConBanList)
IConsolePrint(CC_DEFAULT, "Banlist: ");
uint i = 1;
for (char *entry : _network_ban_list) {
IConsolePrintF(CC_DEFAULT, " %d) %s", i, entry);
for (const auto &entry : _network_ban_list) {
IConsolePrintF(CC_DEFAULT, " %d) %s", i, entry.c_str());
}
return true;