diff options
| author | James Booth <boothj5@gmail.com> | 2015-03-29 03:17:41 +0100 |
|---|---|---|
| committer | James Booth <boothj5@gmail.com> | 2015-03-29 03:17:41 +0100 |
| commit | c8c12a8f7aa5a908aa22f6a143f50bd8a077a408 (patch) | |
| tree | 0323aa6c21727a92a439fa6df8d6b5c1e5d29a16 /src/command | |
| parent | c36d4b36437b790d67e6631320c6d78a5bc978be (diff) | |
| parent | 71c2be599b54fb3cf7beb2a0855ad2a9d1bf6a0b (diff) | |
| download | profani-tty-c8c12a8f7aa5a908aa22f6a143f50bd8a077a408.tar.gz | |
Merge branch 'master' into pgp
Diffstat (limited to 'src/command')
| -rw-r--r-- | src/command/commands.c | 7 |
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); |