Further giveownership confirmation fixes.
authorMichael Poole <mdpoole@troilus.org>
Sat, 23 Sep 2006 00:52:48 +0000 (00:52 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sat, 23 Sep 2006 00:52:48 +0000 (00:52 +0000)
src/chanserv.c (CSMSG_CONFIRM_GIVEOWNERSHIP): Prepend * to account name.
  (cmd_giveownership): Check invoker access to determine need for confirmation.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-45

ChangeLog
src/chanserv.c

index c212c9836f56e0c8a8bb2e371aa1d417a084b9c1..7d548011fc475300a7db9d1e73e02450372dbf63 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,20 @@
 # arch-tag: automatic-ChangeLog--srvx@srvx.net--2006/srvx--devo--1.3
 #
 
+2006-09-23 00:52:48 GMT        Michael Poole <mdpoole@troilus.org>     patch-45
+
+    Summary:
+      Further giveownership confirmation fixes.
+    Revision:
+      srvx--devo--1.3--patch-45
+
+    src/chanserv.c (CSMSG_CONFIRM_GIVEOWNERSHIP): Prepend * to account name.
+      (cmd_giveownership): Check invoker access to determine need for confirmation.
+
+    modified files:
+     ChangeLog src/chanserv.c
+
+
 2006-09-22 03:33:25 GMT        Michael Poole <mdpoole@troilus.org>     patch-44
 
     Summary:
index e9196a3aa82863f6bc10ba80009911d95dc35fbd..458e75f232b15d95e911377aed6483fa7e22b297 100644 (file)
@@ -197,7 +197,7 @@ static const struct message_entry msgtab[] = {
     { "CSMSG_MULTIPLE_OWNERS", "There is more than one owner in %s; please use $bCLVL$b, $bDELOWNER$b and/or $bADDOWNER$b instead." },
     { "CSMSG_TRANSFER_WAIT", "You must wait %s before you can give ownership of $b%s$b to someone else." },
     { "CSMSG_NO_TRANSFER_SELF", "You cannot give ownership to your own account." },
-    { "CSMSG_CONFIRM_GIVEOWNERSHIP", "To really give ownership to $b%1$s$b, you must use 'giveownership %1$s %2$s'." },
+    { "CSMSG_CONFIRM_GIVEOWNERSHIP", "To really give ownership to $b%1$s$b, you must use 'giveownership *%1$s %2$s'." },
     { "CSMSG_OWNERSHIP_GIVEN", "Ownership of $b%s$b has been transferred to account $b%s$b." },
 
 /* Ban management */
@@ -5497,7 +5497,9 @@ static CHANSERV_FUNC(cmd_uset)
 static CHANSERV_FUNC(cmd_giveownership)
 {
     struct handle_info *new_owner_hi;
-    struct userData *new_owner, *curr_user;
+    struct userData *new_owner;
+    struct userData *curr_user;
+    struct userData *invoker;
     struct chanData *cData = channel->channel_info;
     struct do_not_register *dnr;
     const char *confirm;
@@ -5565,10 +5567,11 @@ static CHANSERV_FUNC(cmd_giveownership)
             chanserv_show_dnrs(user, cmd, NULL, new_owner_hi->handle);
         return 0;
     }
-    if(curr_user && !force && curr_user->access <= UL_OWNER)
+    invoker = GetChannelUser(cData, user->handle_info);
+    if(invoker->access <= UL_OWNER)
     {
         confirm = make_confirmation_string(curr_user);
-        if(!force && ((argc < 3) || strcmp(argv[2], confirm)))
+        if((argc < 3) || strcmp(argv[2], confirm))
         {
             reply("CSMSG_CONFIRM_GIVEOWNERSHIP", new_owner_hi->handle, confirm);
             return 0;