]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-info.c
New configuration option "MaxConnectionsIP".
[ngircd-alex.git] / src / ngircd / irc-info.c
index 2f1112e87be2ec86dd2e0fe35477fd0db61fab85..3bc6904f5dc1efe3d5d9ee60cc9a2929ad2e8cf9 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-info.c,v 1.14 2003/01/01 13:30:35 alex Exp $";
+static char UNUSED id[] = "$Id: irc-info.c,v 1.17 2003/06/06 20:46:11 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -23,6 +23,7 @@ static char UNUSED id[] = "$Id: irc-info.c,v 1.14 2003/01/01 13:30:35 alex Exp $
 #include <string.h>
 
 #include "ngircd.h"
+#include "cvs-version.h"
 #include "conn-func.h"
 #include "conn-zip.h"
 #include "client.h"
@@ -437,7 +438,7 @@ IRC_TIME( CLIENT *Client, REQUEST *Req )
        }
 
        t = time( NULL );
-       (VOID)strftime( t_str, 60, "%A %B %d %Y -- %H:%M %z", localtime( &t ));
+       (VOID)strftime( t_str, 60, "%A %B %d %Y -- %H:%M %Z", localtime( &t ));
        return IRC_WriteStrClient( from, RPL_TIME_MSG, Client_ID( from ), Client_ID( Client_ThisServer( )), t_str );
 } /* IRC_TIME */
 
@@ -486,6 +487,9 @@ GLOBAL BOOLEAN
 IRC_VERSION( CLIENT *Client, REQUEST *Req )
 {
        CLIENT *target, *prefix;
+#ifdef CVSDATE
+       CHAR ver[12];
+#endif
 
        assert( Client != NULL );
        assert( Req != NULL );
@@ -513,7 +517,14 @@ IRC_VERSION( CLIENT *Client, REQUEST *Req )
        }
 
        /* mit Versionsinfo antworten */
-       return IRC_WriteStrClient( Client, RPL_VERSION_MSG, Client_ID( prefix ), PACKAGE, VERSION, NGIRCd_DebugLevel, Conf_ServerName, NGIRCd_VersionAddition( ));
+#ifdef CVSDATE
+       strlcpy( ver, CVSDATE, sizeof( ver ));
+       strncpy( ver + 4, ver + 5, 2 );
+       strncpy( ver + 6, ver + 8, 3 );
+       return IRC_WriteStrClient( Client, RPL_VERSION_MSG, Client_ID( prefix ), PACKAGE_NAME, ver, NGIRCd_DebugLevel, Conf_ServerName, NGIRCd_VersionAddition( ));
+#else
+       return IRC_WriteStrClient( Client, RPL_VERSION_MSG, Client_ID( prefix ), PACKAGE_NAME, PACKAGE_VERSION, NGIRCd_DebugLevel, Conf_ServerName, NGIRCd_VersionAddition( ));
+#endif
 } /* IRC_VERSION */