summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp17
1 files changed, 17 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