1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-13 02:10:27 +00:00

Mode setting: only check channel user modes when on channel

Only check the channel user modes of the initiator if he is joined to
this channel and not an IRC operator enforcing modes (which requires
the configuration option "OperCanUseMode" to be enabled), because trying
to check channel user modes of a non-member results in this assertion:

 Assertion failed: (cl2chan != NULL), function Channel_UserModes,
  file channel.c, line 742.

This closes bug #147, thanks to James Kirwill <james.kirwill@bk.ru>
for tracking this down!
This commit is contained in:
Alexander Barton 2012-12-31 18:13:18 +01:00
parent 25e56a5e83
commit 20ddffca0d

View File

@ -550,7 +550,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
if (arg_arg >= Req->argc)
arg_arg = -1;
if(!is_machine) {
if(!is_machine && !is_oper) {
o_mode_ptr = Channel_UserModes(Channel, Client);
while( *o_mode_ptr ) {
if ( *o_mode_ptr == 'q')