summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorcertus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-04-29 09:29:34 +0000
committercertus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-04-29 09:29:34 +0000
commitadce568fc27394139fd4ce011a6c4aaaa2643fd4 (patch)
tree0706f0e87a4e88e329b7c1524ca4b92ad2fd40bd /src/core
parentb4de451c191efbbed43213679ed247e66b052680 (diff)
# BUILD : 1.7.14 (1029) # BUGS : 501 # NOTES : several fixes.
git-svn-id: svn://svn.anope.org/anope/trunk@1029 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@753 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core')
-rw-r--r--src/core/bs_fantasy_kick.c15
-rw-r--r--src/core/bs_fantasy_kickban.c13
2 files changed, 16 insertions, 12 deletions
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);
+ }
}
}
}