From fb3964d5c007900061e86e392ceb786bd47260c0 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 15 Nov 2009 18:26:53 +0000 Subject: Add Inspircd::AddServices git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12135 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/inspircd.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include/inspircd.h') diff --git a/include/inspircd.h b/include/inspircd.h index 0bbf3fb03..52035ce49 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -594,6 +594,15 @@ class CoreExport InspIRCd */ bool AddResolver(Resolver* r, bool cached); + /** Register a service provided by a module */ + void AddService(providerbase&); + + inline void AddServices(providerbase** list, int count) + { + for(int i=0; i < count; i++) + AddService(*list[i]); + } + /** Add a command to this server's command parser * @param f A Command command handler object to add * @throw ModuleException Will throw ModuleExcption if the command already exists @@ -814,7 +823,7 @@ class CommandModule : public Module Version GetVersion() { - return Version(cmd.command, VF_VENDOR|VF_CORE); + return Version(cmd.name, VF_VENDOR|VF_CORE); } }; -- cgit v1.2.3