]> arthur.barton.de Git - ngircd.git/commitdiff
- Backports aus CVS HEAD-Tree.
authorAlexander Barton <alex@barton.de>
Mon, 29 Apr 2002 14:11:23 +0000 (14:11 +0000)
committerAlexander Barton <alex@barton.de>
Mon, 29 Apr 2002 14:11:23 +0000 (14:11 +0000)
doc/README-AUX.txt
src/ngircd/channel.c
src/ngircd/channel.h
src/ngircd/client.c
src/ngircd/irc-channel.c
src/ngircd/irc-channel.h
src/ngircd/messages.h
src/ngircd/parse.c

index 385baee127043b05160e32ea6d5b0e4c4aaa3212..18a7e92928361ac0ff988f3997ee8d8e31c7e945 100644 (file)
@@ -18,7 +18,7 @@ Folgende Software wird jedoch benoetigt:
   - GNU C Compiler (gcc)
     Bezugsquellen:
     http://www.rezepte-im-web.de/appleux/gcc281.tar.gz
-    ftp://arthur.ath.cx/pub/AUX/Software/Development/gcc281.tar.gz
+    ftp://arthur.ath.cx/pub/AUX/Software/Development/gcc-2.8.1-auxbin.tar.gz
 
   - GNU make
     Bezugsquellen:
@@ -30,6 +30,13 @@ Folgende Software wird jedoch benoetigt:
     http://www.rezepte-im-web.de/appleux/sed-3.02.tar.gz
     ftp://arthur.ath.cx/pub/AUX/Software/Tools/sed-3.02.tar.gz
 
+  - install (z.B. aus den GNU fileutils)
+    Ein install, daß es entweder so "broken" ist, daß configure das eigene
+    Shell-Script waehlt, oder eines, das funktioniert. Leider ist mindestens
+    ein Binary im Umlauf, das Probleme macht.
+    Bezugsquelle:
+    ftp://arthur.ath.cx/pub/UNIX/AUX/Software/Tools/fileutils-4.0.tar.gz
+
   - libUTIL.a
     Bezugsquellen:
     http://ftp.mayn.de/pub/apple/apple_unix/Sys_stuff/libUTIL-2.1.tar.gz
@@ -39,9 +46,26 @@ Nachdem diese Pakete entsprechend installiert sind, reicht ein ganz normales
 "./configure" und "make" aus, um den ngIRCd unter A/UX zu compilieren.
 
 
+Noch ein paar Hinweise, wenn es doch (noch) nicht klappt:
+
+  - auf dem System muss entweder ein install vorhanden sein, welches so
+    "broken" ist, dass configure das eigene Shell-Skript waehlt, oder eben
+    eines, welches funktioniert. Leider ist mindestens ein Binary im Um-
+    lauf, welches Probleme verursacht. Das Binary aus folgenden GNU
+    fileutils funktioniert hier aber z.B.:
+    ftp://arthur.ath.cx/pub/UNIX/AUX/Software/Tools/fileutils-4.0.tar.gz
+
+  - das sich im Umlauf befindende vorcompilierte Binary der alten Bash sollte
+    unbedingt ausserhalb von /bin (z.B. unter /usr/local/bin) installiert
+    werden. Ansonsten waehlt es das configure-Script als Shell aus, leider
+    funktioniert das aber nicht.
+    Das config.status-Script sollte mit der ksh als Interpreter erstellt
+    worden sein (siehe erste Zeile davon!).
+
+
 Hier die Zeiten von Alex System (Macintosh SE/30, 32 MB, A/UX 3.0.1):
 configure: 7:33, make: 12:02
 
 
 -- 
-$Id: README-AUX.txt,v 1.1 2002/02/25 14:02:32 alex Exp $
+$Id: README-AUX.txt,v 1.1.2.1 2002/04/29 14:11:23 alex Exp $
index 3e1e710bad885417c6c22a0bf59f682150ef788f..dbbf136cd66db24365fa30c1628b7afc3285d33b 100644 (file)
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: channel.c,v 1.20 2002/03/25 16:54:26 alex Exp $
+ * $Id: channel.c,v 1.20.2.1 2002/04/29 14:11:23 alex Exp $
  *
  * channel.c: Management der Channels
  */
@@ -171,6 +171,24 @@ GLOBAL INT Channel_Count( VOID )
 } /* Channel_Count */
 
 
+GLOBAL INT Channel_MemberCount( CHANNEL *Chan )
+{
+       CL2CHAN *cl2chan;
+       INT count;
+
+       assert( Chan != NULL );
+
+       count = 0;
+       cl2chan = My_Cl2Chan;
+       while( cl2chan )
+       {
+               if( cl2chan->channel == Chan ) count++;
+               cl2chan = cl2chan->next;
+       }
+       return count;
+} /* Channel_MemberCount */
+
+
 GLOBAL CHAR *Channel_Name( CHANNEL *Chan )
 {
        assert( Chan != NULL );
index 6728e5a6125849bdbfcc806447430d69290e5d06..ec5c0ef99647508c0f6a2ee0494cd22f32c33de9 100644 (file)
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: channel.h,v 1.16 2002/03/25 19:11:01 alex Exp $
+ * $Id: channel.h,v 1.16.2.1 2002/04/29 14:11:23 alex Exp $
  *
  * channel.h: Management der Channels (Header)
  */
@@ -59,6 +59,7 @@ GLOBAL BOOLEAN Channel_Part( CLIENT *Client, CLIENT *Origin, CHAR *Name, CHAR *R
 GLOBAL VOID Channel_RemoveClient( CLIENT *Client, CHAR *Reason );
 
 GLOBAL INT Channel_Count( VOID );
+GLOBAL INT Channel_MemberCount( CHANNEL *Chan );
 
 GLOBAL CHAR *Channel_Name( CHANNEL *Chan );
 GLOBAL CHAR *Channel_Modes( CHANNEL *Chan );
index 1b634e547f5d8007aedc2a36c58e7e61169c35ba..bf68305448f1f73027f7f909d370ea15edcca49a 100644 (file)
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: client.c,v 1.53 2002/03/27 20:52:58 alex Exp $
+ * $Id: client.c,v 1.53.2.1 2002/04/29 14:11:23 alex Exp $
  *
  * client.c: Management aller Clients
  *
@@ -798,7 +798,17 @@ GLOBAL INT Client_MyServiceCount( VOID )
 
 GLOBAL INT Client_MyServerCount( VOID )
 {
-       return MyCount( CLIENT_SERVER );
+       CLIENT *c;
+       INT cnt;
+
+       cnt = 0;
+       c = My_Clients;
+       while( c )
+       {
+               if(( c->type == CLIENT_SERVER ) && ( c->hops == 1 )) cnt++;
+               c = (CLIENT *)c->next;
+       }
+       return cnt;
 } /* Client_MyServerCount */
 
 
@@ -867,7 +877,7 @@ LOCAL INT Count( CLIENT_TYPE Type )
        c = My_Clients;
        while( c )
        {
-               if( c && ( c->type == Type )) cnt++;
+               if( c->type == Type ) cnt++;
                c = (CLIENT *)c->next;
        }
        return cnt;
@@ -883,7 +893,7 @@ LOCAL INT MyCount( CLIENT_TYPE Type )
        c = My_Clients;
        while( c )
        {
-               if( c && ( c->introducer == This_Server ) && ( c->type == Type )) cnt++;
+               if(( c->introducer == This_Server ) && ( c->type == Type )) cnt++;
                c = (CLIENT *)c->next;
        }
        return cnt;
index 87e352759d2a4f05bae3946530a6c850b0fb09e3..471244851fd2c6f2b47251d00fc0f97ebe01407f 100644 (file)
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: irc-channel.c,v 1.3 2002/03/25 17:08:54 alex Exp $
+ * $Id: irc-channel.c,v 1.3.2.1 2002/04/29 14:11:23 alex Exp $
  *
  * irc-channel.c: IRC-Channel-Befehle
  */
@@ -218,4 +218,45 @@ GLOBAL BOOLEAN IRC_TOPIC( CLIENT *Client, REQUEST *Req )
 } /* IRC_TOPIC */
 
 
+GLOBAL BOOLEAN IRC_LIST( CLIENT *Client, REQUEST *Req )
+{
+       CHAR *pattern;
+       CHANNEL *chan;
+
+       assert( Client != NULL );
+       assert( Req != NULL );
+
+       if( Client_Type( Client ) != CLIENT_USER ) return IRC_WriteStrClient( Client, ERR_NOTREGISTERED_MSG, Client_ID( Client ));
+
+       /* Falsche Anzahl Parameter? */
+       if( Req->argc > 1 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
+
+       if( Req->argc > 0 ) pattern = strtok( Req->argv[0], "," );
+       else pattern = "*";
+       
+       while( pattern )
+       {
+               /* alle Channel durchgehen */
+               chan = Channel_First( );
+               while( chan )
+               {
+                       /* Passt die Suchmaske auf diesen Channel? Bisher werden hier
+                        * "regular expressions" aber noch nicht unterstuetzt ... */
+                       if(( strcasecmp( pattern, Channel_Name( chan )) == 0 ) || ( strcmp( pattern, "*" ) == 0 ))
+                       {
+                               /* Treffer! */
+                               if( ! IRC_WriteStrClient( Client, RPL_LIST_MSG, Client_ID( Client), Channel_Name( chan ), Channel_MemberCount( chan ), Channel_Topic( chan ))) return DISCONNECTED;
+                       }
+                       chan = Channel_Next( chan );
+               }
+               
+               /* naechsten Namen ermitteln */
+               if( Req->argc > 0 ) pattern = strtok( NULL, "," );
+               else pattern = NULL;
+       }
+       
+       return IRC_WriteStrClient( Client, RPL_LISTEND_MSG, Client_ID( Client ));
+} /* IRC_LIST */
+
+
 /* -eof- */
index 81828595152119b90d449a5d920eb3097c5365cd..9d6d90a09091877569ffc63bf5c0a8b80b56f883 100644 (file)
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: irc-channel.h,v 1.2 2002/03/12 14:37:52 alex Exp $
+ * $Id: irc-channel.h,v 1.2.2.1 2002/04/29 14:11:23 alex Exp $
  *
  * irc-channel.h: IRC-Channel-Befehle (Header)
  */
@@ -26,6 +26,7 @@ GLOBAL BOOLEAN IRC_JOIN( CLIENT *Client, REQUEST *Req );
 GLOBAL BOOLEAN IRC_PART( CLIENT *Client, REQUEST *Req );
 GLOBAL BOOLEAN IRC_TOPIC( CLIENT *Client, REQUEST *Req );
 
+GLOBAL BOOLEAN IRC_LIST( CLIENT *Client, REQUEST *Req );
 
 #endif
 
index 10da926a086dbde7a88b331886f03915eeb7c008..d2c333ecad5536c3fdddd28b0b50a38d4daa798e 100644 (file)
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: messages.h,v 1.37 2002/03/12 22:08:24 alex Exp $
+ * $Id: messages.h,v 1.37.2.1 2002/04/29 14:11:23 alex Exp $
  *
  * irc.h: IRC-Befehle (Header)
  */
 #define RPL_WHOISCHANNELS              "319"
 #define RPL_WHOISCHANNELS_MSG          RPL_WHOISCHANNELS" %s %s :"
 
+#define RPL_LIST                       "322"
+#define RPL_LIST_MSG                   RPL_LIST" %s %s %d :%s"
+
+#define RPL_LISTEND                    "323"
+#define RPL_LISTEND_MSG                        RPL_LISTEND" %s :End of LIST"
+
 #define RPL_CHANNELMODEIS              "324"
 #define RPL_CHANNELMODEIS_MSG          RPL_CHANNELMODEIS" %s %s +%s"
 
index b1782ef40cb13d41b937d740eacfef2e7564f9f1..fdb95208a46fc0ddde2e5a419c8c2853ccde0151 100644 (file)
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: parse.c,v 1.31 2002/03/25 17:13:46 alex Exp $
+ * $Id: parse.c,v 1.31.2.1 2002/04/29 14:11:23 alex Exp $
  *
  * parse.c: Parsen der Client-Anfragen
  */
@@ -292,6 +292,7 @@ LOCAL BOOLEAN Handle_Request( CONN_ID Idx, REQUEST *Req )
        else if( strcasecmp( Req->command, "AWAY" ) == 0 ) return IRC_AWAY( client, Req );
        else if( strcasecmp( Req->command, "TOPIC" ) == 0 ) return IRC_TOPIC( client, Req );
        else if( strcasecmp( Req->command, "WHO" ) == 0 ) return IRC_WHO( client, Req );
+       else if( strcasecmp( Req->command, "LIST" ) == 0 ) return IRC_LIST( client, Req );
        
        /* Unbekannter Befehl */
        if( Client_Type( client ) != CLIENT_SERVER ) IRC_WriteStrClient( client, ERR_UNKNOWNCOMMAND_MSG, Client_ID( client ), Req->command );