summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-16 09:56:33 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-16 09:56:33 +0000
commit898e8da56573c70524a926c1df5dbab7ffcca6a5 (patch)
treec39386855aacfb719554af7cb3afe0d3c62e59b4 /include
parent7cf8d9c1c8ba68419d282e715b7fc3575987a6f2 (diff)
Moved command parsing crap into command_parse.cpp
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2505 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/command_parse.h30
-rw-r--r--include/commands.h2
-rw-r--r--include/dns.h7
-rw-r--r--include/inspircd.h6
4 files changed, 38 insertions, 7 deletions
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:
+ * <brain@chatspike.net>
+ * <Craig@chatspike.net>
+ *
+ * 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 <typeinfo>
+#include <iostream>
+#include <string>
+#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:
* <brain@chatspike.net>
* <Craig@chatspike.net>
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