summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-02-08 16:20:39 -0700
committerJared Adams <jaxad0127@gmail.com>2010-02-08 16:20:39 -0700
commit308302f858d24d2cc1b1601b100324e2baa50765 (patch)
treebf76a3e5feb37fc700dbb2738f3b8c1c0f0fc655 /src/net
parenta4007a7f8f253e90bb189cfb22b3e0c798440bdc (diff)
downloadmana-308302f858d24d2cc1b1601b100324e2baa50765.tar.gz
mana-308302f858d24d2cc1b1601b100324e2baa50765.tar.bz2
mana-308302f858d24d2cc1b1601b100324e2baa50765.tar.xz
mana-308302f858d24d2cc1b1601b100324e2baa50765.zip
Move party creation command from eA's PartyTab to CommandHandler
Also fix party invite by name when you aren't in a party.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/gui/partytab.cpp10
-rw-r--r--src/net/ea/partyhandler.cpp12
2 files changed, 12 insertions, 10 deletions
diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp
index e6526a3a..bcb449ab 100644
--- a/src/net/ea/gui/partytab.cpp
+++ b/src/net/ea/gui/partytab.cpp
@@ -55,8 +55,6 @@ void PartyTab::handleInput(const std::string &msg)
void PartyTab::showHelp()
{
chatLog(_("/help > Display this help."));
- chatLog(_("/create > Create a new party"));
- chatLog(_("/new > Alias of create"));
chatLog(_("/invite > Invite a player to your party"));
chatLog(_("/leave > Leave the party you are in"));
chatLog(_("/kick > Kick some one from the party you are in"));
@@ -68,13 +66,7 @@ bool PartyTab::handleCommand(const std::string &type, const std::string &args)
{
if (type == "help")
{
- if (args == "create" || args == "new")
- {
- chatLog(_("Command: /new <party-name>"));
- chatLog(_("Command: /create <party-name>"));
- chatLog(_("These commands create a new party called <party-name>."));
- }
- else if (args == "invite")
+ if (args == "invite")
{
chatLog(_("Command: /invite <nick>"));
chatLog(_("This command invites <nick> to party with you."));
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index 030914b4..ddbe567f 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -320,7 +320,17 @@ void PartyHandler::invite(Player *player)
void PartyHandler::invite(const std::string &name)
{
- partyTab->chatLog(_("Inviting like this isn't supported at the moment."), BY_SERVER);
+ if (partyTab)
+ {
+ partyTab->chatLog(_("Inviting like this isn't supported at the moment."),
+ BY_SERVER);
+ }
+ else
+ {
+ localChatTab->chatLog(_("You can only inivte when you are in a party!"),
+ BY_SERVER);
+ }
+
// TODO?
}