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 | b3df8dbfb1943030adb6f72f5c3cee509d6ffa5e (patch) | |
tree | 0836878e5d71409875cf057657691b70f3c5fd79 /src/modules/cs_tban.c | |
parent | 792b705757dc01a9b12c3bb4f0b8855c25dbde07 (diff) |
Fix src/modules/ so they compile with stricter g++.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1204 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules/cs_tban.c')
-rw-r--r-- | src/modules/cs_tban.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/modules/cs_tban.c b/src/modules/cs_tban.c index 9558c92fd..f22f9aef5 100644 --- a/src/modules/cs_tban.c +++ b/src/modules/cs_tban.c @@ -132,28 +132,27 @@ int do_tban(User * u) void addBan(Channel * c, time_t timeout, char *banmask) { - char *av[3]; + const char *av[3]; char *cb[2]; cb[0] = c->name; cb[1] = banmask; - av[0] = sstrdup("+b"); + av[0] = "+b"; av[1] = banmask; anope_cmd_mode(whosends(c->ci), c->name, "+b %s", av[1]); chan_set_modes(s_ChanServ, c, 2, av, 1); - free(av[0]); moduleAddCallback("tban", time(NULL) + timeout, delBan, 2, cb); } int delBan(int argc, char **argv) { - char *av[3]; + const char *av[3]; Channel *c; - av[0] = sstrdup("-b"); + av[0] = "-b"; av[1] = argv[1]; if ((c = findchan(argv[0])) && c->ci) { @@ -161,8 +160,6 @@ int delBan(int argc, char **argv) chan_set_modes(s_ChanServ, c, 2, av, 1); } - free(av[0]); - return MOD_CONT; } |