Committer : klmitch
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_11_07
Commit time: 2004-09-11 20:08:53 UTC
Modified files:
Tag: u2_10_11_07
ChangeLog include/client.h ircd/m_topic.c ircd/m_userhost.c
ircd/m_userip.c ircd/m_who.c ircd/m_whois.c ircd/s_conf.c
ircd/whocmds.c
Log message:
Author: Kev <[EMAIL PROTECTED]>
Log message:
A whole bunch of miscellaneous patches from reed, froo, and beware.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.290.2.130.2.22 ircu2.10/ChangeLog:1.290.2.130.2.23
--- ircu2.10/ChangeLog:1.290.2.130.2.22 Sat Sep 11 12:37:28 2004
+++ ircu2.10/ChangeLog Sat Sep 11 13:08:40 2004
@@ -1,5 +1,19 @@
+2004-06-17 Fredrik Soderblom <[EMAIL PROTECTED]>
+
+ * ircd/s_conf.c (rehash): added restart_resolver()
+
+2003-07-04 Bas Steendijk <[EMAIL PROTECTED]>
+
+ * include/client.h, ircd/m_userhost.c, ircd/m_userip.c, ircd/m_who.c,
+ ircd/m_whois.c, ircd/whocmds.c: the same code, for "can user A see user
+ B is an oper", appeared in a lot of places. made it a define SeeOper.
+
2004-09-11 Kevin L Mitchell <[EMAIL PROTECTED]>
+ * ircd/m_topic.c (do_settopic): Don't allow banned users to set a
+ topic in a channel (adapted from patch by Alexander Maassen
+ <[EMAIL PROTECTED]>)
+
* tools/Bounce/Bounce.h: drop file location
* tools/Bounce/Bounce.cpp: drop file location
Index: ircu2.10/include/client.h
diff -u ircu2.10/include/client.h:1.23.2.5 ircu2.10/include/client.h:1.23.2.5.8.1
--- ircu2.10/include/client.h:1.23.2.5 Sat Dec 14 17:02:38 2002
+++ ircu2.10/include/client.h Sat Sep 11 13:08:42 2004
@@ -18,7 +18,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
- * $Id: client.h,v 1.23.2.5 2002/12/15 01:02:38 isomer Exp $
+ * $Id: client.h,v 1.23.2.5.8.1 2004/09/11 20:08:42 klmitch Exp $
*/
#ifndef INCLUDED_client_h
#define INCLUDED_client_h
@@ -467,6 +467,9 @@
#define ClearServNotice(x) ClrFlag(x, FLAG_SERVNOTICE)
#define ClearHiddenHost(x) ClrFlag(x, FLAG_HIDDENHOST)
+#define SeeOper(sptr,acptr) (IsAnOper(acptr) && (HasPriv(acptr, PRIV_DISPLAY) \
+ || HasPriv(sptr, PRIV_SEE_OPERS)))
+
/* free flags */
#define FREEFLAG_SOCKET 0x0001 /* socket needs to be freed */
#define FREEFLAG_TIMER 0x0002 /* timer needs to be freed */
Index: ircu2.10/ircd/m_topic.c
diff -u ircu2.10/ircd/m_topic.c:1.9.2.2.8.1 ircu2.10/ircd/m_topic.c:1.9.2.2.8.2
--- ircu2.10/ircd/m_topic.c:1.9.2.2.8.1 Sat Sep 11 12:37:30 2004
+++ ircu2.10/ircd/m_topic.c Sat Sep 11 13:08:42 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_topic.c,v 1.9.2.2.8.1 2004/09/11 19:37:30 klmitch Exp $
+ * $Id: m_topic.c,v 1.9.2.2.8.2 2004/09/11 20:08:42 klmitch Exp $
*/
/*
@@ -104,6 +104,10 @@
send_reply(sptr, ERR_CHANOPRIVSNEEDED, chptr->chname);
return;
}
+ if (!client_can_send_to_channel(sptr, chptr, 1)) {
+ send_reply(sptr, ERR_CANNOTSENDTOCHAN, chptr->chname);
+ return;
+ }
/* Note if this is just a refresh of an old topic, and don't
* send it to all the clients to save bandwidth. We still send
* it to other servers as they may have split and lost the topic.
Index: ircu2.10/ircd/m_userhost.c
diff -u ircu2.10/ircd/m_userhost.c:1.9.2.3 ircu2.10/ircd/m_userhost.c:1.9.2.3.2.1
--- ircu2.10/ircd/m_userhost.c:1.9.2.3 Sat Jan 10 16:23:32 2004
+++ ircu2.10/ircd/m_userhost.c Sat Sep 11 13:08:42 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_userhost.c,v 1.9.2.3 2004/01/11 00:23:32 isomer Exp $
+ * $Id: m_userhost.c,v 1.9.2.3.2.1 2004/09/11 20:08:42 klmitch Exp $
*/
/*
@@ -95,7 +95,7 @@
{
assert(IsUser(cptr));
msgq_append(0, mb, "[EMAIL PROTECTED]", cli_name(cptr),
- HasPriv(cptr, PRIV_DISPLAY) ? "*" : "",
+ SeeOper(sptr,cptr) ? "*" : "",
cli_user(cptr)->away ? '-' : '+', cli_user(cptr)->username,
HasHiddenHost(cptr) && !IsAnOper(sptr) && (sptr != cptr) ?
cli_user(cptr)->host :
Index: ircu2.10/ircd/m_userip.c
diff -u ircu2.10/ircd/m_userip.c:1.8.2.3 ircu2.10/ircd/m_userip.c:1.8.2.3.2.1
--- ircu2.10/ircd/m_userip.c:1.8.2.3 Sat Jan 10 16:23:32 2004
+++ ircu2.10/ircd/m_userip.c Sat Sep 11 13:08:42 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_userip.c,v 1.8.2.3 2004/01/11 00:23:32 isomer Exp $
+ * $Id: m_userip.c,v 1.8.2.3.2.1 2004/09/11 20:08:42 klmitch Exp $
*/
/*
@@ -96,7 +96,7 @@
{
assert(IsUser(cptr));
msgq_append(0, mb, "[EMAIL PROTECTED]", cli_name(cptr),
- HasPriv(cptr, PRIV_DISPLAY) ? "*" : "",
+ SeeOper(sptr,cptr) ? "*" : "",
cli_user(cptr)->away ? '-' : '+', cli_user(cptr)->username,
HasHiddenHost(cptr) && !IsAnOper(sptr) && (sptr != cptr) ?
feature_str(FEAT_HIDDEN_IP) :
Index: ircu2.10/ircd/m_who.c
diff -u ircu2.10/ircd/m_who.c:1.10.2.9 ircu2.10/ircd/m_who.c:1.10.2.9.8.1
--- ircu2.10/ircd/m_who.c:1.10.2.9 Sat Dec 14 17:02:42 2002
+++ ircu2.10/ircd/m_who.c Sat Sep 11 13:08:42 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_who.c,v 1.10.2.9 2002/12/15 01:02:42 isomer Exp $
+ * $Id: m_who.c,v 1.10.2.9.8.1 2004/09/11 20:08:42 klmitch Exp $
*/
/*
@@ -321,9 +321,7 @@
for (member = chptr->members; member; member = member->next_member)
{
acptr = member->user;
- if ((bitsel & WHOSELECT_OPER) &&
- !(IsAnOper(acptr) && (HasPriv(acptr, PRIV_DISPLAY) ||
- HasPriv(sptr, PRIV_SEE_OPERS))))
+ if ((bitsel & WHOSELECT_OPER) && !SeeOper(sptr,acptr))
continue;
if ((acptr != sptr) && (member->status & CHFL_ZOMBIE))
continue;
@@ -340,9 +338,7 @@
else
{
if ((acptr = FindUser(nick)) &&
- ((!(bitsel & WHOSELECT_OPER)) ||
- (IsAnOper(acptr) && (HasPriv(acptr, PRIV_DISPLAY) ||
- HasPriv(sptr, PRIV_SEE_OPERS)))) &&
+ ((!(bitsel & WHOSELECT_OPER)) || SeeOper(sptr,acptr)) &&
Process(acptr) && SHOW_MORE(sptr, counter))
{
do_who(sptr, acptr, 0, fields, qrt);
@@ -386,9 +382,7 @@
if (!(IsUser(acptr) && Process(acptr)))
continue; /* Now Process() is at the beginning, if we fail
we'll never have to show this acptr in this query
*/
- if ((bitsel & WHOSELECT_OPER) &&
- !(IsAnOper(acptr) && (HasPriv(acptr, PRIV_DISPLAY) ||
- HasPriv(sptr, PRIV_SEE_OPERS))))
+ if ((bitsel & WHOSELECT_OPER) && !SeeOper(sptr,acptr))
continue;
if ((mask) &&
((!(matchsel & WHO_FIELD_NIC))
@@ -424,9 +418,7 @@
{
if (!(IsUser(acptr) && Process(acptr)))
continue;
- if ((bitsel & WHOSELECT_OPER) &&
- !(IsAnOper(acptr) && (HasPriv(acptr, PRIV_DISPLAY) ||
- HasPriv(sptr, PRIV_SEE_OPERS))))
+ if ((bitsel & WHOSELECT_OPER) && !SeeOper(sptr,acptr))
continue;
if (!(SEE_USER(sptr, acptr, bitsel)))
continue;
Index: ircu2.10/ircd/m_whois.c
diff -u ircu2.10/ircd/m_whois.c:1.19.2.12.2.2 ircu2.10/ircd/m_whois.c:1.19.2.12.2.3
--- ircu2.10/ircd/m_whois.c:1.19.2.12.2.2 Sat Sep 11 10:36:22 2004
+++ ircu2.10/ircd/m_whois.c Sat Sep 11 13:08:42 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.19.2.12.2.2 2004/09/11 17:36:22 klmitch Exp $
+ * $Id: m_whois.c,v 1.19.2.12.2.3 2004/09/11 20:08:42 klmitch Exp $
*/
/*
@@ -212,8 +212,7 @@
if (user->away)
send_reply(sptr, RPL_AWAY, name, user->away);
- if (IsAnOper(acptr) && (HasPriv(acptr, PRIV_DISPLAY) ||
- HasPriv(sptr, PRIV_SEE_OPERS)))
+ if (SeeOper(sptr,acptr))
send_reply(sptr, RPL_WHOISOPERATOR, name);
if (IsAccount(acptr))
Index: ircu2.10/ircd/s_conf.c
diff -u ircu2.10/ircd/s_conf.c:1.44.2.5.4.2 ircu2.10/ircd/s_conf.c:1.44.2.5.4.3
--- ircu2.10/ircd/s_conf.c:1.44.2.5.4.2 Thu Aug 26 21:01:28 2004
+++ ircu2.10/ircd/s_conf.c Sat Sep 11 13:08:42 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: s_conf.c,v 1.44.2.5.4.2 2004/08/27 04:01:28 klmitch Exp $
+ * $Id: s_conf.c,v 1.44.2.5.4.3 2004/09/11 20:08:42 klmitch Exp $
*/
#include "config.h"
@@ -1364,6 +1364,7 @@
if (sig != 2)
flush_resolver_cache();
+ restart_resolver();
class_mark_delete();
mark_listeners_closing();
Index: ircu2.10/ircd/whocmds.c
diff -u ircu2.10/ircd/whocmds.c:1.12.2.8 ircu2.10/ircd/whocmds.c:1.12.2.8.6.1
--- ircu2.10/ircd/whocmds.c:1.12.2.8 Tue Jan 7 03:15:44 2003
+++ ircu2.10/ircd/whocmds.c Sat Sep 11 13:08:42 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: whocmds.c,v 1.12.2.8 2003/01/07 11:15:44 isomer Exp $
+ * $Id: whocmds.c,v 1.12.2.8.6.1 2004/09/11 20:08:42 klmitch Exp $
*/
#include "config.h"
@@ -159,8 +159,7 @@
*(p1++) = 'G';
else
*(p1++) = 'H';
- if (IsAnOper(acptr) &&
- (HasPriv(acptr, PRIV_DISPLAY) || HasPriv(sptr, PRIV_SEE_OPERS)))
+ if SeeOper(sptr,acptr)
*(p1++) = '*';
if (fields) {
/* If you specified flags then we assume you know how to parse
----------------------- End of diff -----------------------