summaryrefslogtreecommitdiff
path: root/src/gui/socialwindow.cpp
diff options
context:
space:
mode:
authorStefan Dombrowski <stefan@uni-bonn.de>2010-10-02 15:59:46 +0200
committerStefan Dombrowski <stefan@uni-bonn.de>2010-10-02 15:59:46 +0200
commite6acf6e2f17b4177f3f8292f52d83b46822ab9c5 (patch)
tree0ddedcd8ad6b2f7908e702365cd675f490213c8d /src/gui/socialwindow.cpp
parentfd20b774bf057502ea04090051fad2c5c9351c74 (diff)
downloadmana-e6acf6e2f17b4177f3f8292f52d83b46822ab9c5.tar.gz
mana-e6acf6e2f17b4177f3f8292f52d83b46822ab9c5.tar.bz2
mana-e6acf6e2f17b4177f3f8292f52d83b46822ab9c5.tar.xz
mana-e6acf6e2f17b4177f3f8292f52d83b46822ab9c5.zip
Avoiding the creation of a party or guild without a name
If no name is given, then the player obviously didn't want to create it. Now the empty input is handled just the same way as in the invite dialog. Trivial fix.
Diffstat (limited to 'src/gui/socialwindow.cpp')
-rw-r--r--src/gui/socialwindow.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index 290fd557..7944e210 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -500,12 +500,13 @@ void SocialWindow::action(const gcn::ActionEvent &event)
{
localChatTab->chatLog(_("Creating guild failed, please choose a "
"shorter name."), BY_SERVER);
- return;
}
-
- Net::getGuildHandler()->create(name);
- localChatTab->chatLog(strprintf(_("Creating guild called %s."),
- name.c_str()), BY_SERVER);
+ else if (!name.empty())
+ {
+ Net::getGuildHandler()->create(name);
+ localChatTab->chatLog(strprintf(_("Creating guild called %s."),
+ name.c_str()), BY_SERVER);
+ }
mGuildCreateDialog = NULL;
}
@@ -521,12 +522,13 @@ void SocialWindow::action(const gcn::ActionEvent &event)
{
localChatTab->chatLog(_("Creating party failed, please choose a "
"shorter name."), BY_SERVER);
- return;
}
-
- Net::getPartyHandler()->create(name);
- localChatTab->chatLog(strprintf(_("Creating party called %s."),
- name.c_str()), BY_SERVER);
+ else if (!name.empty())
+ {
+ Net::getPartyHandler()->create(name);
+ localChatTab->chatLog(strprintf(_("Creating party called %s."),
+ name.c_str()), BY_SERVER);
+ }
mPartyCreateDialog = NULL;
}