From ef9eec73b3cc96ebecdc061e9e956a462fdcc19f Mon Sep 17 00:00:00 2001 From: Stefan Dombrowski Date: Fri, 27 Aug 2010 19:03:18 +0200 Subject: Changing findBeingByName so that it searches case insensitive Adding error message when trying to create a party with to long name. Removing non-existing files from C::B project. Signed-off-by: Jared Adams --- src/beingmanager.cpp | 2 +- src/gui/socialwindow.cpp | 6 ++++-- src/net/tmwa/partyhandler.cpp | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/beingmanager.cpp b/src/beingmanager.cpp index 656b297e..931e4579 100644 --- a/src/beingmanager.cpp +++ b/src/beingmanager.cpp @@ -165,7 +165,7 @@ Being *BeingManager::findBeingByName(const std::string &name, i != i_end; ++i) { Being *being = (*i); - if (being->getName() == name && + if (!compareStrI(being->getName(),name) && (type == Being::UNKNOWN || type == being->getType())) return being; } diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 3d8afa44..290fd557 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -498,7 +498,8 @@ void SocialWindow::action(const gcn::ActionEvent &event) if (name.size() > 16) { - // TODO : State too many characters in input. + localChatTab->chatLog(_("Creating guild failed, please choose a " + "shorter name."), BY_SERVER); return; } @@ -518,7 +519,8 @@ void SocialWindow::action(const gcn::ActionEvent &event) if (name.size() > 16) { - // TODO : State too many characters in input. + localChatTab->chatLog(_("Creating party failed, please choose a " + "shorter name."), BY_SERVER); return; } diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp index 76108e9c..a88a27b6 100644 --- a/src/net/tmwa/partyhandler.cpp +++ b/src/net/tmwa/partyhandler.cpp @@ -333,7 +333,7 @@ void PartyHandler::invite(const std::string &name) { invite((Player *)invitee); partyTab->chatLog(strprintf(_("Invited user %s to party."), - name.c_str()), BY_SERVER); + invitee->getName().c_str()), BY_SERVER); } else if (partyTab) { -- cgit v1.2.3-70-g09d2