summaryrefslogtreecommitdiff
path: root/src/chanserv.c
diff options
context:
space:
mode:
authortrystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-01-30 21:19:28 +0000
committertrystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-01-30 21:19:28 +0000
commitf8ac398b86ea6a26dba62064d9810796466e4118 (patch)
treed216512f4e7f5dcf83e04acd0377890032bdbe49 /src/chanserv.c
parentf51d7384c3a31a23f4e587a1f910d68c5aec1951 (diff)
BUILD : 1.7.8 (564) BUGS : 285 NOTES : Compiling modules under MacOSX, and fixes up some ChanServ stuff
git-svn-id: svn://svn.anope.org/anope/trunk@564 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@416 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/chanserv.c')
-rw-r--r--src/chanserv.c52
1 files changed, 38 insertions, 14 deletions
diff --git a/src/chanserv.c b/src/chanserv.c
index 02e612baf..affa29519 100644
--- a/src/chanserv.c
+++ b/src/chanserv.c
@@ -5445,28 +5445,44 @@ static int do_devoice(User * u)
static int do_halfop(User * u)
{
- return do_util(u, &csmodeutils[MUT_HALFOP]);
+ if (ircd->halfop) {
+ return do_util(u, &csmodeutils[MUT_HALFOP]);
+ } else {
+ return MOD_CONT;
+ }
}
/*************************************************************************/
static int do_dehalfop(User * u)
{
- return do_util(u, &csmodeutils[MUT_DEHALFOP]);
+ if (ircd->halfop) {
+ return do_util(u, &csmodeutils[MUT_DEHALFOP]);
+ } else {
+ return MOD_CONT;
+ }
}
/*************************************************************************/
static int do_protect(User * u)
{
- return do_util(u, &csmodeutils[MUT_PROTECT]);
+ if (ircd->protect || ircd->admin) {
+ return do_util(u, &csmodeutils[MUT_PROTECT]);
+ } else {
+ return MOD_CONT;
+ }
}
/*************************************************************************/
static int do_deprotect(User * u)
{
- return do_util(u, &csmodeutils[MUT_DEPROTECT]);
+ if (ircd->protect || ircd->admin) {
+ return do_util(u, &csmodeutils[MUT_DEPROTECT]);
+ } else {
+ return MOD_CONT;
+ }
}
/*************************************************************************/
@@ -5478,11 +5494,14 @@ static int do_owner(User * u)
Channel *c;
ChannelInfo *ci;
+ struct u_chanlist *uc;
- if (!chan) {
- struct u_chanlist *uc;
+ if (!ircd->owner) {
+ return MOD_CONT;
+ }
- av[0] = sstrdup("+q");
+ if (!chan) {
+ av[0] = sstrdup(ircd->ownerset);
av[1] = u->nick;
/* Sets the mode to the user on every channels he is on. */
@@ -5511,9 +5530,10 @@ static int do_owner(User * u)
} else if (!is_founder(u, ci)) {
notice_lang(s_ChanServ, u, ACCESS_DENIED);
} else {
- anope_cmd_mode(whosends(ci), c->name, "+q %s", u->nick);
+ anope_cmd_mode(whosends(ci), c->name, "%s %s", ircd->ownerset,
+ u->nick);
- av[0] = sstrdup("+q");
+ av[0] = sstrdup(ircd->ownerset);
av[1] = u->nick;
chan_set_modes(s_ChanServ, c, 2, av, 1);
free(av[0]);
@@ -5530,11 +5550,14 @@ static int do_deowner(User * u)
Channel *c;
ChannelInfo *ci;
+ struct u_chanlist *uc;
- if (!chan) {
- struct u_chanlist *uc;
+ if (!ircd->owner) {
+ return MOD_CONT;
+ }
- av[0] = sstrdup("-q");
+ if (!chan) {
+ av[0] = sstrdup(ircd->ownerunset);
av[1] = u->nick;
/* Sets the mode to the user on every channels he is on. */
@@ -5563,9 +5586,10 @@ static int do_deowner(User * u)
} else if (!is_founder(u, ci)) {
notice_lang(s_ChanServ, u, ACCESS_DENIED);
} else {
- anope_cmd_mode(whosends(ci), c->name, "-q %s", u->nick);
+ anope_cmd_mode(whosends(ci), c->name, "%s %s", ircd->ownerunset,
+ u->nick);
- av[0] = sstrdup("-q");
+ av[0] = sstrdup(ircd->ownerunset);
av[1] = u->nick;
chan_set_modes(s_ChanServ, c, 2, av, 1);
free(av[0]);