X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Firc-op.c;h=0d471512f6e024581e530344c108751bdbe96332;hp=23fcc71cc14cfe8a352138a433d6a7e1e2a7f82b;hb=c74115f25c8ea3f67c75120c0a1398975bac03ad;hpb=672a1679639d597cf1c4336687ac78dcc24a9559 diff --git a/src/ngircd/irc-op.c b/src/ngircd/irc-op.c index 23fcc71c..0d471512 100644 --- a/src/ngircd/irc-op.c +++ b/src/ngircd/irc-op.c @@ -162,17 +162,17 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req) return IRC_WriteStrClient(from, ERR_NOTONCHANNEL_MSG, Client_ID(Client), Req->argv[1]); /* Is the channel "invite-disallow"? */ - if (strchr(Channel_Modes(chan), 'V')) + if (Channel_HasMode(chan, 'V')) return IRC_WriteStrClient(from, ERR_NOINVITE_MSG, Client_ID(from), Channel_Name(chan)); /* Is the channel "invite-only"? */ - if (strchr(Channel_Modes(chan), 'i')) { + if (Channel_HasMode(chan, 'i')) { /* Yes. The user must be channel owner/admin/operator/halfop! */ - if (!strchr(Channel_UserModes(chan, from), 'q') && - !strchr(Channel_UserModes(chan, from), 'a') && - !strchr(Channel_UserModes(chan, from), 'o') && - !strchr(Channel_UserModes(chan, from), 'h')) + if (!Channel_UserHasMode(chan, from, 'q') && + !Channel_UserHasMode(chan, from, 'a') && + !Channel_UserHasMode(chan, from, 'o') && + !Channel_UserHasMode(chan, from, 'h')) return IRC_WriteStrClient(from, ERR_CHANOPRIVSNEEDED_MSG, Client_ID(from), Channel_Name(chan)); remember = true; @@ -215,7 +215,7 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req) Client_ID(from), Req->argv[0], colon_if_necessary, Req->argv[1])) return DISCONNECTED; - if (strchr(Client_Modes(target), 'a') && + if (Client_HasMode(target, 'a') && !IRC_WriteStrClient(from, RPL_AWAY_MSG, Client_ID(from), Client_ID(target), Client_Away(target))) return DISCONNECTED;