Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2004-05-15 18:39:44 UTC
Modified files:
ChangeLog ircd/channel.c ircd/m_list.c ircd/m_whois.c
Log message:
Forward port 2.10.11 /whois CPU limiter.
Fix typos in previous commits.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.410 ircu2.10/ChangeLog:1.411
--- ircu2.10/ChangeLog:1.410 Sat May 15 10:37:21 2004
+++ ircu2.10/ChangeLog Sat May 15 11:39:34 2004
@@ -1,3 +1,10 @@
+2004-05-15 beware <[EMAIL PROTECTED]>
+
+ [Original ChangeLog date: 2003-10-25 -MDP]
+
+ * ircd/m_whois.c: Fixed /whois comma separated list with wildcards
+ cpu hog bug
+
2004-05-15 Michael Poole <[EMAIL PROTECTED]>
* ircd/s_conf.c (rehash): Call clear_quarantines on rehash since
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.90 ircu2.10/ircd/channel.c:1.91
--- ircu2.10/ircd/channel.c:1.90 Sat May 15 09:58:11 2004
+++ ircu2.10/ircd/channel.c Sat May 15 11:39:34 2004
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: channel.c,v 1.90 2004/05/15 16:58:11 entrope Exp $
+ * $Id: channel.c,v 1.91 2004/05/15 18:39:34 entrope Exp $
*/
#include "config.h"
@@ -1347,7 +1347,7 @@
if (!cli_user(cptr))
continue;
if (!(HasPriv(cptr, PRIV_LIST_CHAN) && IsAnOper(cptr)) &&
- SecretChannel(chptr) && !find_channel_member(cptr, chptr)))
+ SecretChannel(chptr) && !find_channel_member(cptr, chptr))
continue;
if (chptr->users > args->min_users && chptr->users < args->max_users &&
chptr->creationtime > args->min_time &&
Index: ircu2.10/ircd/m_list.c
diff -u ircu2.10/ircd/m_list.c:1.10 ircu2.10/ircd/m_list.c:1.11
--- ircu2.10/ircd/m_list.c:1.10 Sat May 15 09:58:11 2004
+++ ircu2.10/ircd/m_list.c Sat May 15 11:39:34 2004
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_list.c,v 1.10 2004/05/15 16:58:11 entrope Exp $
+ * $Id: m_list.c,v 1.11 2004/05/15 18:39:34 entrope Exp $
*/
/*
@@ -244,7 +244,7 @@
args->flags |= LISTARG_SHOWSECRET;
param++;
- if (*param != ',' && *param != ' ' && *param !+ '\0') /* check syntax */
+ if (*param != ',' && *param != ' ' && *param != '\0') /* check syntax */
return show_usage(sptr);
break;
Index: ircu2.10/ircd/m_whois.c
diff -u ircu2.10/ircd/m_whois.c:1.29 ircu2.10/ircd/m_whois.c:1.30
--- ircu2.10/ircd/m_whois.c:1.29 Mon May 10 19:10:27 2004
+++ ircu2.10/ircd/m_whois.c Sat May 15 11:39:34 2004
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_whois.c,v 1.29 2004/05/11 02:10:27 entrope Exp $
+ * $Id: m_whois.c,v 1.30 2004/05/15 18:39:34 entrope Exp $
*/
/*
@@ -345,6 +345,7 @@
char* p = 0;
int found = 0;
int total = 0;
+ int wildscount = 0;
if (parc < 2)
{
@@ -401,7 +402,13 @@
}
}
else /* wilds */
- found=do_wilds(sptr, nick, total, parc);
+ {
+ if (++wildscount > 3) {
+ send_reply(sptr, ERR_QUERYTOOLONG, parv[1]);
+ break;
+ }
+ found=do_wilds(sptr, nick, total, parc);
+ }
if (!found)
send_reply(sptr, ERR_NOSUCHNICK, nick);
----------------------- End of diff -----------------------