From: Kevin L. Mitchell Date: Wed, 22 Mar 2000 00:50:13 +0000 (+0000) Subject: Author: Kev X-Git-Url: http://git.pk910.de/?a=commitdiff_plain;h=f207cb87cc0b426c8c1ab878ddaadc1aaed899db;p=ircu2.10.12-pk.git Author: Kev 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 --- diff --git a/ChangeLog b/ChangeLog index ff9a21d..5aa4050 100644 --- 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 diff --git a/ircd/ircd.c b/ircd/ircd.c index aaf74f2..88e1364 100644 --- a/ircd/ircd.c +++ b/ircd/ircd.c @@ -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 diff --git a/ircd/m_connect.c b/ircd/m_connect.c index 81fe449..efcd2e4 100644 --- a/ircd/m_connect.c +++ b/ircd/m_connect.c @@ -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; } diff --git a/ircd/m_jupe.c b/ircd/m_jupe.c index ccb7737..24cb878 100644 --- a/ircd/m_jupe.c +++ b/ircd/m_jupe.c @@ -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]);