summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--src/core/bs_fantasy_kick.c15
-rw-r--r--src/core/bs_fantasy_kickban.c13
-rw-r--r--version.log6
4 files changed, 22 insertions, 13 deletions
diff --git a/Changes b/Changes
index c496802b6..52d2c67f4 100644
--- a/Changes
+++ b/Changes
@@ -5,6 +5,7 @@ Provided by Anope Dev. <dev@anope.org> - 2006
04/08 F Fixed thread stuff on windows. [#488]
04/08 F Fixed SGLine stuff on inspircd (not supported). [#489]
04/20 F Fixed index of backtrace(). [#499]
+04/29 F Added is_on_chan() check for fantasy kick commands. [#501]
Anope Version 1.7.14
--------------------
diff --git a/src/core/bs_fantasy_kick.c b/src/core/bs_fantasy_kick.c
index 0129c9d1c..e2819d178 100644
--- a/src/core/bs_fantasy_kick.c
+++ b/src/core/bs_fantasy_kick.c
@@ -75,14 +75,17 @@ int do_fantasy(int argc, char **argv)
if (!target && check_access(u, ci, CA_KICKME)) {
bot_raw_kick(u, ci, u->nick, "Requested");
} else if (target && check_access(u, ci, CA_KICK)) {
- u2 = finduser(target);
-
if (!stricmp(target, ci->bi->nick))
bot_raw_kick(u, ci, u->nick, "Oops!");
- else if (u2 && !reason && !is_protected(u2))
- bot_raw_kick(u, ci, target, "Requested");
- else if (u2 && !is_protected(u2))
- bot_raw_kick(u, ci, target, reason);
+ else {
+ u2 = finduser(target);
+ if (u2 && ci->c && is_on_chan(ci->c, u2)) {
+ else if (!reason && !is_protected(u2))
+ bot_raw_kick(u, ci, target, "Requested");
+ else if (!is_protected(u2))
+ bot_raw_kick(u, ci, target, reason);
+ }
+ }
}
}
diff --git a/src/core/bs_fantasy_kickban.c b/src/core/bs_fantasy_kickban.c
index 79b2622b4..37528a331 100644
--- a/src/core/bs_fantasy_kickban.c
+++ b/src/core/bs_fantasy_kickban.c
@@ -79,12 +79,13 @@ int do_fantasy(int argc, char **argv)
if (stricmp(target, ci->bi->nick) == 0) {
bot_raw_ban(u, ci, u->nick, "Oops!");
} else {
- u2 = finduser(target);
-
- if (u2 && !reason && !is_protected(u2))
- bot_raw_ban(u, ci, target, "Requested");
- else if (u2 && !is_protected(u2))
- bot_raw_ban(u, ci, target, reason);
+ u2 = finduser(target);
+ if (u2 && ci->c && is_on_chan(ci->c, u2)) {
+ if (!reason && !is_protected(u2))
+ bot_raw_ban(u, ci, target, "Requested");
+ else if (!is_protected(u2))
+ bot_raw_ban(u, ci, target, reason);
+ }
}
}
}
diff --git a/version.log b/version.log
index 4d04aeae9..d2f8b0292 100644
--- a/version.log
+++ b/version.log
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="14"
VERSION_EXTRA=""
-VERSION_BUILD="1028"
+VERSION_BUILD="1029"
# $Log$
#
+# BUILD : 1.7.14 (1029)
+# BUGS : 501
+# NOTES : several fixes.
+#
# BUILD : 1.7.14 (1028)
# BUGS : 499
# NOTES : fixed index of backtrace(), thx craig