Author: Kev <klmitch@mit.edu>
authorKevin L. Mitchell <klmitch@mit.edu>
Wed, 22 Mar 2000 00:50:13 +0000 (00:50 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Wed, 22 Mar 2000 00:50:13 +0000 (00:50 +0000)
Log message:

Some bugs I had fixed before releasing my jupe.patch somehow didn't make it
into the repository, so I fixed them.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@44 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/ircd.c
ircd/m_connect.c
ircd/m_jupe.c

index ff9a21d20e4c6c09fe623601e5bdd8f929616316..5aa40508cb04680e8507ff7e819c37fa5bc9f0c0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,12 @@
 #
 # ChangeLog for ircu2.10.11
 #
-# $Id: ChangeLog,v 1.18 2000-03-21 03:48:11 bleep Exp $
+# $Id: ChangeLog,v 1.19 2000-03-22 00:50:12 kev Exp $
 #
 # Insert new changes at beginning of the change list.
 #
 #-----------------------------------------------------------------------------
+* Fix misc. jupe bugs that somehow made it into the tree
 * Escape /names 0 to mean /names --Maniac
 * Don't core when server asks for info --Maniac 
 * Add Kev's jupe patch --Bleep
index aaf74f2ca550e4d35aecb3675ef9907743f310dc..88e13644d2e1313a5115ebb7276369cba2dd5c49 100644 (file)
@@ -28,6 +28,7 @@
 #include "ircd_log.h"
 #include "ircd_signal.h"
 #include "ircd_string.h"
+#include "jupe.h"
 #include "list.h"
 #include "listener.h"
 #include "match.h"
@@ -177,6 +178,7 @@ static time_t try_connections(void)
   time_t next = 0;
   struct ConfClass *cltmp;
   struct ConfItem *cconf, *con_conf = NULL;
+  struct Jupe *ajupe;
   unsigned int con_class = 0;
 
   connecting = FALSE;
@@ -186,6 +188,11 @@ static time_t try_connections(void)
     /* Also when already connecting! (update holdtimes) --SRB */
     if (!(aconf->status & CONF_SERVER) || aconf->port == 0)
       continue;
+
+    /* Also skip juped servers */
+    if ((ajupe = jupe_find(aconf->name)) && JupeIsActive(ajupe))
+      continue;
+
     cltmp = aconf->confClass;
     /*
      * Skip this entry if the use of it is still on hold until
index 81fe44913932295a18e8a90b6f8ba9dbee59d2fe..efcd2e44a2228108c646be0eb3b0c61153f6f2f3 100644 (file)
@@ -311,7 +311,7 @@ int mo_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
    * Check to see if the server is juped; if it is, disallow the connect
    */
   if ((ajupe = jupe_find(aconf->name)) && JupeIsActive(ajupe)) {
-    sendto_one(sptr, "%s NOTICE %s%s :Connect: Server %s is juped: %s",
+    sendto_one(sptr, ":%s NOTICE %s%s :Connect: Server %s is juped: %s",
               me.name, NumNick(sptr), JupeServer(ajupe), JupeReason(ajupe));
     return 0;
   }
index ccb7737adeaa11c876efd59a3958f4f9e6bfa9f8..24cb8787a73b0dfafc873c9f62cf7c8f0e814124 100644 (file)
@@ -137,8 +137,12 @@ int ms_jupe(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       return 0; /* no such server */
 
     if (!IsMe(acptr)) { /* manually propagate, since we don't set it */
-      sendto_one(acptr, "%s " TOK_JUPE " %s %s %s %s :%s", NumServ(sptr),
-                target, server, parv[3], parv[4], reason);
+      if (IsServer(sptr))
+       sendto_one(acptr, "%s " TOK_JUPE " %s %s %s %s :%s", NumServ(sptr),
+                  target, server, parv[3], parv[4], reason);
+      else
+       sendto_one(acptr, "%s%s " TOK_JUPE " %s %s %s %s :%s", NumNick(sptr),
+                  target, server, parv[3], parv[4], reason);
 
       return 0;
     }
@@ -226,12 +230,15 @@ int mo_jupe(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       }
 
       sendto_one(acptr, "%s%s " TOK_JUPE " %s %c%s %s " TIME_T_FMT " :%s",
-                NumNick(sptr), NumServ(acptr), server, active ? '+' : '-',
+                NumNick(sptr), NumServ(acptr), active ? '+' : '-', server,
                 parv[3], TStime(), reason);
       return 0;
     }
 
     local = 1;
+  } else if (!IsOper(sptr)) {
+    sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
+    return 0;
   }
 
   expire_off = atoi(parv[3]);