From 898e8da56573c70524a926c1df5dbab7ffcca6a5 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 16 Dec 2005 09:56:33 +0000 Subject: Moved command parsing crap into command_parse.cpp git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2505 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/command_parse.h | 30 ++++++++++++++++++++++++++++++ include/commands.h | 2 +- include/dns.h | 7 +++++++ include/inspircd.h | 6 ------ 4 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 include/command_parse.h (limited to 'include') diff --git a/include/command_parse.h b/include/command_parse.h new file mode 100644 index 000000000..098c8330f --- /dev/null +++ b/include/command_parse.h @@ -0,0 +1,30 @@ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * Inspire is copyright (C) 2002-2005 ChatSpike-Dev. + * E-mail: + * + * + * + * Written by Craig Edwards, Craig McLure, and others. + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ + +#ifndef __COMMAND_PARSE_H +#define __COMMAND_PARSE_H + +#include +#include +#include +#include "users.h" + +void call_handler(std::string &commandname,char **parameters, int pcnt, userrec *user); +bool is_valid_cmd(std::string &commandname, int pcnt, userrec * user); +int loop_call(handlerfunc fn, char **parameters, int pcnt, userrec *u, int start, int end, int joins); +void process_buffer(const char* cmdbuf,userrec *user); + +#endif diff --git a/include/commands.h b/include/commands.h index f05e9dac0..115705eb5 100644 --- a/include/commands.h +++ b/include/commands.h @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * Inspire is copyright (C) 2002-2004 ChatSpike-Dev. + * Inspire is copyright (C) 2002-2005 ChatSpike-Dev. * E-mail: * * diff --git a/include/dns.h b/include/dns.h index 63d5bb1fb..33b5f8c7a 100644 --- a/include/dns.h +++ b/include/dns.h @@ -97,4 +97,11 @@ public: void SetNS(std::string dnsserver); }; +/** This is the handler function for multi-threaded DNS. + * It cannot be a class member as pthread will not let us + * create a thread whos handler function is a member of + * a class (ugh). + */ +void* dns_task(void* arg); + #endif diff --git a/include/inspircd.h b/include/inspircd.h index ad95d859e..0ebc3420c 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -114,14 +114,8 @@ class InspIRCd }; -/* prototypes */ -void call_handler(std::string &commandname,char **parameters, int pcnt, userrec *user); -bool is_valid_cmd(std::string &commandname, int pcnt, userrec * user); -int loop_call(handlerfunc fn, char **parameters, int pcnt, userrec *u, int start, int end, int joins); /* userrec optimization stuff */ void AddServerName(std::string servername); const char* FindServerNamePtr(std::string servername); -void* dns_task(void* arg); -void process_buffer(const char* cmdbuf,userrec *user); #endif -- cgit v1.2.3