+GLOBAL INT Client_UserCount( VOID )
+{
+ return Count( CLIENT_USER );
+} /* Client_UserCount */
+
+
+GLOBAL INT Client_ServiceCount( VOID )
+{
+ return Count( CLIENT_SERVICE );;
+} /* Client_ServiceCount */
+
+
+GLOBAL INT Client_ServerCount( VOID )
+{
+ return Count( CLIENT_SERVER );
+} /* Client_ServerCount */
+
+
+GLOBAL INT Client_MyUserCount( VOID )
+{
+ return MyCount( CLIENT_USER );
+} /* Client_MyUserCount */
+
+
+GLOBAL INT Client_MyServiceCount( VOID )
+{
+ return MyCount( CLIENT_SERVICE );
+} /* Client_MyServiceCount */
+
+
+GLOBAL INT Client_MyServerCount( VOID )
+{
+ return MyCount( CLIENT_SERVER );
+} /* Client_MyServerCount */
+
+
+GLOBAL INT Client_OperCount( VOID )
+{
+ CLIENT *c;
+ INT cnt;
+
+ cnt = 0;
+ c = My_Clients;
+ while( c )
+ {
+ if( c && ( c->type == CLIENT_USER ) && ( strchr( c->modes, 'o' ))) cnt++;
+ c = c->next;
+ }
+ return cnt;
+} /* Client_OperCount */
+
+
+GLOBAL INT Client_UnknownCount( VOID )
+{
+ CLIENT *c;
+ INT cnt;
+
+ cnt = 0;
+ c = My_Clients;
+ while( c )
+ {
+ if( c && ( c->type != CLIENT_USER ) && ( c->type != CLIENT_SERVICE ) && ( c->type != CLIENT_SERVER )) cnt++;
+ c = c->next;
+ }
+ return cnt;
+} /* Client_UnknownCount */
+
+
+GLOBAL BOOLEAN Client_IsValidNick( CHAR *Nick )
+{
+ /* Ist der Nick gueltig? */
+
+ CHAR *ptr, goodchars[] = ";0123456789";
+
+ assert( Nick != NULL );
+
+ if( Nick[0] == '#' ) return FALSE;
+ if( strchr( goodchars, Nick[0] )) return FALSE;
+ if( strlen( Nick ) >= CLIENT_NICK_LEN ) return FALSE;
+
+ ptr = Nick;
+ while( *ptr )
+ {
+ if(( *ptr < 'A' ) && ( ! strchr( goodchars, *ptr ))) return FALSE;
+ if(( *ptr > '}' ) && ( ! strchr( goodchars, *ptr ))) return FALSE;
+ ptr++;
+ }
+
+ return TRUE;
+} /* Client_IsValidNick */
+
+
+LOCAL INT Count( CLIENT_TYPE Type )
+{
+ CLIENT *c;
+ INT cnt;
+
+ cnt = 0;
+ c = My_Clients;
+ while( c )
+ {
+ if( c && ( c->type == Type )) cnt++;
+ c = c->next;
+ }
+ return cnt;
+} /* Count */
+
+
+LOCAL INT MyCount( CLIENT_TYPE Type )
+{
+ CLIENT *c;
+ INT cnt;
+
+ cnt = 0;
+ c = My_Clients;
+ while( c )
+ {
+ if( c && ( c->introducer == This_Server ) && ( c->type == Type )) cnt++;
+ c = c->next;
+ }
+ return cnt;
+} /* MyCount */
+
+