diff options
| author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-14 20:57:20 +0000 |
|---|---|---|
| committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-14 20:57:20 +0000 |
| commit | 6c55e0a529c7f1216ff6f63a4fc77ea06a2a3a38 (patch) | |
| tree | 91b0841faf23087ebe0c74dd4269d181a383f1e7 /src/modules/demos/hs_conf.c | |
| parent | 069409cd99cf78ab8bf87a1fe69a833576414fd3 (diff) | |
Insane commit of doom: s/ \t/g
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1681 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules/demos/hs_conf.c')
| -rw-r--r-- | src/modules/demos/hs_conf.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/modules/demos/hs_conf.c b/src/modules/demos/hs_conf.c index 233aa2ff1..755b1bae4 100644 --- a/src/modules/demos/hs_conf.c +++ b/src/modules/demos/hs_conf.c @@ -14,24 +14,24 @@ int mReadConfig(int argc, char **argv); char *setting; int AnopeInit(int argc, char **argv) { - Command *c; - EvtHook *hook; - int status = 0; + Command *c; + EvtHook *hook; + int status = 0; - setting = NULL; + setting = NULL; - mReadConfig(0,NULL); - - c = createCommand("SHOW",mShowSetting,NULL,-1,-1,-1,-1,-1); - status = this->AddCommand(HOSTSERV, c, MOD_HEAD); + mReadConfig(0,NULL); + + c = createCommand("SHOW",mShowSetting,NULL,-1,-1,-1,-1,-1); + status = this->AddCommand(HOSTSERV, c, MOD_HEAD); - hook = createEventHook(EVENT_RELOAD, mReadConfig); - status = this->AddEventHook(hook); - - if(status!=MOD_ERR_OK) { + hook = createEventHook(EVENT_RELOAD, mReadConfig); + status = this->AddEventHook(hook); + + if(status!=MOD_ERR_OK) { return MOD_STOP; - } - return MOD_CONT; + } + return MOD_CONT; } /** @@ -46,8 +46,8 @@ void AnopeFini(void) { * Simple function to show the user the current config setting **/ int mShowSetting(User *u) { - notice(s_HostServ,u->nick,"Setting in use is [%s]",setting); - return MOD_CONT; + notice(s_HostServ,u->nick,"Setting in use is [%s]",setting); + return MOD_CONT; } /** @@ -55,19 +55,19 @@ int mShowSetting(User *u) { * the EVENT_RELOAD event is recived. **/ int mReadConfig(int argc, char **argv) { - char *tmp=NULL; - Directive d[] = {{"HSConfigSetting", {{PARAM_STRING, PARAM_RELOAD, &tmp}}}}; - moduleGetConfigDirective(d); + char *tmp=NULL; + Directive d[] = {{"HSConfigSetting", {{PARAM_STRING, PARAM_RELOAD, &tmp}}}}; + moduleGetConfigDirective(d); - if(setting) { - free(setting); - } - if(tmp) { + if(setting) { + free(setting); + } + if(tmp) { setting = tmp; - } else { + } else { setting = sstrdup(DEFAULT_SETTING); - } - return MOD_CONT; + } + return MOD_CONT; } |
