X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Firc-channel.c;h=cab20c493bcb493f95bf3398528118a06f322874;hp=ce042043ebe0b3eedc087635e50fc30a6b51610c;hb=0fc822d8c44be42a62d3c26bbab99d5d0bc88346;hpb=08f9d31d60220e8a389a2d24f42625be7749f090 diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c index ce042043..cab20c49 100644 --- a/src/ngircd/irc-channel.c +++ b/src/ngircd/irc-channel.c @@ -129,7 +129,7 @@ join_allowed(CLIENT *Client, CHANNEL *chan, const char *channame, return false; } - if (Channel_HasMode(chan, 'O') && !Client_OperByMe(Client)) { + if (Channel_HasMode(chan, 'O') && !Client_HasMode(Client, 'o')) { /* Only IRC operators are allowed! */ IRC_WriteErrClient(Client, ERR_OPONLYCHANNEL_MSG, Client_ID(Client), channame); @@ -323,7 +323,7 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req ) channame = strtok_r(channame, ",", &lastchan); /* Make sure that "channame" is not the empty string ("JOIN :") */ - if (! channame) + if (!channame) return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, Client_ID(Client), Req->command); @@ -445,7 +445,7 @@ IRC_PART(CLIENT * Client, REQUEST * Req) chan = strtok(Req->argv[0], ","); /* Make sure that "chan" is not the empty string ("PART :") */ - if (! chan) + if (!chan) return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, Client_ID(Client), Req->command); @@ -480,8 +480,6 @@ IRC_TOPIC( CLIENT *Client, REQUEST *Req ) assert( Client != NULL ); assert( Req != NULL ); - IRC_SetPenalty(Client, 1); - _IRC_GET_SENDER_OR_RETURN_(from, Req, Client) chan = Channel_Search(Req->argv[0]); @@ -578,8 +576,6 @@ IRC_LIST( CLIENT *Client, REQUEST *Req ) assert(Client != NULL); assert(Req != NULL); - IRC_SetPenalty(Client, 2); - _IRC_GET_SENDER_OR_RETURN_(from, Req, Client) if (Req->argc > 0) @@ -615,7 +611,10 @@ IRC_LIST( CLIENT *Client, REQUEST *Req ) /* Gotcha! */ if (!Channel_HasMode(chan, 's') || Channel_IsMemberOf(chan, from) - || (!Conf_MorePrivacy && Client_OperByMe(Client))) { + || (!Conf_MorePrivacy + && Client_HasMode(Client, 'o') + && Client_Conn(Client) > NONE)) + { if ((Conf_MaxListSize > 0) && IRC_CheckListTooBig(from, count, Conf_MaxListSize,