]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/numeric.c
Update #include's: remove unused and add missing ones
[ngircd-alex.git] / src / ngircd / numeric.c
index a43739f18bf4dec9b44183396526c157d408b84b..b1facceaf0f4e1296baa9f803dc4b3f73d1dd1d6 100644 (file)
  * Handlers for IRC numerics sent to the server
  */
 
-#include "imp.h"
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <time.h>
 
-#include "defines.h"
-#include "conn.h"
-#include "conf.h"
-#include "conn.h"
 #include "conn-func.h"
+#include "conf.h"
 #include "channel.h"
 #include "class.h"
 #include "irc-write.h"
 #include "lists.h"
 #include "log.h"
-#include "messages.h"
 #include "parse.h"
 
-#include "exp.h"
-#include "numeric.h"
-
-
 /**
  * Announce a channel and its users in the network.
  */
@@ -47,7 +39,7 @@ Announce_Channel(CLIENT *Client, CHANNEL *Chan)
 {
        CL2CHAN *cl2chan;
        CLIENT *cl;
-       char str[LINE_LEN], *ptr;
+       char str[COMMAND_LEN], *ptr;
        bool njoin, xop;
 
        /* Check features of remote server */
@@ -82,7 +74,7 @@ Announce_Channel(CLIENT *Client, CHANNEL *Chan)
                        strlcat(str, Client_ID(cl), sizeof(str));
 
                        /* Send the data if the buffer is "full" */
-                       if (strlen(str) > (LINE_LEN - CLIENT_NICK_LEN - 8)) {
+                       if (strlen(str) > (sizeof(str) - CLIENT_NICK_LEN - 8)) {
                                if (!IRC_WriteStrClient(Client, "%s", str))
                                        return DISCONNECTED;
                                snprintf(str, sizeof(str), "NJOIN %s :",
@@ -117,7 +109,6 @@ Announce_Channel(CLIENT *Client, CHANNEL *Chan)
        return CONNECTED;
 } /* Announce_Channel */
 
-
 /**
  * Announce new server in the network
  * @param Client New server
@@ -149,7 +140,6 @@ Announce_Server(CLIENT * Client, CLIENT * Server)
                Client_MyToken(Server), Client_Info(Server));
 } /* Announce_Server */
 
-
 #ifdef IRCPLUS
 
 /**
@@ -210,7 +200,6 @@ Synchronize_Lists(CLIENT * Client)
        return CONNECTED;
 }
 
-
 /**
  * Send CHANINFO commands to a new server (inform it about existing channels).
  * @param Client New server
@@ -255,7 +244,6 @@ Send_CHANINFO(CLIENT * Client, CHANNEL * Chan)
 
 #endif /* IRCPLUS */
 
-
 /**
  * Handle ENDOFMOTD (376) numeric and login remote server.
  * The peer is either an IRC server (no IRC+ protocol), or we got the
@@ -349,7 +337,6 @@ IRC_Num_ENDOFMOTD(CLIENT * Client, UNUSED REQUEST * Req)
        return CONNECTED;
 } /* IRC_Num_ENDOFMOTD */
 
-
 /**
  * Handle ISUPPORT (005) numeric.
  */
@@ -385,5 +372,4 @@ IRC_Num_ISUPPORT(CLIENT * Client, REQUEST * Req)
        return CONNECTED;
 } /* IRC_Num_ISUPPORT */
 
-
 /* -eof- */