]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/parse.c
ngIRCd Release 22.1
[ngircd-alex.git] / src / ngircd / parse.c
index fdb957c3efe0c52d881ff3cdffd6bf345e98de02..28dee6fc90c374a6d087ce0a3190b7dc94be2c99 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * IRC command parser and validator.
  */
 
-#include "imp.h"
 #include <assert.h>
 #include <stdlib.h>
-#include <stdio.h>
 #include <string.h>
 #include <strings.h>
 
 #include "ngircd.h"
-#include "defines.h"
 #include "conn-func.h"
+#include "conf.h"
 #include "channel.h"
 #include "log.h"
 #include "messages.h"
-#include "tool.h"
 
-#include "exp.h"
 #include "parse.h"
 
-#include "imp.h"
 #include "irc.h"
 #include "irc-cap.h"
 #include "irc-channel.h"
-#include "irc-encoding.h"
+#ifdef ICONV
+# include "irc-encoding.h"
+#endif
 #include "irc-info.h"
 #include "irc-login.h"
 #include "irc-metadata.h"
@@ -49,9 +46,6 @@
 #include "irc-write.h"
 #include "numeric.h"
 
-#include "exp.h"
-#include "conf.h"
-
 struct _NUMERIC {
        int numeric;
        bool (*function) PARAMS(( CLIENT *Client, REQUEST *Request ));
@@ -348,7 +342,7 @@ Validate_Prefix( CONN_ID Idx, REQUEST *Req, bool *Closed )
        /* check if the client named in the prefix is expected
         * to come from that direction */
        if (Client_NextHop(c) != client) {
-               if (Client_Type(c) != CLIENT_SERVER) {
+               if (Client_Type(client) != CLIENT_SERVER) {
                        Log(LOG_ERR,
                            "Spoofed prefix \"%s\" from \"%s\" (connection %d, command \"%s\"), closing connection!",
                            Req->prefix, Client_ID(client), Idx, Req->command);