diff -uNrd ircd-hybrid-6.3.dist/include/config.h ircd-hybrid-6.3/include/config.h
--- ircd-hybrid-6.3.dist/include/config.h	Thu Mar 14 19:17:01 2002
+++ ircd-hybrid-6.3/include/config.h	Thu Mar 14 19:33:36 2002
@@ -191,6 +191,12 @@
  */
 #define  TS5_ONLY
 
+/* DEFAULT_MAXTKTIME - Use this to set the default maximum TKLINE time
+ * in minutes.  This option can be changed at runtime using /quote SET
+ * MAXTKTIME minutes
+ */
+#define DEFAULT_MAXTKTIME (60*24)
+
 /* SLAVE_SERVERS - Use this to send LOCOPS and KLINES to servers you define
  * uses U: lines in ircd.conf, each server defined in an U: line
  * is sent a copy of the locally placed K-line, and will also
diff -uNrd ircd-hybrid-6.3.dist/include/config.h.dist ircd-hybrid-6.3/include/config.h.dist
--- ircd-hybrid-6.3.dist/include/config.h.dist	Thu Mar 14 19:17:01 2002
+++ ircd-hybrid-6.3/include/config.h.dist	Thu Mar 14 19:34:33 2002
@@ -191,6 +191,12 @@
  */
 #define  TS5_ONLY
 
+/* DEFAULT_MAXTKTIME - Use this to set the default maximum TKLINE time
+ * in minutes.  This option can be changed at runtime using /quote SET
+ * MAXTKTIME minutes
+ */
+#define DEFAULT_MAXTKTIME (60*24)
+
 /* SLAVE_SERVERS - Use this to send LOCOPS and KLINES to servers you define
  * uses U: lines in ircd.conf, each server defined in an U: line
  * is sent a copy of the locally placed K-line, and will also
diff -uNrd ircd-hybrid-6.3.dist/include/ircd.h ircd-hybrid-6.3/include/ircd.h
--- ircd-hybrid-6.3.dist/include/ircd.h	Thu Mar 14 19:17:02 2002
+++ ircd-hybrid-6.3/include/ircd.h	Thu Mar 14 19:24:10 2002
@@ -41,6 +41,8 @@
   int noisy_htm;        /* noisy htm or not ? */
   int lifesux;
 
+  int maxtktime;        /* maximum TKLINE time */
+
 #ifdef IDLE_CHECK
   int idletime;
 #endif
@@ -107,7 +109,7 @@
 #define SPLITDELAY GlobalSetOptions.server_split_recovery_time
 #define SPLITNUM   GlobalSetOptions.split_smallnet_size
 #define SPLITUSERS GlobalSetOptions.split_smallnet_users
-
+#define MAXTKTIME  GlobalSetOptions.maxtktime
 
 extern char*          debugmode;
 extern int            debuglevel;
diff -uNrd ircd-hybrid-6.3.dist/opers.txt ircd-hybrid-6.3/opers.txt
--- ircd-hybrid-6.3.dist/opers.txt	Thu Mar 14 19:17:02 2002
+++ ircd-hybrid-6.3/opers.txt	Thu Mar 14 19:45:00 2002
@@ -228,6 +228,8 @@
                     MAX       - Sets the number of max connections
                                 to <value>.  (This number cannot exceed
                                 HARD_FDLIMIT in config.h)
+                    MAXTKTIME - Sets the maximum time permissible in a
+                                temporary K-line in minutes.
 
                     -- The following three are if compiled with FLUD --
                      FLUDNUM   - Sets the number of flud messages to 
diff -uNrd ircd-hybrid-6.3.dist/src/ircd.c ircd-hybrid-6.3/src/ircd.c
--- ircd-hybrid-6.3.dist/src/ircd.c	Thu Mar 14 19:17:00 2002
+++ ircd-hybrid-6.3/src/ircd.c	Thu Mar 14 19:30:13 2002
@@ -594,6 +594,8 @@
  server_split_time = CurrentTime;
 #endif
 
+ MAXTKTIME = DEFAULT_MAXTKTIME;
+
  /* End of global set options */
 
 }
diff -uNrd ircd-hybrid-6.3.dist/src/m_kline.c ircd-hybrid-6.3/src/m_kline.c
--- ircd-hybrid-6.3.dist/src/m_kline.c	Thu Mar 14 19:17:00 2002
+++ ircd-hybrid-6.3/src/m_kline.c	Thu Mar 14 19:24:58 2002
@@ -503,8 +503,8 @@
                         me.name, parv[0], "KLINE");
           return 0;
         }
-      if(temporary_kline_time > (24*60))
-        temporary_kline_time = (24*60); /* Max it at 24 hours */
+      if(temporary_kline_time > MAXTKTIME)
+        temporary_kline_time = MAXTKTIME; /* Max it at 24 hours */
       temporary_kline_time_seconds = (time_t)temporary_kline_time * (time_t)60;
         /* turn it into minutes */
       argv = parv[2];
diff -uNrd ircd-hybrid-6.3.dist/src/m_set.c ircd-hybrid-6.3/src/m_set.c
--- ircd-hybrid-6.3.dist/src/m_set.c	Thu Mar 14 19:17:01 2002
+++ ircd-hybrid-6.3/src/m_set.c	Thu Mar 14 19:29:17 2002
@@ -132,7 +132,8 @@
 #define TOKEN_SPAMNUM 11
 #define TOKEN_SPAMTIME 12
 #define TOKEN_LOG 13
-#define TOKEN_BAD 14
+#define TOKEN_MAXTKTIME 14
+#define TOKEN_BAD 15
 
 static char *set_token_table[] = {
   "MAX",
@@ -149,6 +150,7 @@
   "SPAMNUM",
   "SPAMTIME",
   "LOG",
+  "MAXTKTIME",
   NULL
 };
 
@@ -579,6 +581,29 @@
           return 0;
           break;
 
+        case TOKEN_MAXTKTIME:
+          if(parc > 2)
+            {
+              int newval = atoi(parv[2]);
+
+              if(newval <= 0)
+                {
+                  sendto_one(sptr, ":%s NOTICE %s :MAXTKTIME must be > 0",
+                             me.name, parv[0]);
+                  return 0;
+                }
+              MAXTKTIME = newval;
+              sendto_realops("%s has changed MAXTKTIME to %i",
+                             parv[0], MAXTKTIME);
+            }
+          else
+            {
+              sendto_one(sptr, ":%s NOTICE %s :MAXTKTIME is currently %i",
+                         me.name, parv[0], MAXTKTIME);
+            }
+          return 0;
+          break;
+
         default:
         case TOKEN_BAD:
           break;
@@ -606,6 +631,8 @@
   sendto_one(sptr, ":%s NOTICE %s :Options: IDLETIME",
              me.name, parv[0]);
 #endif
+  sendto_one(sptr, ":%s NOTICE %s :Options: MAXTKTIME",
+             me.name, parv[0]);
   sendto_one(sptr, ":%s NOTICE %s :Options: LOG",
              me.name, parv[0]);
   return 0;
