diff options
| -rw-r--r-- | irc_channel.c | 4 | ||||
| -rw-r--r-- | irc_im.c | 7 | 
2 files changed, 10 insertions, 1 deletions
diff --git a/irc_channel.c b/irc_channel.c index 714e974a..50fa14b3 100644 --- a/irc_channel.c +++ b/irc_channel.c @@ -254,6 +254,10 @@ int irc_channel_del_user(irc_channel_t *ic, irc_user_t *iu, irc_channel_del_user  	irc_channel_user_t *icu;  	if (!(icu = irc_channel_has_user(ic, iu))) { +		if (iu == ic->irc->user && type == IRC_CDU_KICK) { +			/* an error happened before joining, inform the client with a numeric */ +			irc_send_num(ic->irc, 403, "%s :Error joining channel (check control channel?)", ic->name); +		}  		return 0;  	} @@ -882,15 +882,20 @@ static gboolean bee_irc_channel_chat_join(irc_channel_t *ic)  	    acc->ic && (acc->ic->flags & OPT_LOGGED_IN) &&  	    acc->prpl->chat_join) {  		char *nick; +		struct groupchat *gc;  		if (!(nick = set_getstr(&ic->set, "nick"))) {  			nick = ic->irc->user->nick;  		}  		ic->flags |= IRC_CHANNEL_CHAT_PICKME; -		acc->prpl->chat_join(acc->ic, room, nick, NULL, &ic->set); +		gc = acc->prpl->chat_join(acc->ic, room, nick, NULL, &ic->set);  		ic->flags &= ~IRC_CHANNEL_CHAT_PICKME; +		if (!gc) { +			irc_send_num(ic->irc, 403, "%s :Error joining channel (check control channel?)", ic->name); +		} +  		return FALSE;  	} else {  		irc_send_num(ic->irc, 403, "%s :Can't join channel, account offline?", ic->name);  | 
