+ /* Protokollversion ueberpruefen */
+ if( strlen( Req->argv[1] ) > 4 ) Req->argv[1][4] = '\0';
+ if( strlen( Req->argv[1] ) != 4 ) protohigh = protolow = 0;
+ else
+ {
+ protolow = atoi( &Req->argv[1][2] );
+ Req->argv[1][2] = '\0';
+ protohigh = atoi( Req->argv[1] );
+ }
+
+ /* Implementation, Version und ngIRCd-Flags */
+ impl = Req->argv[2];
+ ptr = strchr( impl, '|' );
+ if( ptr ) *ptr = '\0';
+
+ if( strcmp( impl, PACKAGE ) == 0 )
+ {
+ /* auf der anderen Seite laeuft auch ein ngIRCd */
+ serverver = ptr + 1;
+ flags = strchr( serverver, ':' );
+ if( flags )
+ {
+ *flags = '\0';
+ flags++;
+ }
+ else flags = "";
+ Log( LOG_INFO, "Connection %d: Peer announces itself as %s-%s (flags: \"%s\") using protocol version %d.%d.", Client_Conn( Client ), impl, serverver, flags, protohigh, protolow );
+ }
+ else
+ {
+ serverver = flags = "";
+ Log( LOG_INFO, "Connection %d: Peer announces itself as server of type \"%s\" usinf protocol version %d.%d.", Client_Conn( Client ), impl, protohigh, protolow );
+ }
+