diff options
author | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-02-28 17:38:33 +0000 |
---|---|---|
committer | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-02-28 17:38:33 +0000 |
commit | 910a99d28482b7953ac87a18fab5085f50231b3c (patch) | |
tree | 8583e33f9a37005b66b400ce27df969078fb05cc | |
parent | 2656ad9f63232b5a07eab88a7e049988437485ee (diff) |
Applied ThaPrinces fantasy patch for protected umodes.
git-svn-id: svn://svn.anope.org/anope/trunk@973 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@698 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | Changes | 7 | ||||
-rw-r--r-- | src/core/bs_fantasy_kick.c | 8 | ||||
-rw-r--r-- | src/core/bs_fantasy_kickban.c | 8 |
3 files changed, 14 insertions, 9 deletions
@@ -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); } } |