summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/actions/actions.cpp7
-rw-r--r--src/actions/actions.h1
-rw-r--r--src/commands.cpp6
-rw-r--r--src/commands.h5
-rw-r--r--src/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h9
-rw-r--r--src/input/pages/other.cpp6
7 files changed, 25 insertions, 10 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 6a8ba0d5a..73c57985c 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -70,6 +70,7 @@
#include "render/graphics.h"
+#include "net/chathandler.h"
#include "net/ipc.h"
#include "net/net.h"
#include "net/playerhandler.h"
@@ -535,4 +536,10 @@ impHandler(where)
return true;
}
+impHandler0(who)
+{
+ Net::getChatHandler()->who();
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/actions.h b/src/actions/actions.h
index 21085ea48..db895d644 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -56,6 +56,7 @@ namespace Actions
decHandler(openTrade);
decHandler(ipcToggle);
decHandler(where);
+ decHandler(who);
} // namespace Actions
#undef decHandler
diff --git a/src/commands.cpp b/src/commands.cpp
index 6a1094b51..270a781ab 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -251,12 +251,6 @@ static void outStringNormal(ChatTab *const tab,
}
}
-impHandler0(who)
-{
- Net::getChatHandler()->who();
- return true;
-}
-
impHandler(msg)
{
std::string recvnick;
diff --git a/src/commands.h b/src/commands.h
index f6d1d3f4f..5844cac08 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -51,7 +51,6 @@ struct CommandInfo final
namespace Commands
{
- decHandler(who);
decHandler(msg);
decHandler(query);
decHandler(clear);
@@ -138,8 +137,7 @@ namespace Commands
enum
{
- COMMAND_WHO = 0,
- COMMAND_MSG,
+ COMMAND_MSG = 0,
COMMAND_WHISPER,
COMMAND_W,
COMMAND_QUERY,
@@ -229,7 +227,6 @@ enum
static const CommandInfo commands[] =
{
- {"who", &Commands::who, -1, false},
{"msg", Commands::msg, -1, true},
{"whisper", Commands::msg, -1, true},
{"w", &Commands::msg, -1, true},
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index f0f999d2e..8d4051fc0 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -346,6 +346,7 @@ namespace InputAction
CHAT_ANNOUNCE,
IPC_TOGGLE,
WHERE,
+ WHO,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 241ed632a..b7a7fcff7 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -2883,6 +2883,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputAction::NO_VALUE, 50,
InputCondition::INGAME,
"where",
+ false},
+ {"keyWho",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT,
+ &Actions::who,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "who",
false}
};
diff --git a/src/input/pages/other.cpp b/src/input/pages/other.cpp
index d1a7d0bfd..e60b2addd 100644
--- a/src/input/pages/other.cpp
+++ b/src/input/pages/other.cpp
@@ -203,6 +203,12 @@ SetupActionData setupActionDataOther[] =
},
{
// TRANSLATORS: input action name
+ N_("Show online players number in chat"),
+ InputAction::WHO,
+ "",
+ },
+ {
+ // TRANSLATORS: input action name
N_("Show onscreen keyboard"),
InputAction::SHOW_KEYBOARD,
"",