aboutsummaryrefslogtreecommitdiffstats
path: root/src/command
diff options
context:
space:
mode:
Diffstat (limited to 'src/command')
-rw-r--r--src/command/commands.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index c7edeb7b..1d1b10e3 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -2129,10 +2129,15 @@ cmd_join(gchar **args, struct cmd_help_t help)
options_destroy(options);
// In the case that a nick wasn't provided by the optional args...
- if (nick == NULL) {
+ if (!nick) {
nick = account->muc_nick;
}
+ // When no password, check for invite with password
+ if (!passwd) {
+ passwd = muc_invite_password(room);
+ }
+
if (!muc_active(room)) {
presence_join_room(room, nick, passwd);
muc_join(room, nick, passwd, FALSE);