diff options
| author | Alexander Barton <alex@barton.de> | 2014-01-26 23:41:59 +0100 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2014-01-26 23:41:59 +0100 |
| commit | 2e168c7809f8c149710a75bf3bf5b98e72217c61 (patch) | |
| tree | bcd1a601f1dbe367be549676ec007f9901773aca | |
| parent | 14a84dfca57efeb744aa6219ca7776dc629871b7 (diff) | |
| download | ngircd-2e168c7809f8c149710a75bf3bf5b98e72217c61.tar.gz ngircd-2e168c7809f8c149710a75bf3bf5b98e72217c61.zip | |
Return ISUPPORT(005) numerics on "VERSION"
This is how ircd-seven, Charybdis, Hybrid, and InspIRCd behave, for example.
| -rw-r--r-- | src/ngircd/irc-info.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c index cd5e45c1..cc19465a 100644 --- a/src/ngircd/irc-info.c +++ b/src/ngircd/irc-info.c @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors. + * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1106,10 +1106,19 @@ IRC_VERSION( CLIENT *Client, REQUEST *Req ) } /* send version information */ - return IRC_WriteStrClient(Client, RPL_VERSION_MSG, Client_ID(prefix), - PACKAGE_NAME, PACKAGE_VERSION, - NGIRCd_DebugLevel, Conf_ServerName, - NGIRCd_VersionAddition); + if (!IRC_WriteStrClient(Client, RPL_VERSION_MSG, Client_ID(prefix), + PACKAGE_NAME, PACKAGE_VERSION, + NGIRCd_DebugLevel, Conf_ServerName, + NGIRCd_VersionAddition)) + return DISCONNECTED; + +#ifndef STRICT_RFC + /* send RPL_ISUPPORT(005) numerics */ + if (!IRC_Send_ISUPPORT(Client)) + return DISCONNECTED; +#endif + + return CONNECTED; } /* IRC_VERSION */ /** |