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

Channel_Mode: check return type of Invite/Ban Add/Del function

This commit is contained in:
Florian Westphal 2008-04-19 16:17:11 +02:00
parent 796dcf6a62
commit b8643477ba

View File

@ -486,10 +486,8 @@ Channel_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel )
if (arg_arg > mode_arg) {
/* modify list */
if (modeok) {
if (set)
Add_Ban_Invite(*mode_ptr, Origin, Client, Channel, Req->argv[arg_arg]);
else
Del_Ban_Invite(*mode_ptr, Origin, Client, Channel, Req->argv[arg_arg]);
ok = set ? Add_Ban_Invite(*mode_ptr, Origin, Client, Channel, Req->argv[arg_arg])
: Del_Ban_Invite(*mode_ptr, Origin, Client, Channel, Req->argv[arg_arg]);
} else {
ok = IRC_WriteStrClient(Origin, ERR_CHANOPRIVSNEEDED_MSG,
Client_ID(Origin), Channel_Name(Channel));