commit - e9e3df27b70b7d3c7de2f0208431c8b8803a4da9
commit + 77861f6fe24a7a6be85c6f8112f08172ad7ffa67
blob - 72caf7d576120e6abea27d6f5fb4e1e33866643f
blob + d5e4bde3d70cd1319b82f69641a6d993257be3bc
--- src/ngircd/irc.c
+++ src/ngircd/irc.c
GLOBAL bool
IRC_ERROR(CLIENT *Client, REQUEST *Req)
{
+ char *msg;
+
assert( Client != NULL );
assert( Req != NULL );
return CONNECTED;
}
- if (Req->argc < 1)
+ if (Req->argc < 1) {
+ msg = "Got ERROR command";
Log(LOG_NOTICE, "Got ERROR from \"%s\"!",
Client_Mask(Client));
- else
+ } else {
+ msg = Req->argv[0];
Log(LOG_NOTICE, "Got ERROR from \"%s\": \"%s\"!",
- Client_Mask(Client), Req->argv[0]);
+ Client_Mask(Client), msg);
+ }
+
+ if (Client_Conn(Client) != NONE) {
+ Client_Destroy(Client, NULL, msg, false);
+ return DISCONNECTED;
+ }
return CONNECTED;
} /* IRC_ERROR */