diff options
-rw-r--r-- | src/gui/chat.cpp | 8 | ||||
-rw-r--r-- | src/resources/itemdb.cpp | 9 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index b4b533db..4c03f618 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -364,6 +364,14 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg) if (end != std::string::npos) { std::string temp = msg.substr(start+1, end-1); + + for (unsigned int i = 0; i < temp.size(); i++) + { + temp[i] = (char) tolower(temp[i]); + } + + std::cout << temp << std::endl; + ItemInfo itemInfo = ItemDB::get(temp); msg.insert(end, "@@"); msg.insert(start+1, "|"); diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 53e7530b..d27ad23d 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -124,7 +124,14 @@ void ItemDB::load() NamedItemInfoIterator itr = mNamedItemInfos.find(name); if (itr == mNamedItemInfos.end()) { - mNamedItemInfos[name] = itemInfo; + std::string temp = name; + + for (unsigned int i = 0; i < temp.size(); i++) + { + temp[i] = (char) tolower(temp[i]); + } + + mNamedItemInfos[temp] = itemInfo; } else { |