]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/socket.h
Jason, try this..
[user/henk/code/inspircd.git] / include / socket.h
index 53bad88f045f3d5dea3eed6a2d5db035f509d02d..e6ea1615df0e79fe2adfa6b37090084e5c17dedb 100644 (file)
@@ -81,7 +81,7 @@ namespace irc
                 * @returns True if the first mask_bits of address matches the first
                 * mask_bits of mask.
                 */
-               CoreExport bool MatchCIDRBits(unsigned char* address, unsigned char* mask, unsigned int mask_bits);
+               CoreExport bool MatchCIDRBits(const unsigned char* address, const unsigned char* mask, unsigned int mask_bits);
 
                /** Match CIDR, without matching username/nickname parts.
                 *
@@ -92,7 +92,7 @@ namespace irc
                 * @param cidr_mask The human readable mask, e.g. 1.2.0.0/16
                 * @return True if the mask matches the address
                 */
-               CoreExport bool MatchCIDR(const char* address, const char* cidr_mask);
+               CoreExport bool MatchCIDR(const std::string &address, const std::string &cidr_mask);
 
                /** Match CIDR, including an optional username/nickname part.
                 *
@@ -105,7 +105,7 @@ namespace irc
                 * @param cidr_mask The human readable mask, e.g. *\@1.2.0.0/16
                 * @return True if the mask matches the address
                 */
-               CoreExport bool MatchCIDR(const char* address, const char* cidr_mask, bool match_with_username);
+               CoreExport bool MatchCIDR(const std::string &address, const std::string &cidr_mask, bool match_with_username);
 
                /** Convert an insp_inaddr into human readable form.
                 * 
@@ -157,6 +157,15 @@ class CoreExport ListenSocket : public EventHandler
        std::string bind_addr;
        /** Port socket is bound to */
        int bind_port;
+
+       static sockaddr *sock_us;
+
+       static sockaddr *client;
+
+       static sockaddr *raddr;
+
+       static unsigned int socketcount;
+
  public:
        /** Create a new listening socket
         */