1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 15:06:39 +02:00

BUILD : 1.7.0 (30) BUGS : http://bugs.anope.org/show_bug.cgi?id=3 NOTES : Fixed moduleAddCommand for a non-existant service, now returns MOD_ERR_NOSERVICE, updated hs_moo to deal with it nicely

git-svn-id: svn://svn.anope.org/anope/trunk@30 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@21 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b
2004-04-04 10:47:35 +00:00
parent 5bced6fbef
commit 1eb2bf791a
5 changed files with 51 additions and 11 deletions
+1
View File
@@ -1,6 +1,7 @@
Anope Version 1.7.0
--------------------
Provided by Anope Dev. <dev@anope.org>
2004/04/04 Fixed moduleAddCommand for a non-existant service
2004/04/01 Added memo2mail and /msg memoserv set notify MAIL/NOMAIL.
2004/03/31 Fixed MySQL double encryption if using MD5.
2004/03/31 Implemented MySQL Phase2 (see docs/MYSQL file)
+36 -7
View File
@@ -656,20 +656,49 @@ int moduleAddCommand(CommandHash * cmdTable[], Command * c, int pos)
c->mod_name = sstrdup(mod_current_module->name);
}
if (cmdTable == HOSTSERV) {
c->service = sstrdup(s_HostServ);
if (s_HostServ) {
c->service = sstrdup(s_HostServ);
} else {
return MOD_ERR_NOSERVICE;
}
} else if (cmdTable == BOTSERV) {
c->service = sstrdup(s_BotServ);
if (s_BotServ) {
c->service = sstrdup(s_BotServ);
} else {
return MOD_ERR_NOSERVICE;
}
} else if (cmdTable == MEMOSERV) {
c->service = sstrdup(s_MemoServ);
if (s_MemoServ) {
c->service = sstrdup(s_MemoServ);
} else {
return MOD_ERR_NOSERVICE;
}
} else if (cmdTable == CHANSERV) {
c->service = sstrdup(s_ChanServ);
if (s_ChanServ) {
c->service = sstrdup(s_ChanServ);
} else {
return MOD_ERR_NOSERVICE;
}
} else if (cmdTable == NICKSERV) {
c->service = sstrdup(s_NickServ);
if (s_NickServ) {
c->service = sstrdup(s_NickServ);
} else {
return MOD_ERR_NOSERVICE;
}
} else if (cmdTable == HELPSERV) {
c->service = sstrdup(s_HelpServ);
if (s_HelpServ) {
c->service = sstrdup(s_HelpServ);
} else {
return MOD_ERR_NOSERVICE;
}
} else if (cmdTable == OPERSERV) {
c->service = sstrdup(s_OperServ);
if (s_OperServ) {
c->service = sstrdup(s_OperServ);
} else {
return MOD_ERR_NOSERVICE;
}
} else
c->service = sstrdup("Unknown");
+1
View File
@@ -50,6 +50,7 @@
#define MOD_ERR_NODELETE 9
#define MOD_ERR_UNKNOWN 10
#define MOD_ERR_FILE_IO 11
#define MOD_ERR_NOSERVICE 12
/*************************************************************************/
+8 -3
View File
@@ -23,6 +23,7 @@ int myHostServMooRootHelp(User *u); /* Function to display extra help t
int AnopeInit(int argc, char **argv) /* This will be executed when the module is loaded */
{
Command *c; /* Pointer to a Command */
int status = 0; /* the status of our new command */
c = createCommand("moo", hs_moo_show, NULL, -1, -1, -1, -1, -1); /* Create a new command "moo" pointing to hs_moo */
moduleAddHelp(c,myHostServMooHelp); /* add help for all users to this command */
@@ -33,13 +34,17 @@ int AnopeInit(int argc, char **argv) /* This will be executed when the mod
moduleSetHostHelp(myHostServHelp); /* add us to the .hs help list */
alog("hs_moo.so: Add Command 'moo' Status: %d", /* Log the command being added */
moduleAddCommand(HOSTSERV, c, MOD_HEAD)); /* And add it to the HOSTSERV cmd table */
status = moduleAddCommand(HOSTSERV, c, MOD_HEAD); /* Add the command to the HOSTSERV cmd table */
alog("hs_moo.so: Add Command 'moo' Status: %d",status); /* Log the command being added */
moduleAddCallback("test",time(NULL)+dotime("15s"),test,0,NULL); /* set a call-back function to exec in 3 mins time */
moduleDelCallback("test");
moduleAddAuthor(AUTHOR); /* tell Anope about the author */
moduleAddVersion(VERSION); /* Tell Anope about the verison */
if(status!=MOD_ERR_OK) {
return MOD_STOP;
}
return MOD_CONT;
}
+5 -1
View File
@@ -8,11 +8,15 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="0"
VERSION_BUILD="29"
VERSION_BUILD="30"
VERSION_EXTRA=""
# $Log$
#
# BUILD : 1.7.0 (30)
# BUGS : http://bugs.anope.org/show_bug.cgi?id=3
# NOTES : Fixed moduleAddCommand for a non-existant service, now returns MOD_ERR_NOSERVICE, updated hs_moo to deal with it nicely
#
# BUILD : 1.7.0 (29)
# BUGS : http://bugs.anope.org/show_bug.cgi?id=9
# NOTES : Updated en_us.l file to show MAIL as a valid option on notify syntax response