summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--src/botserv.c33
-rw-r--r--version.log6
3 files changed, 32 insertions, 8 deletions
diff --git a/Changes b/Changes
index 5099ebb80..8a3bff299 100644
--- a/Changes
+++ b/Changes
@@ -16,6 +16,7 @@ Provided by Anope Dev. <dev@anope.org> - 2004
11/19 A Added anope_cmd_ctcp() to code API, for sending CTCP messages. [ #00]
11/18 A Unable to use registered nicknames as bot nicks from now on. [ #00]
11/18 A NSAddAccessOnReg to control access list on registration. [ #00]
+01/05 F BotServ's banning would trigger a TSMODE error on a capable IRCd. [ #00]
01/05 F Not resetting the topic on channel creation with KEEPTOPIC off. [#267]
01/04 F Fixed up some alog() messages that were incorrect. [#266]
01/01 F Ultimate3 channel modes, which had been defined incorrectly. [ #00]
diff --git a/src/botserv.c b/src/botserv.c
index 3124652c4..b2cec855e 100644
--- a/src/botserv.c
+++ b/src/botserv.c
@@ -1061,8 +1061,10 @@ static void bot_kick(ChannelInfo * ci, User * u, int message, ...)
static void bot_raw_ban(User * requester, ChannelInfo * ci, char *nick,
char *reason)
{
- char *av[3];
+ int ac;
+ char *av[4];
char mask[BUFSIZE];
+ char buf[BUFSIZE];
User *u = finduser(nick);
if (!u)
@@ -1088,13 +1090,30 @@ static void bot_raw_ban(User * requester, ChannelInfo * ci, char *nick,
}
}
- av[0] = ci->name;
- av[1] = sstrdup("+b");
get_idealban(ci, u, mask, sizeof(mask));
- av[2] = mask;
- anope_cmd_mode(ci->bi->nick, av[0], "+b %s", av[2]);
- do_cmode(ci->bi->nick, 3, av);
- free(av[1]);
+
+ if (ircdcap->tsmode) {
+ snprintf(buf, BUFSIZE - 1, "%ld", (long int) time(NULL));
+ av[0] = ci->name;
+ av[1] = buf;
+ av[2] = sstrdup("+b");
+ av[3] = mask;
+ ac = 4;
+ } else {
+ av[0] = ci->name;
+ av[1] = sstrdup("+b");
+ av[2] = mask;
+ ac = 3;
+ }
+
+ anope_cmd_mode(ci->bi->nick, ci->name, "+b %s", mask);
+ do_cmode(ci->bi->nick, ac, av);
+
+ /* We need to free our sstrdup'd "+b" -GD */
+ if (ircdcap->tsmode)
+ free(av[2]);
+ else
+ free(av[1]);
av[0] = ci->name;
av[1] = nick;
diff --git a/version.log b/version.log
index cdde205e2..bcf33aa57 100644
--- a/version.log
+++ b/version.log
@@ -8,10 +8,14 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="6"
-VERSION_BUILD="523"
+VERSION_BUILD="524"
# $Log$
#
+# BUILD : 1.7.6 (524)
+# BUGS :
+# NOTES : bot_raw_ban was not adjusted for TSMODE capable IRCDs yet
+#
# BUILD : 1.7.6 (523)
# BUGS : 267
# NOTES : Internal last topic was not emptied on channel creation when KEEPTOPIC was off