aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2015-07-29 00:41:24 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2015-07-29 00:41:24 +0100
commit24de9fa0c79027094383aa0c247e48a4bc6753d3 (patch)
tree801ece5671a739ecc63719ce6c69c61f6e6e65bc
parent77ed9b724d1bff2a409642795ae81f974b8c312f (diff)
Restore old autojoin logic and a hopefully better fix for the problem
jgeboski was trying to solve. #1221 for details.
-rw-r--r--irc_channel.c8
-rw-r--r--irc_im.c3
2 files changed, 6 insertions, 5 deletions
diff --git a/irc_channel.c b/irc_channel.c
index acae85a7..3de68e34 100644
--- a/irc_channel.c
+++ b/irc_channel.c
@@ -444,10 +444,10 @@ void irc_channel_auto_joins(irc_t *irc, account_t *acc)
can only auto-join them if their account is online. */
char *acc_s;
- if (!aj || (ic->flags & IRC_CHANNEL_JOINED)) {
- /* Only continue if this one's marked as auto_join
- or if we're in it already. (Possible if the
- client auto-rejoined it before identyfing.) */
+ if (!aj && !(ic->flags & IRC_CHANNEL_JOINED)) {
+ /* Only proceed if this one's marked as auto_join
+ or if we're in it already. (Very likely the IRC
+ client auto-(re)joining at reconnect time.) */
continue;
} else if (!(acc_s = set_getstr(&ic->set, "account"))) {
continue;
diff --git a/irc_im.c b/irc_im.c
index ae75fad1..2f55be54 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -835,7 +835,8 @@ static gboolean bee_irc_channel_chat_join(irc_channel_t *ic)
if ((acc_s = set_getstr(&ic->set, "account")) &&
(room = set_getstr(&ic->set, "room")) &&
(acc = account_get(ic->irc->b, acc_s)) &&
- acc->ic && acc->prpl->chat_join) {
+ acc->ic && (acc->ic->flags & OPT_LOGGED_IN) &&
+ acc->prpl->chat_join) {
char *nick;
if (!(nick = set_getstr(&ic->set, "nick"))) {