summaryrefslogtreecommitdiff
path: root/modules/hs_moo.c
diff options
context:
space:
mode:
authorrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-04-04 10:47:35 +0000
committerrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-04-04 10:47:35 +0000
commit1eb2bf791a953cea3ed72a0a4b5ef8380fb656b3 (patch)
tree6abc6c3ab3356f1c8afce0b2d6d5514d7bf478f2 /modules/hs_moo.c
parent5bced6fbefa29746001117b2b33b89d9fb7eb515 (diff)
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
Diffstat (limited to 'modules/hs_moo.c')
-rw-r--r--modules/hs_moo.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/hs_moo.c b/modules/hs_moo.c
index 97d48ae04..3a2fccfe1 100644
--- a/modules/hs_moo.c
+++ b/modules/hs_moo.c
@@ -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;
}