]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/parse.c
Update copyright notices for 2010 :)
[ngircd-alex.git] / src / ngircd / parse.c
index 6d53525b6f2754875eae94a9baa565800156ac0a..479b300450e4dcfd4f601b703bc4a573fc3f8a77 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2008 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
  *
  * 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
@@ -26,7 +26,6 @@
 #include "ngircd.h"
 #include "defines.h"
 #include "conn-func.h"
-#include "client.h"
 #include "channel.h"
 #include "log.h"
 #include "messages.h"
@@ -92,7 +91,7 @@ static COMMAND My_Commands[] =
        { "SERVICE", IRC_SERVICE, 0xFFFF, 0, 0, 0 },
        { "SERVLIST", IRC_SERVLIST, CLIENT_USER, 0, 0, 0 },
        { "SQUERY", IRC_SQUERY, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
-       { "SQUIT", IRC_SQUIT, CLIENT_SERVER, 0, 0, 0 },
+       { "SQUIT", IRC_SQUIT, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
        { "STATS", IRC_STATS, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
        { "SUMMON", IRC_SUMMON, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
        { "TIME", IRC_TIME, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
@@ -103,6 +102,7 @@ static COMMAND My_Commands[] =
        { "USERS", IRC_USERS, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
        { "VERSION", IRC_VERSION, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
        { "WALLOPS", IRC_WALLOPS, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
+       { "WEBIRC", IRC_WEBIRC, CLIENT_UNKNOWN, 0, 0, 0 },
        { "WHO", IRC_WHO, CLIENT_USER, 0, 0, 0 },
        { "WHOIS", IRC_WHOIS, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
        { "WHOWAS", IRC_WHOWAS, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
@@ -120,8 +120,6 @@ static bool Validate_Args PARAMS(( CONN_ID Idx, REQUEST *Req, bool *Closed ));
 
 static bool Handle_Request PARAMS(( CONN_ID Idx, REQUEST *Req ));
 
-#define ARRAY_SIZE(x)  (sizeof(x)/sizeof((x)[0]))
-
 /**
  * Return the pointer to the global "IRC command structure".
  * This structure, an array of type "COMMAND" describes all the IRC commands
@@ -397,7 +395,7 @@ Handle_Numeric(CLIENT *client, REQUEST *Req)
                /* This server is the target of the numeric */
                num = atoi(Req->command);
 
-               for (i = 0; i < (int) ARRAY_SIZE(Numerics); i++) {
+               for (i = 0; i < (int) C_ARRAY_SIZE(Numerics); i++) {
                        if (num == Numerics[i].numeric) {
                                if (!Numerics[i].function)
                                        return CONNECTED;