summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes7
-rw-r--r--src/core/bs_fantasy_kick.c8
-rw-r--r--src/core/bs_fantasy_kickban.c8
3 files changed, 14 insertions, 9 deletions
diff --git a/Changes b/Changes
index 7da224c26..8f94b8394 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,6 @@
Anope Version S V N
--------------------
-Provided by Anope Dev. <dev@anope.org> - 2005
+Provided by Anope Dev. <dev@anope.org> - 2006
02/04 A Events for channel kicks and NickServ logout. [ #00]
02/13 F Yet anotehr 64bit issue. [ #00]
01/14 F SGLines will now be removed correctly. [ #00]
@@ -9,7 +9,7 @@ Provided by Anope Dev. <dev@anope.org> - 2005
02/17 F cs_getpass will now unload if encryption is enaled. [ #00]
02/19 F Fixed position of EVENT_ACCESS_DEL. [ #00]
-Provided by nenolod. <nenolod@nenolod.net> - 2005
+Provided by nenolod. <nenolod@nenolod.net> - 2006
02/03 A Support for Charybdis IRCd. [ #00]
02/12 F more va_list issues for 64bit platforms. [ #00]
01/15 F va_arg issue on various 64bit platforms. [#415]
@@ -22,7 +22,8 @@ Provided by Trystan <trystan@nomadirc.net> - 2006
02/12 F Double unbanning of in certain conditions. [ #00]
01/25 F va_copy issue for various platforms. [ #00]
-
+Provided by ThaPrince <jon@vile.com> - 2006
+02/28 F fantasy kick now honours protected, just like cs versions. [ #00]
Anope Version 1.7.13
--------------------
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);
}
}