Author: Kev <klmitch@mit.edu>
authorBleep <twhelvey1@home.com>
Tue, 21 Mar 2000 01:05:16 +0000 (01:05 +0000)
committerBleep <twhelvey1@home.com>
Tue, 21 Mar 2000 01:05:16 +0000 (01:05 +0000)
Log message:
This patch is relative to the trunk of the ircu2.10 repository.  Please see
the discussion on coder-com and the bundled doc/readme.jupe for more details
about how it works, or feel free to ask me questions.  Please consider this
patch for inclusion in the next release of ircu.

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

13 files changed:
ChangeLog
config/config-sh.in
doc/Configure.help
doc/p10.html
include/handlers.h
include/msg.h
include/numeric.h
ircd/Makefile.in
ircd/m_connect.c
ircd/m_server.c
ircd/parse.c
ircd/s_err.c
ircd/s_serv.c

index 97a6bf0ff570de8e9c93aa0175bacb2f835e75e6..b9b9993b519b2c4f7aeaada710ba6bcac13f9b50 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,12 @@
 #
 # ChangeLog for ircu2.10.11
 #
-# $Id: ChangeLog,v 1.16 2000-03-21 00:33:29 bleep Exp $
+# $Id: ChangeLog,v 1.17 2000-03-21 01:05:16 bleep Exp $
 #
 # Insert new changes at beginning of the change list.
 #
 #-----------------------------------------------------------------------------
+* Add Kev's jupe patch --Bleep
 * Add Maniacs squit patch --Bleep
 * Merge in u2_10_10_beta07 changes --Bleep
 * Merge in u2_10_10_beta06 changes --Bleep
index 9d27eb6fb2e1e1ff23efdd716d0a755b3a45e7c3..0d3fa8711e8ab34f08a6510da7c308948f59f67a 100644 (file)
@@ -231,6 +231,10 @@ comment 'Bad Channel G-Lines allow operators to add channel masks to a list whic
     if [ "$CONFIG_LOG_GLINES" = "y" ]; then
       string '   Give the path and(or) filename of this log file' GPATH 'gline.log'
     fi
+  bool 'Do you want to log JUPEs to a separate file' CONFIG_LOG_JUPES y
+    if [ "$CONFIG_LOG_JUPES" = "y" ]; then
+      string '   Give the path and(or) filename of this log file' JPATH 'jupe.log'
+    fi
   bool 'Do you want to log connecting users to a separate file' CONFIG_LOG_USERS
     if [ "$CONFIG_LOG_USERS" = "y" ]; then
       string '   Give the path and(or) filename of this log file' FNAME_USERLOG $DPATH/users
index 508e20832743bce28a47f49f55ee2d6069a844ea..12b007abd1e69613ebb24009cd44095ee472afcf 100644 (file)
@@ -530,6 +530,16 @@ GPATH
   log file where the G-lines will be stored, mostly called "gline.log".
   Note that you should not include quotes here.
 
+Do you want to log JUPEs to a separate file
+CONFIG_LOG_JUPES
+  Specify 'y' here if you want to log JUPEs (Jupiters) to a local file.
+
+Give the path and(or) filename of this log file
+JPATH
+  JPATH is the filename, relative to DPATH, or the full path, of the
+  log file where the logs of JUPEs will be stored; it is usually called
+  "jupe.log".  Note that you should not include quotes here.
+
 Do you want to log connecting users to a separate file
 CONFIG_LOG_USERS
   Specify 'y' here if you want to log who is connecting to your server.
index 83eca58c0fddab560a67d58f9c022b5945e33008..9bedbc89d7cc682e5d4385a808c74af4a0c4c0b5 100644 (file)
@@ -531,6 +531,12 @@ by reducing the length of common message identifiers.
 
 <TD><FONT SIZE=-1>PROTO</FONT></TD>
 </TR>
+
+<TR>
+<TD><FONT SIZE=-1>JUPE</FONT></TD>
+
+<TD><FONT SIZE=-1>JU</FONT></TD>
+</TR>
 </TABLE></CENTER>
 <FONT FACE="Arial,Helvetica"><FONT SIZE=-1><B>[</B><A HREF="#top">Back</A><B>]</B></FONT></FONT>
 <BR>
@@ -791,6 +797,43 @@ line would be:</BLOCKQUOTE>
 </BLOCKQUOTE>
 
 <BLOCKQUOTE>Which adds two more opped members and a ban to the channel.</BLOCKQUOTE>
+
+<BLOCKQUOTE><B>3.2.4 - JUPE Messages</B></BLOCKQUOTE>
+
+<BLOCKQUOTE>Any currently unexpired JUPEs are transmitted via "JUPE"
+messages with the following format:</BLOCKQUOTE>
+
+<BLOCKQUOTE>
+<BLOCKQUOTE><TT><FONT COLOR="#00007F">[NUMERIC PREFIX] JU * (+|-)[SERVER NAME]
+[LIFETIME] [LAST MOD] :[REASON]</FONT></TT></BLOCKQUOTE>
+</BLOCKQUOTE>
+<BLOCKQUOTE><I>Notes:</I></BLOCKQUOTE>
+
+<OL>
+<LI>
+The numeric of the server sending this message.</LI>
+
+<LI>
+The "JUPE" token.</LI>
+
+<LI>
+The target that should apply this JUPE (always "*" during bursts).</LI>
+
+<LI>
+The name of the server to JUPE, prefixed with a "+" if the JUPE is active,
+or with a "-" if it is not.</LI>
+
+<LI>
+The remaining absolute lifetime of the JUPE, expressed in seconds.</LI>
+
+<LI>
+The last time the JUPE was modified.</LI>
+
+<LI>
+The reason the JUPE was applied.</LI>
+
+</OL>
+
 <A NAME="chap3.3"></A><B><FONT SIZE=+1>3.3 Summary</FONT></B>
 <P>The following table summarises the sequence of events that occur when
 a server connects to another server. S1 is our server, and S2 is a HUB
@@ -809,11 +852,13 @@ seperately below for simplicity.</I></B>
 <BR>S1: Sends all the clients it is aware of as a stream of NICK messages.
 <BR>S1: Sends the database of channel states on the network, as a stream
 of BURST messages.
+<BR>S1: Sends all the jupes it is aware of as a stream of JUPE messages.
 <BR>S1: Sends a END_OF_BURST token (EB) to indicate it has finished sending.
 <P>S2: Sends all the servers it is aware of as a stream of SERVER messages.
 <BR>S2: Sends all the clients it is aware of as a stream of NICK messages.
 <BR>S2: Sends the database of channel states on the network, as a stream
 of BURST messages.
+<BR>S2: Sends all the jupes it is aware of as a stream of JUPE messages.
 <BR>S2: Sends a END_OF_BURST token (EB) to indicate it has finished sending.
 <P>S2: Sends an EOB_ACK token (EA) to indicate it has succesfully recieved
 the END_OF_BURST from S1
@@ -836,6 +881,7 @@ the END_OF_BURST from S2
 [ READ]: AF B #foobar 947957734 +tink akey AIAAB,AIAAA:v,AZAAA:o :%*!*another@*.ban.com *!*foo@bar.net
 [ READ]: AF B #coder-com 947957727 AIAAB,AZAAA:o
 [ READ]: AF B #another 946101321 AFAAA
+[ READ]: AF JU * +juped.undernet.org 3600 947958100 :Broken, please fix
 [ READ]: AF EB
 [WRITE]: AB EA
 [ READ]: AF EA</FONT></PRE>
@@ -874,6 +920,7 @@ documentation.
 <BR>[26/02/2000]: Continued chapter 5, few example fixes, added token table
 from msg.h. --Gte.
 <BR>[02/03/2000]: Added NICK spec. --Gte.
+<BR>[18/03/2000]: Added JUPE spec. -Kev
 <P><A NAME="chap8.1"></A><B><FONT SIZE=+1>8.1 TODO</FONT></B>
 <UL>
 <LI>
@@ -891,6 +938,9 @@ and outcomes.</LI>
 
 <LI>
 Add FAQ Section.</LI>
+
+<LI>
+Any chance we could switch to ISO dates (2000-3-18)? ;) -Kev.</LI>
 </UL>
 <FONT FACE="Arial,Helvetica"><FONT SIZE=-1><B>[</B><A HREF="#top">Back</A><B>]</B></FONT></FONT>
 </BODY>
index c032b161ec30d0924d2f549494ab8186e5e39d14..5ad4e64ac9a74ea50eb060619d31f3fa6691d18d 100644 (file)
@@ -94,6 +94,7 @@ extern int m_info(struct Client*, struct Client*, int, char*[]);
 extern int m_invite(struct Client*, struct Client*, int, char*[]);
 extern int m_ison(struct Client*, struct Client*, int, char*[]);
 extern int m_join(struct Client*, struct Client*, int, char*[]);
+extern int m_jupe(struct Client*, struct Client*, int, char*[]);
 extern int m_kick(struct Client*, struct Client*, int, char*[]);
 extern int m_links(struct Client*, struct Client*, int, char*[]);
 extern int m_list(struct Client*, struct Client*, int, char*[]);
@@ -136,6 +137,7 @@ extern int mo_connect(struct Client*, struct Client*, int, char*[]);
 extern int mo_die(struct Client*, struct Client*, int, char*[]);
 extern int mo_gline(struct Client*, struct Client*, int, char*[]);
 extern int mo_info(struct Client*, struct Client*, int, char*[]);
+extern int mo_jupe(struct Client*, struct Client*, int, char*[]);
 extern int mo_kill(struct Client*, struct Client*, int, char*[]);
 extern int mo_notice(struct Client*, struct Client*, int, char*[]);
 extern int mo_oper(struct Client*, struct Client*, int, char*[]);
@@ -165,6 +167,7 @@ extern int ms_gline(struct Client*, struct Client*, int, char*[]);
 extern int ms_info(struct Client*, struct Client*, int, char*[]);
 extern int ms_invite(struct Client*, struct Client*, int, char*[]);
 extern int ms_join(struct Client*, struct Client*, int, char*[]);
+extern int ms_jupe(struct Client*, struct Client*, int, char*[]);
 extern int ms_kick(struct Client*, struct Client*, int, char*[]);
 extern int ms_kill(struct Client*, struct Client*, int, char*[]);
 extern int ms_links(struct Client*, struct Client*, int, char*[]);
index da70d4236f3ac18ff0ee5ceeedc787bee790c0e2..f33a0f7d8156857037957c81484c213039ed65bc 100644 (file)
@@ -241,6 +241,9 @@ struct Client;
 #define MSG_PROTO               "PROTO"         /* PROTO */
 #define TOK_PROTO               "PROTO"         /* PROTO */
 
+#define MSG_JUPE                "JUPE"          /* JUPE */
+#define TOK_JUPE                "JU"
+
 
 /*
  * Constants
index a908f0838c4713a07714d6d3c18839ceeab1a7f4..21c54c936a2da8027fe87cb070b59d95b6d006dc 100644 (file)
@@ -104,7 +104,7 @@ extern const struct Numeric* get_error_numeric(int err);
 /*      RPL_STATSSLINE       245           Reserved */
 #define RPL_STATSTLINE       246        /* Undernet extension */
 #define RPL_STATSGLINE       247        /* Undernet extension */
-/*      RPL_STATSXLINE       247           hybrid extension */                                        
+/*      RPL_STATSXLINE       247           hybrid extension */
 #define RPL_STATSULINE       248        /* Undernet extension */
 #define RPL_STATSDEBUG       249        /* Extension to RFC1459 */
 #define RPL_STATSCONN        250        /* Undernet extension */
@@ -139,6 +139,8 @@ extern const struct Numeric* get_error_numeric(int err);
 
 #define RPL_GLIST            280        /* Undernet extension */
 #define RPL_ENDOFGLIST       281        /* Undernet extension */
+#define RPL_JUPELIST         282        /* Undernet extension - jupe -Kev */
+#define RPL_ENDOFJUPELIST    283        /* Undernet extension - jupe -Kev */
 
 /*      RPL_CHANINFO_HANDLE  285           aircd */
 /*      RPL_CHANINFO_USERS   286           aircd */
@@ -338,6 +340,8 @@ extern const struct Numeric* get_error_numeric(int err);
 /*      ERR_NOTIFYFULL       512           aircd */
 #define ERR_NOSUCHGLINE      512        /* Undernet extension */
 #define ERR_BADPING          513        /* Undernet extension */
-#define ERR_INVALID_ERROR    514
+#define ERR_NOSUCHJUPE       514        /* Undernet extension - jupe -Kev */
+#define ERR_BADEXPIRE        515        /* Undernet extension - jupe -Kev */
+#define ERR_INVALID_ERROR    516
 
 #endif /* INCLUDED_numeric_h */
index 838a0a6726f3a4c4c223a317584895088f3b4226..26016cb6765c25713a05204172ffa915493303f3 100644 (file)
@@ -78,6 +78,7 @@ SRC = \
        ircd_signal.c \
        ircd_string.c \
        ircd_xopen.c \
+       jupe.c \
        list.c \
        listener.c \
        m_admin.c \
@@ -99,6 +100,7 @@ SRC = \
        m_invite.c \
        m_ison.c \
        m_join.c \
+       m_jupe.c \
        m_kick.c \
        m_kill.c \
        m_links.c \
@@ -360,15 +362,23 @@ ircd_string.o: ircd_string.c ../include/ircd_string.h \
  ../config/config.h ../config/setup.h ../include/ircd_chattr.h \
  ../include/ircd_defs.h chattr.tab.c
 ircd_xopen.o: ircd_xopen.c ../include/ircd_xopen.h
+jupe.o: jupe.c ../include/jupe.h ../config/config.h ../config/setup.h \
+ ../include/client.h ../include/dbuf.h ../include/ircd_defs.h \
+ ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \
+ ../include/struct.h ../include/ircd_alloc.h ../include/fda.h \
+ ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \
+ ../include/msg.h ../include/numeric.h ../include/numnicks.h \
+ ../include/s_bsd.h ../include/s_misc.h ../include/send.h \
+ ../include/support.h ../include/sys.h
 list.o: list.c ../include/list.h ../include/class.h \
  ../include/client.h ../include/dbuf.h ../include/ircd_defs.h \
  ../include/ircd_handler.h ../include/ircd.h ../config/config.h \
  ../config/setup.h ../include/struct.h ../include/ircd_alloc.h \
  ../include/fda.h ../include/ircd_string.h ../include/ircd_chattr.h \
- ../include/match.h ../include/numeric.h ../include/res.h \
- ../include/s_bsd.h ../include/s_conf.h ../include/s_debug.h \
- ../include/s_misc.h ../include/s_user.h ../include/send.h \
- ../include/support.h ../include/whowas.h
+ ../include/listener.h ../include/match.h ../include/numeric.h \
+ ../include/res.h ../include/s_bsd.h ../include/s_conf.h \
+ ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \
+ ../include/send.h ../include/support.h ../include/whowas.h
 listener.o: listener.c ../include/listener.h ../include/ircd_defs.h \
  ../include/client.h ../include/dbuf.h ../include/ircd_handler.h \
  ../include/ircd.h ../config/config.h ../config/setup.h \
@@ -405,9 +415,10 @@ m_connect.o: m_connect.c ../include/client.h ../include/dbuf.h \
  ../include/hash.h ../include/ircd.h ../config/config.h \
  ../config/setup.h ../include/struct.h ../include/ircd_log.h \
  ../include/ircd_reply.h ../include/ircd_string.h \
- ../include/ircd_chattr.h ../include/match.h ../include/msg.h \
- ../include/numeric.h ../include/numnicks.h ../include/s_bsd.h \
- ../include/s_conf.h ../include/s_user.h ../include/send.h
+ ../include/ircd_chattr.h ../include/jupe.h ../include/match.h \
+ ../include/msg.h ../include/numeric.h ../include/numnicks.h \
+ ../include/s_bsd.h ../include/s_conf.h ../include/s_user.h \
+ ../include/send.h
 m_cprivmsg.o: m_cprivmsg.c ../include/client.h ../include/dbuf.h \
  ../include/ircd_defs.h ../include/ircd_handler.h \
  ../include/ircd_reply.h ../include/ircd_string.h ../config/config.h \
@@ -496,6 +507,14 @@ m_join.o: m_join.c ../include/channel.h ../config/config.h \
  ../include/ircd_string.h ../include/msg.h ../include/numeric.h \
  ../include/numnicks.h ../include/s_user.h ../include/send.h \
  ../include/handlers.h
+m_jupe.o: m_jupe.c ../include/client.h ../include/dbuf.h \
+ ../include/ircd_defs.h ../include/ircd_handler.h ../include/jupe.h \
+ ../config/config.h ../config/setup.h ../include/hash.h \
+ ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \
+ ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \
+ ../include/msg.h ../include/numeric.h ../include/numnicks.h \
+ ../include/s_conf.h ../include/s_misc.h ../include/send.h \
+ ../include/support.h
 m_kick.o: m_kick.c ../include/channel.h ../config/config.h \
  ../config/setup.h ../include/ircd_defs.h ../include/client.h \
  ../include/dbuf.h ../include/ircd_handler.h ../include/hash.h \
@@ -647,8 +666,9 @@ m_rpong.o: m_rpong.c ../include/client.h ../include/dbuf.h \
 m_server.o: m_server.c ../include/client.h ../include/dbuf.h \
  ../include/ircd_defs.h ../include/ircd_handler.h ../include/crule.h \
  ../include/hash.h ../include/ircd.h ../config/config.h \
- ../config/setup.h ../include/struct.h ../include/ircd_reply.h \
- ../include/ircd_string.h ../include/ircd_chattr.h ../include/list.h \
+ ../config/setup.h ../include/struct.h ../include/ircd_log.h \
+ ../include/ircd_reply.h ../include/ircd_string.h \
+ ../include/ircd_chattr.h ../include/jupe.h ../include/list.h \
  ../include/match.h ../include/msg.h ../include/numeric.h \
  ../include/numnicks.h ../include/querycmds.h ../include/s_bsd.h \
  ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \
@@ -819,9 +839,9 @@ s_auth.o: s_auth.c ../include/s_auth.h ../config/config.h \
  ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \
  ../include/fda.h ../include/ircd_chattr.h ../include/ircd_log.h \
  ../include/ircd_osdep.h ../include/ircd_string.h ../include/list.h \
- ../include/numeric.h ../include/res.h ../include/s_bsd.h \
- ../include/s_debug.h ../include/s_misc.h ../include/send.h \
- ../include/sprintf_irc.h ../include/sys.h
+ ../include/numeric.h ../include/querycmds.h ../include/res.h \
+ ../include/s_bsd.h ../include/s_debug.h ../include/s_misc.h \
+ ../include/send.h ../include/sprintf_irc.h ../include/sys.h
 s_bsd.o: s_bsd.c ../include/s_bsd.h ../config/config.h \
  ../config/setup.h ../include/client.h ../include/dbuf.h \
  ../include/ircd_defs.h ../include/ircd_handler.h ../include/IPcheck.h \
@@ -883,12 +903,13 @@ s_serv.o: s_serv.c ../include/s_serv.h ../include/IPcheck.h \
  ../include/ircd_handler.h ../include/crule.h ../include/hash.h \
  ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \
  ../include/fda.h ../include/ircd_reply.h ../include/ircd_string.h \
- ../include/ircd_chattr.h ../include/ircd_xopen.h ../include/list.h \
- ../include/msg.h ../include/match.h ../include/numeric.h \
- ../include/numnicks.h ../include/parse.h ../include/querycmds.h \
- ../include/s_bsd.h ../include/s_conf.h ../include/s_debug.h \
- ../include/s_misc.h ../include/s_user.h ../include/send.h \
- ../include/sprintf_irc.h ../include/sys.h ../include/userload.h
+ ../include/ircd_chattr.h ../include/ircd_xopen.h ../include/jupe.h \
+ ../include/list.h ../include/msg.h ../include/match.h \
+ ../include/numeric.h ../include/numnicks.h ../include/parse.h \
+ ../include/querycmds.h ../include/s_bsd.h ../include/s_conf.h \
+ ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \
+ ../include/send.h ../include/sprintf_irc.h ../include/sys.h \
+ ../include/userload.h
 s_user.o: s_user.c ../include/s_user.h ../include/IPcheck.h \
  ../include/channel.h ../config/config.h ../config/setup.h \
  ../include/ircd_defs.h ../include/class.h ../include/client.h \
index 5c317e38a5919407dabed0a81372b8218775c1f7..81fe44913932295a18e8a90b6f8ba9dbee59d2fe 100644 (file)
@@ -94,6 +94,7 @@
 #include "ircd_log.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
+#include "jupe.h"
 #include "match.h"
 #include "msg.h"
 #include "numeric.h"
@@ -122,7 +123,8 @@ int ms_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   const char*      crule_name;
   struct ConfItem* aconf;
   struct Client*   acptr;
-  
+  struct Jupe*     ajupe;
+
   assert(0 != cptr);
   assert(0 != sptr);
 
@@ -172,6 +174,15 @@ int ms_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
                NumServ(&me), NumNick(sptr), crule_name);
     return 0;
   }
+  /*
+   * 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",
+              NumServ(&me), NumNick(sptr), JupeServer(ajupe),
+              JupeReason(ajupe));
+    return 0;
+  }
   /*
    * Get port number from params, port must be non-zero if it comes from a
    * server.
@@ -222,6 +233,7 @@ int mo_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   const char*      crule_name;
   struct ConfItem* aconf;
   struct Client*   acptr;
+  struct Jupe*     ajupe;
 
   assert(0 != cptr);
   assert(cptr == sptr);
@@ -295,6 +307,14 @@ int mo_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
                me.name, parv[0], crule_name);
     return 0;
   }
+  /*
+   * 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",
+              me.name, NumNick(sptr), JupeServer(ajupe), JupeReason(ajupe));
+    return 0;
+  }
   /*
    *  Get port number from user, if given. If not specified,
    *  use the default from configuration structure. If missing
@@ -349,6 +369,7 @@ int m_connect(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
   struct ConfItem* aconf;
   struct ConfItem* cconf;
   struct Client*   acptr;
+  struct Jupe*     ajupe;
 
   if (!IsPrivileged(sptr)) {
     sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
@@ -466,6 +487,15 @@ int m_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",
+              NumServ(&me), NumNick(sptr), JupeServer(ajupe),
+              JupeReason(ajupe));
+    return 0;
+  }
 
   /*
    * Notify all operators about remote connect requests
index baaaf582629b12d664e97ed728389d152bf40907..3b20d0f33e42cdc448cfbeca7cf9091f1b29b6bb 100644 (file)
@@ -94,6 +94,7 @@
 #include "ircd_log.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
+#include "jupe.h"
 #include "list.h"
 #include "match.h"
 #include "msg.h"
@@ -139,6 +140,7 @@ int mr_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   struct ConfItem* aconf = 0;
   struct ConfItem* cconf;
   struct ConfItem* lhconf = 0;
+  struct Jupe*     ajupe = 0;
   int              hop;
   int              ret;
   int              active_lh_line = 0;
@@ -166,8 +168,13 @@ int mr_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     return need_more_params(sptr, "SERVER");
     return exit_client(cptr, cptr, &me, "Need more parameters");
   }
-  ircd_log(L_NOTICE, "SERVER: %s %s[%s]", parv[1], cptr->sockhost, cptr->sock_ip);
   host = parv[1];
+
+  if ((ajupe = jupe_find(host)) && JupeIsActive(ajupe))
+    return exit_client_msg(cptr, sptr, &me, "Juped: %s", JupeReason(ajupe));
+
+  ircd_log(L_NOTICE, "SERVER: %s %s[%s]", parv[1], cptr->sockhost, cptr->sock_ip);
+
   /*
    * Detect protocol
    */
@@ -798,6 +805,7 @@ int ms_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   struct ConfItem* aconf = 0;
   struct ConfItem* cconf;
   struct ConfItem* lhconf = 0;
+  struct Jupe*     ajupe = 0;
   int              hop;
   int              ret;
   int              active_lh_line = 0;
@@ -825,6 +833,10 @@ int ms_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     return exit_client(cptr, cptr, &me, "Need more parameters");
   }
   host = parv[1];
+
+  if ((ajupe = jupe_find(host)) && JupeIsActive(ajupe))
+    jupe_resend(cptr, ajupe);
+
   /*
    * Detect protocol
    */
@@ -1460,6 +1472,7 @@ int m_server(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
   struct ConfItem* aconf = 0;
   struct ConfItem* cconf;
   struct ConfItem* lhconf = 0;
+  struct Jupe*     ajupe = 0;
   int              hop;
   int              ret;
   int              active_lh_line = 0;
index 82c0c3af4f2278032ed6385549cb1a4e3cee77e6..a11ecb8085a889ceceabbb89af5499153ab957df 100644 (file)
@@ -439,6 +439,13 @@ struct Message msgtab[] = {
     /* UNREG, CLIENT, SERVER, OPER, SERVICE */
     { m_unregistered, m_not_oper, ms_gline, mo_gline, m_ignore }
   },
+  {
+    MSG_JUPE,
+    TOK_JUPE,
+    0, MAXPARA, MFLG_SLOW, 0,
+    /* UNREG, CLIENT, SERVER, OPER, SERVICE */
+    { m_unregistered, m_jupe, ms_jupe, mo_jupe, m_ignore }
+  },
   {
     MSG_END_OF_BURST,
     TOK_END_OF_BURST,
index a9ba4cd7a5495098ff7f7526b57ff01e1d647395..47c390fa8957677fb10770bb9b5e913fe4d52aeb 100644 (file)
@@ -296,7 +296,11 @@ static Numeric numeric_errors[] = {
 /* 512 */
   { ERR_NOSUCHGLINE, "%s@%s :No such gline", "512" },
 /* 513 */
-  { ERR_BADPING, "", "513" }
+  { ERR_BADPING, "", "513" },
+/* 514 */
+  { ERR_NOSUCHJUPE, "%s :No such jupe", "514" },
+/* 515 */
+  { ERR_BADEXPIRE, TIME_T_FMT " :Bad expire time", "515" }
 };
 
 static Numeric numeric_replies[] = {
@@ -672,8 +676,10 @@ static Numeric numeric_replies[] = {
   { RPL_GLIST, "%s@%s " TIME_T_FMT " %s%s", "280" },
 /* 281 */
   { RPL_ENDOFGLIST, ":End of G-line List", "281" },
+/* 282 */
+  { RPL_JUPELIST, "%s " TIME_T_FMT " %s %c :%s", "282" },
 /* 283 */
-  { 0 },
+  { RPL_ENDOFJUPELIST, ":End of Jupe List", "283" },
 /* 284 */
   { 0 }
 };
index f9304801324a9355f8d4d9fea1e5190c68172d2f..b5ebc3ef352e1c770b315f1273a5efb871f446fa 100644 (file)
@@ -33,6 +33,7 @@
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "ircd_xopen.h"
+#include "jupe.h"
 #include "list.h"
 #include "msg.h"
 #include "match.h"
@@ -265,6 +266,7 @@ int server_estab(struct Client *cptr, struct ConfItem *aconf)
     for (chptr = GlobalChannelList; chptr; chptr = chptr->next)
       send_channel_modes(cptr, chptr);
   }
+  jupe_burst(cptr);
   sendto_one(cptr, "%s EB", NumServ(&me));
   return 0;
 }