summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-15 17:47:52 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-15 17:47:52 +0000
commitba47bf2f6f2fe04e50ca63b26f14ba1e524bee72 (patch)
treea00ce3d3e30bc4a7d96a0b174169cdd676af0135 /src
parent330d9ee9e782a4ed3e2de8ff3082cc5bbe7d6b9e (diff)
HelpServ has been destroyed, +1000 points. Also fixed the argument order in the deprecated match_wild() function.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2074 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/Makefile3
-rw-r--r--src/config.c13
-rw-r--r--src/core/he_help.c55
-rw-r--r--src/core/os_modinfo.c1
-rw-r--r--src/helpserv.c69
-rw-r--r--src/init.c3
-rw-r--r--src/messages.c4
-rw-r--r--src/misc.c4
-rw-r--r--src/module.cpp9
-rw-r--r--src/modules.c14
10 files changed, 3 insertions, 172 deletions
diff --git a/src/Makefile b/src/Makefile
index 8e41b92ee..179268fb3 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,5 +1,5 @@
OBJS = actions.o base64.o bots.o botserv.o channels.o chanserv.o command.o commands.o compat.o \
- config.o datafiles.o encrypt.o events.o hashcomp.o helpserv.o hostserv.o init.o ircd.o language.o log.o mail.o main.o \
+ config.o datafiles.o encrypt.o events.o hashcomp.o hostserv.o init.o ircd.o language.o log.o mail.o main.o \
memory.o memoserv.o messages.o misc.o modules.o news.o nickserv.o operserv.o \
process.o protocol.o send.o servers.o sessions.o slist.o sockutil.o opertype.o timeout.o users.o module.o modulemanager.o configreader.o \
wildcard.o nickcore.o
@@ -49,7 +49,6 @@ encrypt.o: encrypt.c $(INCLUDES)
events.o: events.c $(INCLUDES)
init.o: init.c $(INCLUDES)
ircd.o: ircd.c $(INCLUDES)
-helpserv.o: helpserv.c $(INCLUDES)
hostserv.o: hostserv.c $(INCLUDES)
language.o: language.c $(INCLUDES)
log.o: log.c $(INCLUDES)
diff --git a/src/config.c b/src/config.c
index bd2168f1a..7834a81cd 100644
--- a/src/config.c
+++ b/src/config.c
@@ -44,14 +44,12 @@ char *s_NickServ;
char *s_ChanServ;
char *s_MemoServ;
char *s_BotServ;
-char *s_HelpServ;
char *s_OperServ;
char *s_GlobalNoticer;
char *desc_NickServ;
char *desc_ChanServ;
char *desc_MemoServ;
char *desc_BotServ;
-char *desc_HelpServ;
char *desc_OperServ;
char *desc_GlobalNoticer;
@@ -226,10 +224,6 @@ static char *MemoCoreModules;
char **MemoServCoreModules;
int MemoServCoreNumber;
-static char *HelpCoreModules;
-char **HelpServCoreModules;
-int HelpServCoreNumber;
-
static char *BotCoreModules;
char **BotServCoreModules;
int BotServCoreNumber;
@@ -735,7 +729,7 @@ int ServerConfig::Read(bool bail)
{
errstr.clear();
// These tags MUST occur and must ONLY occur once in the config file
- static const char *Once[] = {"serverinfo", "networkinfo", "options", "nickserv", "chanserv", "memoserv", "helpserv", "operserv", NULL};
+ static const char *Once[] = {"serverinfo", "networkinfo", "options", "nickserv", "chanserv", "memoserv", "operserv", NULL};
// These tags can occur ONCE or not at all
InitialConfig Values[] = {
/* The following comments are from CyberBotX to w00t as examples to use:
@@ -905,9 +899,6 @@ int ServerConfig::Read(bool bail)
{"hostserv", "database", "hosts.db", new ValueContainerChar(&HostDBName), DT_CHARPTR, ValidateHostServ},
{"hostserv", "modules", "", new ValueContainerChar(&HostCoreModules), DT_CHARPTR, NoValidation},
{"hostserv", "hostsetters", "", new ValueContainerChar(&HostSetter), DT_CHARPTR, NoValidation},
- {"helpserv", "nick", "HelpServ", new ValueContainerChar(&s_HelpServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
- {"helpserv", "description", "Help Service", new ValueContainerChar(&desc_HelpServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
- {"helpserv", "modules", "", new ValueContainerChar(&HelpCoreModules), DT_CHARPTR, NoValidation},
{"operserv", "nick", "OperServ", new ValueContainerChar(&s_OperServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
{"operserv", "description", "Operator Service", new ValueContainerChar(&desc_OperServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
{"operserv", "globalnick", "Global", new ValueContainerChar(&s_GlobalNoticer), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
@@ -1801,8 +1792,6 @@ int read_config(int reload)
buildStringList(HostCoreModules ? HostCoreModules : "", &HostServCoreNumber);
MemoServCoreModules =
buildStringList(MemoCoreModules ? MemoCoreModules : "", &MemoServCoreNumber);
- HelpServCoreModules =
- buildStringList(HelpCoreModules ? HelpCoreModules : "", &HelpServCoreNumber);
BotServCoreModules =
buildStringList(BotCoreModules ? BotCoreModules : "", &BotServCoreNumber);
diff --git a/src/core/he_help.c b/src/core/he_help.c
deleted file mode 100644
index 7227669cf..000000000
--- a/src/core/he_help.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* HelpServ core functions
- *
- * (C) 2003-2009 Anope Team
- * Contact us at team@anope.org
- *
- * Please read COPYING and README for further details.
- *
- * Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
- * $Id$
- *
- */
-/*************************************************************************/
-
-#include "module.h"
-
-class CommandHEHelp : public Command
-{
- public:
- CommandHEHelp() : Command("HELP", 1, 1)
- {
- }
-
- CommandReturn Execute(User *u, std::vector<std::string> &params)
- {
- mod_help_cmd(s_HelpServ, u, HELPSERV, params.size() > 0 ? params[0].c_str() : NULL);
- return MOD_CONT;
- }
-
- void OnSyntaxError(User *u)
- {
- notice_help(s_HelpServ, u, HELP_HELP, s_NickServ, s_ChanServ, s_MemoServ);
- if (s_BotServ)
- notice_help(s_HelpServ, u, HELP_HELP_BOT, s_BotServ);
- if (s_HostServ)
- notice_help(s_HelpServ, u, HELP_HELP_HOST, s_HostServ);
- moduleDisplayHelp(7, u);
- }
-};
-
-class HEHelp : public Module
-{
- public:
- HEHelp(const std::string &modname, const std::string &creator) : Module(modname, creator)
- {
- this->SetAuthor("Anope");
- this->SetVersion("$Id$");
- this->SetType(CORE);
-
- this->AddCommand(HELPSERV, new CommandHEHelp(), MOD_UNIQUE);
- }
-};
-
-MODULE_INIT("he_help", HEHelp)
diff --git a/src/core/os_modinfo.c b/src/core/os_modinfo.c
index a1a0694e6..e96de987c 100644
--- a/src/core/os_modinfo.c
+++ b/src/core/os_modinfo.c
@@ -47,7 +47,6 @@ class CommandOSModInfo : public Command
showModuleCmdLoaded(CHANSERV[idx], m->name.c_str(), u);
showModuleCmdLoaded(BOTSERV[idx], m->name.c_str(), u);
showModuleCmdLoaded(MEMOSERV[idx], m->name.c_str(), u);
- showModuleCmdLoaded(HELPSERV[idx], m->name.c_str(), u);
}
}
else
diff --git a/src/helpserv.c b/src/helpserv.c
deleted file mode 100644
index d26e69603..000000000
--- a/src/helpserv.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* HelpServ functions
- *
- * (C) 2003-2009 Anope Team
- * Contact us at team@anope.org
- *
- * Please read COPYING and README for further details.
- *
- * Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
- * $Id$
- *
- */
-
-/*************************************************************************/
-#include "services.h"
-#include "pseudo.h"
-
-void moduleAddHelpServCmds();
-
-/*************************************************************************/
-
-/**
- * Setup the commands for HelpServ
- * @return void
- */
-void moduleAddHelpServCmds()
-{
- ModuleManager::LoadModuleList(HelpServCoreNumber, HelpServCoreModules);
-}
-
-/*************************************************************************/
-
-/**
- * HelpServ initialization.
- * @return void
- */
-void helpserv_init()
-{
- moduleAddHelpServCmds();
-}
-
-/*************************************************************************/
-
-/**
- * Main HelpServ routine.
- * @param u User Struct of the user sending the PRIVMSG
- * @param buf Buffer containing the PRIVMSG data
- * @return void
- */
-void helpserv(User * u, char *buf)
-{
- const char *cmd, *s;
-
- cmd = strtok(buf, " ");
-
- if (!cmd) {
- return;
- } else if (stricmp(cmd, "\1PING") == 0) {
- if (!(s = strtok(NULL, ""))) {
- s = "";
- }
- ircdproto->SendCTCP(findbot(s_HelpServ), u->nick, "PING %s", s);
- } else {
- mod_run_cmd(s_HelpServ, u, HELPSERV, cmd);
- }
-}
-
-/*************************************************************************/
diff --git a/src/init.c b/src/init.c
index a70f883ee..79633d0ec 100644
--- a/src/init.c
+++ b/src/init.c
@@ -494,7 +494,6 @@ int init_secondary(int ac, char **av)
bs_init();
os_init();
hostserv_init();
- helpserv_init();
/* load any custom modules */
ModuleManager::LoadModuleList(ModulesNumber, ModulesAutoload);
@@ -596,8 +595,6 @@ int init_secondary(int ac, char **av)
bi = new BotInfo(s_MemoServ, ServiceUser, ServiceHost, desc_MemoServ);
if (s_BotServ)
bi = new BotInfo(s_BotServ, ServiceUser, ServiceHost, desc_BotServ);
- if (s_HelpServ)
- bi = new BotInfo(s_HelpServ, ServiceUser, ServiceHost, desc_HelpServ);
if (s_GlobalNoticer)
bi = new BotInfo(s_GlobalNoticer, ServiceUser, ServiceHost, desc_GlobalNoticer);
}
diff --git a/src/messages.c b/src/messages.c
index 83f1dd338..45ff4cbd3 100644
--- a/src/messages.c
+++ b/src/messages.c
@@ -185,8 +185,6 @@ int m_privmsg(const char *source, const char *receiver, const char *msg)
memoserv(u, const_cast<char *>(msg)); // XXX Unsafe cast, this needs reviewing -- CyberBotX
} else if (s_HostServ && !stricmp(receiver, s_HostServ)) {
hostserv(u, const_cast<char *>(msg)); // XXX Unsafe cast, this needs reviewing -- CyberBotX
- } else if (s_HelpServ && !stricmp(receiver, s_HelpServ)) {
- helpserv(u, const_cast<char *>(msg)); // XXX Unsafe cast, this needs reviewing -- CyberBotX
} else if (s_BotServ && !stricmp(receiver, s_BotServ)) {
botserv(u, const_cast<char *>(msg)); // XXX Unsafe cast, this needs reviewing -- CyberBotX
} else if (s_BotServ && (bi = findbot(receiver))) {
@@ -293,8 +291,6 @@ int m_whois(const char *source, const char *who)
clientdesc = desc_BotServ;
else if (s_HostServ && stricmp(who, s_HostServ) == 0)
clientdesc = desc_HostServ;
- else if (stricmp(who, s_HelpServ) == 0)
- clientdesc = desc_HelpServ;
else if (stricmp(who, s_OperServ) == 0)
clientdesc = desc_OperServ;
else if (stricmp(who, s_GlobalNoticer) == 0)
diff --git a/src/misc.c b/src/misc.c
index 858cb0ebc..28f0009a1 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -219,7 +219,7 @@ const char *merge_args(int argc, char **argv)
*/
int match_wild(const char *pattern, const char *str)
{
- return Anope::Match(str, pattern, true);
+ return Anope::Match(pattern, str, true);
}
/*************************************************************************/
@@ -828,8 +828,6 @@ int nickIsServices(const char *tempnick, int bot)
found++;
else if (s_BotServ && (stricmp(nick, s_BotServ) == 0))
found++;
- else if (s_HelpServ && (stricmp(nick, s_HelpServ) == 0))
- found++;
else if (s_OperServ && (stricmp(nick, s_OperServ) == 0))
found++;
else if (s_GlobalNoticer && (stricmp(nick, s_GlobalNoticer) == 0))
diff --git a/src/module.cpp b/src/module.cpp
index cfec523b3..af002d94e 100644
--- a/src/module.cpp
+++ b/src/module.cpp
@@ -21,7 +21,6 @@ Module::Module(const std::string &mname, const std::string &creator)
this->botHelp = NULL;
this->operHelp = NULL;
this->hostHelp = NULL;
- this->helpHelp = NULL;
this->type = THIRD;
this->handle = NULL;
@@ -123,14 +122,6 @@ Module::~Module()
}
}
- for (current = HE_cmdTable[idx]; current; current = current->next) {
- for (c = current->c; c; c = c->next) {
- if ((c->mod_name) && (strcmp(c->mod_name, this->name.c_str()) == 0)) {
- this->DelCommand(HELPSERV, c->name.c_str());
- }
- }
- }
-
for (current = OS_cmdTable[idx]; current; current = current->next) {
for (c = current->c; c; c = c->next) {
if ((c->mod_name) && (stricmp(c->mod_name, this->name.c_str()) == 0)) {
diff --git a/src/modules.c b/src/modules.c
index 6359c7c01..7d4f1942d 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -23,7 +23,6 @@ CommandHash *BOTSERV[MAX_CMD_HASH];
CommandHash *MEMOSERV[MAX_CMD_HASH];
CommandHash *NICKSERV[MAX_CMD_HASH];
CommandHash *CHANSERV[MAX_CMD_HASH];
-CommandHash *HELPSERV[MAX_CMD_HASH];
CommandHash *OPERSERV[MAX_CMD_HASH];
MessageHash *IRCD[MAX_CMD_HASH];
ModuleHash *MODULE_HASH[MAX_CMD_HASH];
@@ -296,12 +295,6 @@ int Module::AddCommand(CommandHash * cmdTable[], Command * c, int pos)
} else {
return MOD_ERR_NOSERVICE;
}
- } else if (cmdTable == HELPSERV) {
- if (s_HelpServ) {
- c->service = sstrdup(s_HelpServ);
- } else {
- return MOD_ERR_NOSERVICE;
- }
} else if (cmdTable == OPERSERV) {
if (s_OperServ) {
c->service = sstrdup(s_OperServ);
@@ -932,11 +925,6 @@ void Module::SetHostHelp(void (*func)(User *))
this->hostHelp = func;
}
-void Module::SetHelpHelp(void (*func)(User *))
-{
- this->helpHelp = func;
-}
-
/**
* Display any extra module help for the given service.
* @param services which services is help being dispalyed for?
@@ -961,8 +949,6 @@ void moduleDisplayHelp(int service, User * u)
current->m->operHelp(u);
} else if ((service == 6) && current->m->hostHelp) {
current->m->hostHelp(u);
- } else if ((service == 7) && current->m->helpHelp) {
- current->m->helpHelp(u);
}
}
}