diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:10 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:10 +0000 |
commit | c32c3c99a1e1d395c88e901de200c21b9ca1e84f (patch) | |
tree | e272e1dc395df2947314ff24f0f9ce12b94f8f53 /src/actions.c | |
parent | 431918ceacfd5a580d4f28a8ae6077c9bbc44b99 (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/actions.c')
-rw-r--r-- | src/actions.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/actions.c b/src/actions.c index 9da4f60d4..dcccf0131 100644 --- a/src/actions.c +++ b/src/actions.c @@ -6,9 +6,9 @@ * 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. - * - * $Id$ + * Based on the original code of Services by Andy Church. + * + * $Id$ * */ @@ -130,7 +130,7 @@ void sqline(char *mask, char *reason) */ void common_unban(ChannelInfo * ci, char *nick) { - char *av[4]; + const char *av[4]; char *host = NULL; char buf[BUFSIZE]; int ac; @@ -170,11 +170,11 @@ void common_unban(ChannelInfo * ci, char *nick) snprintf(buf, BUFSIZE - 1, "%ld", (long int) time(NULL)); av[0] = ci->name; av[1] = buf; - av[2] = sstrdup("-b"); + av[2] = "-b"; ac = 4; } else { av[0] = ci->name; - av[1] = sstrdup("-b"); + av[1] = "-b"; ac = 3; } @@ -191,11 +191,6 @@ void common_unban(ChannelInfo * ci, char *nick) do_cmode(whosends(ci), ac, av); } } - - if (ircdcap->tsmode) - free(av[2]); - else - free(av[1]); } /* host_resolve() sstrdup us this info so we gotta free it */ if (host) { |