Fix giveownership to how it should be
authorMichael Poole <mdpoole@troilus.org>
Sun, 3 Sep 2006 15:10:58 +0000 (15:10 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sun, 3 Sep 2006 15:10:58 +0000 (15:10 +0000)
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

ChangeLog
src/chanserv.c

index 8e5860dc8f459c26400fa016541915611d46e4b9..e888eedd2228a5e15f50d068d61beb3cc5d4f0c7 100644 (file)
--- 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 <mdpoole@troilus.org>     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 <mdpoole@troilus.org>     patch-24
 
     Summary:
index 42476613736709f9f30a458fdc62a2833badaa27..5efe4127581949bee07a7d0f7c4faa3c52d673f4 100644 (file)
@@ -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;