From The Mana World
Revision as of 06:00, 2 May 2009 by Freeyorp (talk | contribs) (New page: <pre> From 898b976d5e6077c37ac369b571b5f364804bee8f Mon Sep 17 00:00:00 2001 From: Freeyorp <Freeyorp101@NOSPAM@hotmail.com> Date: Sat, 2 May 2009 13:27:36 +1200 Subject: [PATCH] Fix the /...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
From 898b976d5e6077c37ac369b571b5f364804bee8f Mon Sep 17 00:00:00 2001
From: Freeyorp <Freeyorp101@NOSPAM@hotmail.com>
Date: Sat, 2 May 2009 13:27:36 +1200
Subject: [PATCH] Fix the /where command to include coordinates.

---
 src/commandhandler.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index 82da2f9..0e449bb 100644
--- a/src/commandhandler.cpp
+++ b/src/commandhandler.cpp
@@ -311,8 +311,9 @@ void CommandHandler::handleHelp(const std::string &args, ChatTab *tab)
 
 void CommandHandler::handleWhere(const std::string &args, ChatTab *tab)
 {
-    // TODO: add position
-    tab->chatLog(map_path, BY_SERVER);
+    std::ostringstream where;
+    where << map_path << ", coordinates: " << player_node->mX << ", " << player_node->mY;
+    tab->chatLog(where.str(), BY_SERVER);
 }
 
 void CommandHandler::handleWho(const std::string &args, ChatTab *tab)
-- 
1.6.0.4