summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp17
-rw-r--r--src/actions/commands.h1
2 files changed, 18 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 76d94886c..18206b9a3 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -55,6 +55,7 @@
#include "net/serverfeatures.h"
#include "resources/iteminfo.h"
+#include "resources/chatobject.h"
#include "utils/chatutils.h"
#include "utils/gettext.h"
@@ -881,4 +882,20 @@ impHandler(createPublicChatRoom)
#endif
}
+impHandler(joinChatRoom)
+{
+#ifdef EATHENA_SUPPORT
+ const std::string args = event.args;
+ if (args.empty())
+ return false;
+ ChatObject *const chat = ChatObject::findByName(args);
+ if (!chat)
+ return false;
+ chatHandler->joinChat(chat, "");
+ return true;
+#else
+ return false;
+#endif
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index f5fa4344b..ef02a70eb 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -83,6 +83,7 @@ namespace Actions
decHandler(homunEmote);
decHandler(commandHomunEmote);
decHandler(createPublicChatRoom);
+ decHandler(joinChatRoom);
} // namespace Actions
#undef decHandler