Changeset ecbd22a


Ignore:
Timestamp:
2015-01-16T19:50:25Z (10 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
664bac3
Parents:
fed4f76
git-author:
jgeboski <jgeboski@…> (16-01-15 19:50:25)
git-committer:
dequis <dx@…> (16-01-15 19:50:25)
Message:

channel: fixed auto-join occurring when disabled

With the auto_join channel flag set to false, the channel is still
auto-joined. This can lead to the channel being "doubly" joined if
a client previously sent a channel join request. The result of being
"doubly" joined is really undefined, but most notably memory leaks
can occur.

It also appears, based on the comment under the modified condition,
the previous condition was incorrect.

Another patch should probably implement some sort of check to ensure a
channel is not already joined, assuming the auto_join flag is enabled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_channel.c

    rfed4f76 recbd22a  
    432432                        char *acc_s;
    433433                       
    434                         if( !aj && !( ic->flags & IRC_CHANNEL_JOINED ) )
     434                        if( !aj || ( ic->flags & IRC_CHANNEL_JOINED ) )
    435435                                /* Only continue if this one's marked as auto_join
    436436                                   or if we're in it already. (Possible if the
Note: See TracChangeset for help on using the changeset viewer.