diff options
author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-28 00:49:37 +0000 |
---|---|---|
committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-28 00:49:37 +0000 |
commit | bd7f4f8c4995ddc81d5c5ab9cb32ed05048908c2 (patch) | |
tree | 3638f54db859023ca2a9cfbf8983b7b07527005e /src/modules.c | |
parent | 090107db5f2afa16e155f56d7928e38d0a17a295 (diff) |
Patch from Adam, reducing duplication in cs_modes. Untested.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2135 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules.c')
-rw-r--r-- | src/modules.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/modules.c b/src/modules.c index caf25fa04..bb0cfeca7 100644 --- a/src/modules.c +++ b/src/modules.c @@ -1035,6 +1035,25 @@ void updateProtectDetails(const char *level_info_protect_word, } } +void updateOwnerDetails(const char *fant_owner_add, const char *fant_owner_del, const char *owner_set_mode, const char *owner_del_mode) +{ + CSModeUtil ptr; + int i = 0; + + ptr = csmodeutils[i]; + while (ptr.name) { + if (!strcmp(ptr.name, "OWNER")) { + csmodeutils[i].bsname = sstrdup(fant_owner_add); + csmodeutils[i].mode = sstrdup(owner_set_mode); + } + else if (!strcmp(ptr.name, "DEOWNER")) { + csmodeutils[i].bsname = sstrdup(fant_owner_del); + csmodeutils[i].mode = sstrdup(owner_del_mode); + } + ptr = csmodeutils[++i]; + } +} + void Module::NoticeLang(char *source, User * u, int number, ...) { va_list va; |