summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/adminhandler.h2
-rw-r--r--src/net/eathena/adminhandler.cpp10
-rw-r--r--src/net/eathena/adminhandler.h2
-rw-r--r--src/net/tmwa/adminhandler.cpp4
-rw-r--r--src/net/tmwa/adminhandler.h3
5 files changed, 20 insertions, 1 deletions
diff --git a/src/net/adminhandler.h b/src/net/adminhandler.h
index 38e909cdb..b839096a8 100644
--- a/src/net/adminhandler.h
+++ b/src/net/adminhandler.h
@@ -106,6 +106,8 @@ class AdminHandler notfinal
virtual void mobSearch(const std::string &name) const = 0;
virtual void mobSpawnSearch(const std::string &name) const = 0;
+
+ virtual void playerGmCommands(const std::string &name) const = 0;
};
} // namespace Net
diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp
index 630062167..e15c1dd19 100644
--- a/src/net/eathena/adminhandler.cpp
+++ b/src/net/eathena/adminhandler.cpp
@@ -22,7 +22,7 @@
#include "net/eathena/adminhandler.h"
-#include "being/being.h"
+#include "being/localplayer.h"
#include "const/gui/chat.h"
@@ -187,4 +187,12 @@ void AdminHandler::mobSpawnSearch(const std::string &name) const
chatHandler->talk("@whereis " + name, GENERAL_CHANNEL);
}
+void AdminHandler::playerGmCommands(const std::string &name) const
+{
+ if (name.empty() || (localPlayer && name == localPlayer->getName()))
+ chatHandler->talk("@commands", GENERAL_CHANNEL);
+ else
+ chatHandler->talk("#commands " + name, GENERAL_CHANNEL);
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/adminhandler.h b/src/net/eathena/adminhandler.h
index de65a3f48..5f18c5d63 100644
--- a/src/net/eathena/adminhandler.h
+++ b/src/net/eathena/adminhandler.h
@@ -81,6 +81,8 @@ class AdminHandler final : public Ea::AdminHandler
void mobSpawnSearch(const std::string &name) const override final;
+ void playerGmCommands(const std::string &name) const override final;
+
protected:
static std::string mStatsName;
};
diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp
index 1c745c81f..6050d2375 100644
--- a/src/net/tmwa/adminhandler.cpp
+++ b/src/net/tmwa/adminhandler.cpp
@@ -146,4 +146,8 @@ void AdminHandler::mobSpawnSearch(const std::string &name A_UNUSED) const
{
}
+void AdminHandler::playerGmCommands(const std::string &name A_UNUSED) const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/adminhandler.h b/src/net/tmwa/adminhandler.h
index 57b682703..fab21a9ed 100644
--- a/src/net/tmwa/adminhandler.h
+++ b/src/net/tmwa/adminhandler.h
@@ -83,6 +83,9 @@ class AdminHandler final : public Ea::AdminHandler
void mobSpawnSearch(const std::string &name) const override final
A_CONST;
+
+ void playerGmCommands(const std::string &name) const override final
+ A_CONST;
};
} // namespace TmwAthena