Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-24 16:40:06 +0000
committerStijn Buys <ingar@osirion.org>2008-05-24 16:40:06 +0000
commit274fcfe8d3fc5b54b345d79fab6dd4bbdb544892 (patch)
tree6c452ce4c5d411334024e49d67182c6402e1a0d7 /src/core/gameserver.cc
parent191a300e67edba6ae6a12a37ceb03b4f12f3ba08 (diff)
aux::lowercase, aux::to_lowercase
Diffstat (limited to 'src/core/gameserver.cc')
-rw-r--r--src/core/gameserver.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/gameserver.cc b/src/core/gameserver.cc
index 687623e..5d973f1 100644
--- a/src/core/gameserver.cc
+++ b/src/core/gameserver.cc
@@ -115,6 +115,8 @@ void GameServer::abort()
Player *GameServer::find_player(std::string const search)
{
+ using aux::lowercase;
+
std::istringstream searchstr(search);
int id = 0;
if (searchstr >> id) {
@@ -129,7 +131,7 @@ Player *GameServer::find_player(std::string const search)
return 0;
for (std::list<Player *>:: iterator it = players.begin(); it != players.end(); it++) {
- if ((*it)->name().find(search) != std::string::npos)
+ if (lowercase((*it)->name()).find(lowercase(search)) != std::string::npos)
return (*it);
}