]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-server.c
Enable Pidfile /var/run/ircd/ngircd.pid
[ngircd-alex.git] / src / ngircd / irc-server.c
index eaa4f46c436fe9b2e1e0d0e9920e5e3907db47cb..72ca92bbcb28df7a802850dfe090a7d1d0780fa2 100644 (file)
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-server.c,v 1.32 2003/04/20 23:09:26 alex Exp $";
+static char UNUSED id[] = "$Id: irc-server.c,v 1.37 2004/05/11 00:01:11 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 
+#include "defines.h"
 #include "resolve.h"
 #include "conn.h"
 #include "conn-zip.h"
@@ -29,6 +31,7 @@ static char UNUSED id[] = "$Id: irc-server.c,v 1.32 2003/04/20 23:09:26 alex Exp
 #include "client.h"
 #include "channel.h"
 #include "irc-write.h"
+#include "lists.h"
 #include "log.h"
 #include "messages.h"
 #include "parse.h"
@@ -117,7 +120,7 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
                Client_SetType( Client, CLIENT_SERVER );
                Conf_SetServer( i, con );
 
-#ifdef USE_ZLIB
+#ifdef ZLIB
                /* Kompression initialisieren, wenn erforderlich */
                if( strchr( Client_Flags( Client ), 'Z' ))
                {
@@ -182,6 +185,9 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
                        /* Send CHANINFO if the peer supports it */
                        if( strchr( Client_Flags( Client ), 'C' ))
                        {
+#ifdef DEBUG
+                               Log( LOG_DEBUG, "Sending CHANINFO commands ..." );
+#endif
                                modes = Channel_Modes( chan );
                                topic = Channel_Topic( chan );
 
@@ -238,6 +244,18 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
                                if( ! IRC_WriteStrClient( Client, "%s", str )) return DISCONNECTED;
                        }
 
+#ifdef IRCPLUS
+                       if( strchr( Client_Flags( Client ), 'L' ))
+                       {
+#ifdef DEBUG
+                               Log( LOG_DEBUG, "Synchronizing INVITE- and BAN-lists ..." );
+#endif
+                               /* Synchronize INVITE- and BAN-lists */
+                               if( ! Lists_SendInvites( Client )) return DISCONNECTED;
+                               if( ! Lists_SendBans( Client )) return DISCONNECTED;
+                       }
+#endif
+
                        /* naechsten Channel suchen */
                        chan = Channel_Next( chan );
                }
@@ -344,6 +362,8 @@ IRC_NJOIN( CLIENT *Client, REQUEST *Req )
                        }
 
                        if( nick_out[0] != '\0' ) strlcat( nick_out, ",", sizeof( nick_out ));
+                       if( is_op ) strlcat( nick_out, "@", sizeof( nick_out ));
+                       if( is_voiced ) strlcat( nick_out, "+", sizeof( nick_out ));
                        strlcat( nick_out, ptr, sizeof( nick_out ));
                }
                else Log( LOG_ERR, "Got NJOIN for unknown nick \"%s\" for channel \"%s\"!", ptr, channame );