summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/bs_fantasy_kick.c8
-rw-r--r--src/core/bs_fantasy_kickban.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/src/core/bs_fantasy_kick.c b/src/core/bs_fantasy_kick.c
index a3eca5eaf..0129c9d1c 100644
--- a/src/core/bs_fantasy_kick.c
+++ b/src/core/bs_fantasy_kick.c
@@ -54,7 +54,7 @@ void AnopeFini(void)
**/
int do_fantasy(int argc, char **argv)
{
- User *u;
+ User *u, *u2;
ChannelInfo *ci;
char *target = NULL;
char *reason = NULL;
@@ -75,11 +75,13 @@ 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 (!reason)
+ else if (u2 && !reason && !is_protected(u2))
bot_raw_kick(u, ci, target, "Requested");
- else
+ else if (u2 && !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 517a461b6..79b2622b4 100644
--- a/src/core/bs_fantasy_kickban.c
+++ b/src/core/bs_fantasy_kickban.c
@@ -54,7 +54,7 @@ void AnopeFini(void)
**/
int do_fantasy(int argc, char **argv)
{
- User *u;
+ User *u, *u2;
ChannelInfo *ci;
char *target = NULL;
char *reason = NULL;
@@ -79,9 +79,11 @@ int do_fantasy(int argc, char **argv)
if (stricmp(target, ci->bi->nick) == 0) {
bot_raw_ban(u, ci, u->nick, "Oops!");
} else {
- if (!reason)
+ u2 = finduser(target);
+
+ if (u2 && !reason && !is_protected(u2))
bot_raw_ban(u, ci, target, "Requested");
- else
+ else if (u2 && !is_protected(u2))
bot_raw_ban(u, ci, target, reason);
}
}