mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-06 05:40:30 +00:00
Report ERR_NOTONCHANNEL when trying to part a channel one is not member of.
When trying to part a channel ("PART #channel") the client is not member of the daemon now correctly reports the numeric ERR_NOTONCHANNEL (442) insted of ERR_NOSUCHCHANNEL (403).
This commit is contained in:
parent
54b17fc201
commit
523a6fad09
@ -218,11 +218,16 @@ Channel_Part(CLIENT * Client, CLIENT * Origin, const char *Name, const char *Rea
|
|||||||
assert(Reason != NULL);
|
assert(Reason != NULL);
|
||||||
|
|
||||||
chan = Channel_Search(Name);
|
chan = Channel_Search(Name);
|
||||||
if ((!chan) || (!Get_Cl2Chan(chan, Client))) {
|
if (!chan) {
|
||||||
IRC_WriteStrClient(Client, ERR_NOSUCHCHANNEL_MSG,
|
IRC_WriteStrClient(Client, ERR_NOSUCHCHANNEL_MSG,
|
||||||
Client_ID(Client), Name);
|
Client_ID(Client), Name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!Get_Cl2Chan(chan, Client)) {
|
||||||
|
IRC_WriteStrClient(Client, ERR_NOTONCHANNEL_MSG,
|
||||||
|
Client_ID(Client), Name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Remove_Client(REMOVE_PART, chan, Client, Origin, Reason, true))
|
if (!Remove_Client(REMOVE_PART, chan, Client, Origin, Reason, true))
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user