1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 22:13:12 +02:00

BUILD : 1.7.5 (396) BUGS : N/A NOTES : Added arvg[0] to AnopeInit call, it will contain the nick of the person who loaded the module. All existing modules are un-effected :)

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


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@261 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b
2004-10-13 19:31:24 +00:00
parent e6ed7b9eb5
commit d24c7ebd16
4 changed files with 32 additions and 2 deletions
+11
View File
@@ -35,6 +35,17 @@ int AnopeInit(int argc, char **argv) /* This will be executed when the mod
moduleSetHostHelp(myHostServHelp); /* add us to the .hs help list */
status = moduleAddCommand(HOSTSERV, c, MOD_HEAD); /* Add the command to the HOSTSERV cmd table */
/* Check if we have any argv's */
if(argc>0) {
/* we do, the first will be the nick of the person modload'ing us */
/* or NULL if we were auto-loaded */
if(argv[0]) {
alog("hs_moo was modloaded by: [%s]",argv[0]);
} else {
alog("hs_moo was automatically loaded by anope");
}
}
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 */