summaryrefslogtreecommitdiff
path: root/src/core/cs_ban.c
diff options
context:
space:
mode:
authorRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-30 18:45:10 +0000
committerRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-30 18:45:10 +0000
commitc32c3c99a1e1d395c88e901de200c21b9ca1e84f (patch)
treee272e1dc395df2947314ff24f0f9ce12b94f8f53 /src/core/cs_ban.c
parent431918ceacfd5a580d4f28a8ae6077c9bbc44b99 (diff)
Made all protocol modules able to be compiled via mostly constifying strings.
Due to the above, also had to constify strings in many other areas. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1202 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/cs_ban.c')
-rw-r--r--src/core/cs_ban.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/core/cs_ban.c b/src/core/cs_ban.c
index 509790c0e..3031d461e 100644
--- a/src/core/cs_ban.c
+++ b/src/core/cs_ban.c
@@ -6,8 +6,8 @@
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
+ * Based on the original code of Services by Andy Church.
+ *
* $Id$
*
*/
@@ -97,7 +97,7 @@ int do_ban(User * u)
next = uc->next;
if ((ci = uc->chan->ci) && !(ci->flags & CI_VERBOTEN)
&& check_access(u, ci, CA_BANME)) {
- char *av[3];
+ const char *av[3];
char mask[BUFSIZE];
/*
@@ -115,13 +115,12 @@ int do_ban(User * u)
continue;
}
- av[0] = sstrdup("+b");
+ av[0] = "+b";
get_idealban(ci, u, mask, sizeof(mask));
av[1] = mask;
anope_cmd_mode(whosends(ci), uc->chan->name, "+b %s",
av[1]);
chan_set_modes(s_ChanServ, uc->chan, 2, av, 1);
- free(av[0]);
if ((ci->flags & CI_SIGNKICK)
|| ((ci->flags & CI_SIGNKICK_LEVEL)
@@ -170,15 +169,14 @@ int do_ban(User * u)
} else if (ircd->protectedumode && is_protected(u2)) {
notice_lang(s_ChanServ, u, PERMISSION_DENIED);
} else {
- char *av[3];
+ const char *av[3];
char mask[BUFSIZE];
- av[0] = sstrdup("+b");
+ av[0] = "+b";
get_idealban(ci, u2, mask, sizeof(mask));
av[1] = mask;
anope_cmd_mode(whosends(ci), c->name, "+b %s", av[1]);
chan_set_modes(s_ChanServ, c, 2, av, 1);
- free(av[0]);
/* We still allow host banning while not allowing to kick */
if (!is_on_chan(c, u2))