summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-27 02:14:39 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-27 02:14:39 +0300
commita714a339ac461943236eb1992c38dfb16821d0a1 (patch)
treed82615ef2330e1f052af4b21a2d448f751cad579 /src/actions
parent1b496351f779d4a897cd882a9928a18bab5ba622 (diff)
downloadmv-a714a339ac461943236eb1992c38dfb16821d0a1.tar.gz
mv-a714a339ac461943236eb1992c38dfb16821d0a1.tar.bz2
mv-a714a339ac461943236eb1992c38dfb16821d0a1.tar.xz
mv-a714a339ac461943236eb1992c38dfb16821d0a1.zip
Move chat command /dumpe into actions.
Also move some functions into chatutils.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/actions.cpp21
-rw-r--r--src/actions/actions.h1
2 files changed, 22 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 397b0225d..4717ff6ab 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -21,9 +21,11 @@
#include "actions/actions.h"
#include "actormanager.h"
+#include "configuration.h"
#include "dropshortcut.h"
#include "emoteshortcut.h"
#include "game.h"
+#include "guild.h"
#include "itemshortcut.h"
#include "soundmanager.h"
@@ -34,6 +36,7 @@
#include "being/playerinfo.h"
#include "being/playerrelations.h"
+#include "gui/chatconsts.h"
#include "gui/dialogsmanager.h"
#include "gui/gui.h"
#include "gui/popupmanager.h"
@@ -67,6 +70,7 @@
#include "gui/windows/updaterwindow.h"
#include "gui/widgets/tabs/chattab.h"
+#include "gui/widgets/tabs/chattabtype.h"
#include "render/graphics.h"
@@ -75,6 +79,7 @@
#include "net/gamehandler.h"
#include "net/ipc.h"
#include "net/net.h"
+#include "net/partyhandler.h"
#include "net/playerhandler.h"
#include "net/tradehandler.h"
@@ -84,6 +89,7 @@
#include "resources/map/map.h"
+#include "utils/chatutils.h"
#include "utils/gettext.h"
#include "utils/timer.h"
@@ -99,6 +105,7 @@ extern ShortcutWindow *spellShortcutWindow;
extern std::string tradePartnerName;
extern QuitDialog *quitDialog;
extern int start_time;
+extern char **environ;
namespace Actions
{
@@ -932,4 +939,18 @@ impHandler(dumpGraphics)
return true;
}
+impHandler0(dumpEnvironment)
+{
+ logger->log1("Start environment variables");
+ for (char **env = environ; *env; ++ env)
+ logger->log1(*env);
+ logger->log1("End environment variables");
+ if (debugChatTab)
+ {
+ // TRANSLATORS: dump environment command
+ debugChatTab->chatLog(_("Environment variables dumped"));
+ }
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/actions.h b/src/actions/actions.h
index d1225a424..773d34e36 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -73,6 +73,7 @@ namespace Actions
decHandler(serverUnIgnoreAll);
decHandler(error) __attribute__ ((noreturn));
decHandler(dumpGraphics);
+ decHandler(dumpEnvironment);
} // namespace Actions
#undef decHandler