From: Michael Poole Date: Sun, 3 Sep 2006 15:10:58 +0000 (+0000) Subject: Fix giveownership to how it should be X-Git-Tag: v1.4.0-rc1~131 X-Git-Url: http://git.pk910.de/?p=srvx.git;a=commitdiff_plain;h=e4d759e2f82cdd695958a42a3004e4d5d0df0cb5 Fix giveownership to how it should be src/chanserv.c (cmd_giveownership): Only require confirmation code if the user has real (normal) access and is not forcing the giveownership. git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-25 --- diff --git a/ChangeLog b/ChangeLog index 8e5860d..e888eed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,20 @@ # arch-tag: automatic-ChangeLog--srvx@srvx.net--2006/srvx--devo--1.3 # +2006-09-03 15:10:58 GMT Michael Poole patch-25 + + Summary: + Fix giveownership to how it should be + Revision: + srvx--devo--1.3--patch-25 + + src/chanserv.c (cmd_giveownership): Only require confirmation code if the + user has real (normal) access and is not forcing the giveownership. + + modified files: + ChangeLog src/chanserv.c + + 2006-08-19 13:31:08 GMT Michael Poole patch-24 Summary: diff --git a/src/chanserv.c b/src/chanserv.c index 4247661..5efe412 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -5526,7 +5526,7 @@ static CHANSERV_FUNC(cmd_giveownership) } curr_user = owner; } - else if (!force && (now < (time_t)(cData->ownerTransfer + chanserv_conf.giveownership_period))) + else if(!force && (now < (time_t)(cData->ownerTransfer + chanserv_conf.giveownership_period))) { char delay[INTERVALLEN]; intervalString(delay, cData->ownerTransfer + chanserv_conf.giveownership_period - now, user->handle_info); @@ -5565,11 +5565,14 @@ static CHANSERV_FUNC(cmd_giveownership) chanserv_show_dnrs(user, cmd, NULL, new_owner_hi->handle); return 0; } - confirm = make_confirmation_string(curr_user); - if(!force && ((argc < 3) || strcmp(argv[2], confirm))) + if(curr_user && !force && curr_user->access <= UL_OWNER) { - reply("CSMSG_CONFIRM_GIVEOWNERSHIP", new_owner_hi->handle, confirm); - return 0; + confirm = make_confirmation_string(curr_user); + if(!force && ((argc < 3) || strcmp(argv[2], confirm))) + { + reply("CSMSG_CONFIRM_GIVEOWNERSHIP", new_owner_hi->handle, confirm); + return 0; + } } if(new_owner->access >= UL_COOWNER) co_access = new_owner->access;