diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-09-10 16:07:32 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-09-10 16:07:32 +0000 |
commit | f5ab326d07f82c7418020829985e8f26b1bcd32a (patch) | |
tree | 26f98aec29156b34625efc0a2a27488ba43b7692 /src | |
parent | 3d5e804ca1753cf564c5581bb0611c1a709be078 (diff) |
BUILD : 1.7.15 (1148) BUGS : 588 NOTES : Added SASET AUTOOP to NickServ to match SET AUTOOP
git-svn-id: svn://svn.anope.org/anope/trunk@1148 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@871 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ns_saset.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/core/ns_saset.c b/src/core/ns_saset.c index cad28afc1..8b166a29b 100644 --- a/src/core/ns_saset.c +++ b/src/core/ns_saset.c @@ -31,6 +31,7 @@ int do_saset_private(User * u, NickCore * nc, char *param); int do_saset_msg(User * u, NickCore * nc, char *param); int do_saset_hide(User * u, NickCore * nc, char *param); int do_saset_noexpire(User * u, NickAlias * nc, char *param); +int do_saset_autoop(User * u, NickCore * nc, char *param); void myNickServHelp(User * u); /** @@ -87,6 +88,10 @@ int AnopeInit(int argc, char **argv) -1, NICK_HELP_SASET_NOEXPIRE, NICK_HELP_SASET_NOEXPIRE); moduleAddCommand(NICKSERV, c, MOD_UNIQUE); + c = createCommand("SASET AUTOOP", NULL, is_services_admin, -1, -1, + -1, NICK_HELP_SASET_AUTOOP, + NICK_HELP_SASET_AUTOOP); + moduleAddCommand(NICKSERV, c, MOD_UNIQUE); moduleSetNickHelp(myNickServHelp); @@ -175,6 +180,8 @@ int do_saset(User * u) do_saset_hide(u, na->nc, param); } else if (stricmp(cmd, "NOEXPIRE") == 0) { do_saset_noexpire(u, na, param); + } else if (stricmp(cmd, "AUTOOP") == 0) { + do_saset_autoop(u, na->nc, param); } else { notice_lang(s_NickServ, u, NICK_SASET_UNKNOWN_OPTION, cmd); } @@ -485,4 +492,20 @@ int do_saset_noexpire(User * u, NickAlias * na, char *param) return MOD_CONT; } +int do_saset_autoop(User * u, NickCore * nc, char *param) +{ + if (stricmp(param, "ON") == 0) { + nc->flags &= ~NI_AUTOOP; + notice_lang(s_NickServ, u, NICK_SASET_AUTOOP_ON, nc->display); + } else if (stricmp(param, "OFF") == 0) { + nc->flags |= NI_AUTOOP; + notice_lang(s_NickServ, u, NICK_SASET_AUTOOP_OFF, nc->display); + } else { + syntax_error(s_NickServ, u, "SET AUTOOP", NICK_SASET_AUTOOP_SYNTAX); + } + + return MOD_CONT; +} + + /* EOF */ |