diff options
| author | Přemysl Eric Janouch <p@janouch.name> | 2020-10-16 17:38:49 +0200 | 
|---|---|---|
| committer | Přemysl Eric Janouch <p@janouch.name> | 2020-10-16 17:59:50 +0200 | 
| commit | 12c8ace6a14060b8ae400009e475a7722cbd1f6a (patch) | |
| tree | 8100bb9179497e76b719e4a7443dcb9b1dca313e /degesch.c | |
| parent | 49706efe86fd80821a74977dbf6cc800e276c13d (diff) | |
| download | xK-12c8ace6a14060b8ae400009e475a7722cbd1f6a.tar.gz xK-12c8ace6a14060b8ae400009e475a7722cbd1f6a.tar.xz xK-12c8ace6a14060b8ae400009e475a7722cbd1f6a.zip | |
degesch: clarify handling of unexpected JOINs
I got confused about safety.
Diffstat (limited to 'degesch.c')
| -rw-r--r-- | degesch.c | 10 | 
1 files changed, 5 insertions, 5 deletions
| @@ -6569,8 +6569,12 @@ irc_handle_join (struct server *s, const struct irc_message *msg)  	hard_assert (channel || !buffer);  	// We've joined a new channel -	if (!channel && irc_is_this_us (s, msg->prefix)) +	if (!channel)  	{ +		// This is weird, ignoring +		if (!irc_is_this_us (s, msg->prefix)) +			return; +  		buffer = buffer_new (s->ctx->input);  		buffer->type = BUFFER_CHANNEL;  		buffer->name = xstrdup_printf ("%s.%s", s->name, channel_name); @@ -6594,10 +6598,6 @@ irc_handle_join (struct server *s, const struct irc_message *msg)  		irc_send (s, "MODE %s", channel_name);  	} -	// This is weird, ignoring -	if (!channel) -		return; -  	// Add the user to the channel  	char *nickname = irc_cut_nickname (msg->prefix);  	irc_channel_link_user (channel, irc_get_or_make_user (s, nickname), ""); | 
