Correctly handle "CAP END", new client type CLIENT_WAITCAPEND
This commit is contained in:
parent
bd3a7ccb15
commit
da4c1ebe81
|
@ -29,6 +29,7 @@
|
|||
#ifndef STRICT_RFC
|
||||
# define CLIENT_WAITAUTHPING 512 /* waiting for AUTH PONG from client */
|
||||
#endif
|
||||
#define CLIENT_WAITCAPEND 1024 /* waiting for "CAP END" command */
|
||||
|
||||
#define CLIENT_TYPE int
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ Handle_CAP_END(CLIENT *Client)
|
|||
/* User is still logging in ... */
|
||||
Client_CapDel(Client, CLIENT_CAP_PENDING);
|
||||
|
||||
if (Client_Type(Client) == CLIENT_GOTUSER) {
|
||||
if (Client_Type(Client) == CLIENT_WAITCAPEND) {
|
||||
/* Only "CAP END" was missing: log in! */
|
||||
return Login_User(Client);
|
||||
}
|
||||
|
|
|
@ -80,8 +80,11 @@ Login_User(CLIENT * Client)
|
|||
#endif
|
||||
|
||||
/* Still waiting for "CAP END" command? */
|
||||
if (Client_Cap(Client) & CLIENT_CAP_PENDING)
|
||||
if (Client_Cap(Client) & CLIENT_CAP_PENDING) {
|
||||
Client_SetType(Client, CLIENT_WAITCAPEND);
|
||||
LogDebug("Connection %d: Waiting for CAP END ...", conn);
|
||||
return CONNECTED;
|
||||
}
|
||||
|
||||
#ifdef PAM
|
||||
if (!Conf_PAM) {
|
||||
|
|
|
@ -114,7 +114,7 @@ static COMMAND My_Commands[] =
|
|||
{ "CHANINFO", IRC_CHANINFO, CLIENT_SERVER, 0, 0, 0 },
|
||||
#endif
|
||||
#ifndef STRICT_RFC
|
||||
{ "CAP", IRC_CAP, CLIENT_UNKNOWN|CLIENT_GOTNICK|CLIENT_GOTPASS|CLIENT_GOTUSER|CLIENT_USER, 0, 0, 0 },
|
||||
{ "CAP", IRC_CAP, 0xFFFF, 0, 0, 0 },
|
||||
{ "GET", IRC_QUIT_HTTP, CLIENT_UNKNOWN, 0, 0, 0 },
|
||||
{ "POST", IRC_QUIT_HTTP, CLIENT_UNKNOWN, 0, 0, 0 },
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue