Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2006-06-27 02:40:09 UTC
Modified files:
ChangeLog include/channel.h include/client.h ircd/channel.c
ircd/m_burst.c ircd/m_join.c ircd/m_kick.c ircd/m_mode.c
ircd/m_notice.c ircd/m_part.c ircd/m_privmsg.c ircd/m_server.c
ircd/m_wallchops.c ircd/m_wallvoices.c ircd/s_user.c
Log message:
Remove redundant flags CHFL_DEOPPED, CHFL_SERVOPOK, FLAG_TS8.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.778 ircu2.10/ChangeLog:1.779
--- ircu2.10/ChangeLog:1.778 Mon Jun 26 19:05:19 2006
+++ ircu2.10/ChangeLog Mon Jun 26 19:39:59 2006
@@ -1,5 +1,46 @@
2006-06-26 Michael Poole <[EMAIL PROTECTED]>
+ * include/channel.h (CHFL_DEOPPED): Delete, along with its
+ associated macros.
+ (CHFL_SERVOPOK): Likewise.
+
+ * include/client.h (FLAG_TS8): Likewise.
+
+ * ircd/channel.c (mode_process_clients): Remove references to
+ CHFL_DEOPPED, CHFL_SERVOPOK and FLAG_TS8
+
+ * ircd/m_burst.c (ms_burst): Likewise.
+
+ * ircd/m_join.c (m_join): Likewise.
+ (ms_join): Likewise.
+
+ * ircd/m_kick.c (m_kick): Remove references to FLAG_TS8.
+ (ms_kick): Likewise.
+
+ * ircd/m_mode.c (m_mode): Likewise.
+ (ms_mode): Likewise.
+
+ * ircd/m_notice.c (m_notice): Likewise.
+ (ms_notice): Likewise.
+ (mo_notice): Likewise.
+
+ * ircd/m_part.c (m_part): Likewise.
+ (ms_part): Likewise.
+
+ * ircd/m_privmsg.c (m_privmsg): Likewise.
+ (ms_privmsg): Likewise.
+ (mo_privmsg): Likewise.
+
+ * ircd/m_server.c (ms_server): Likewise.
+
+ * ircd/m_wallchops.c (m_wallchops): Likewise.
+
+ * ircd/m_wallvoices.c (m_wallvoices): Likewise.
+
+ * ircd/s_user.c (register_user): Likewise.
+
+2006-06-26 Michael Poole <[EMAIL PROTECTED]>
+
* ircd/ircd.c (main): Remove now-redundant call to motd_init() and
#include "motd.h".
Index: ircu2.10/include/channel.h
diff -u ircu2.10/include/channel.h:1.58 ircu2.10/include/channel.h:1.59
--- ircu2.10/include/channel.h:1.58 Fri Jan 6 16:57:16 2006
+++ ircu2.10/include/channel.h Mon Jun 26 19:39:59 2006
@@ -19,7 +19,7 @@
*/
/** @file
* @brief Channel management and maintenance.
- * @version $Id: channel.h,v 1.58 2006/01/07 00:57:16 isomer Exp $
+ * @version $Id: channel.h,v 1.59 2006/06/27 02:39:59 entrope Exp $
*/
#ifndef INCLUDED_channel_h
#define INCLUDED_channel_h
@@ -59,8 +59,6 @@
#define CHFL_CHANOP 0x0001 /**< Channel operator */
#define CHFL_VOICE 0x0002 /**< the power to speak */
-#define CHFL_DEOPPED 0x0004 /**< Is de-opped by a server */
-#define CHFL_SERVOPOK 0x0008 /**< Server op allowed */
#define CHFL_ZOMBIE 0x0010 /**< Kicked from channel */
#define CHFL_BURST_JOINED 0x0100 /**< Just joined by net.junction */
#define CHFL_BANVALID 0x0800 /**< CHFL_BANNED bit is valid */
@@ -198,13 +196,11 @@
#define MAXOPLEVEL 999
#define IsZombie(x) ((x)->status & CHFL_ZOMBIE) /**< see \ref zombie */
-#define IsDeopped(x) ((x)->status & CHFL_DEOPPED)
#define IsBanned(x) ((x)->status & CHFL_BANNED)
#define IsBanValid(x) ((x)->status & CHFL_BANVALID)
#define IsChanOp(x) ((x)->status & CHFL_CHANOP)
#define OpLevel(x) ((x)->oplevel)
#define HasVoice(x) ((x)->status & CHFL_VOICE)
-#define IsServOpOk(x) ((x)->status & CHFL_SERVOPOK)
#define IsBurstJoined(x) ((x)->status & CHFL_BURST_JOINED)
#define IsVoicedOrOpped(x) ((x)->status & CHFL_VOICED_OR_OPPED)
#define IsChannelManager(x) ((x)->status & CHFL_CHANNEL_MANAGER)
@@ -213,8 +209,6 @@
#define SetBanned(x) ((x)->status |= CHFL_BANNED)
#define SetBanValid(x) ((x)->status |= CHFL_BANVALID)
-#define SetDeopped(x) ((x)->status |= CHFL_DEOPPED)
-#define SetServOpOk(x) ((x)->status |= CHFL_SERVOPOK)
#define SetBurstJoined(x) ((x)->status |= CHFL_BURST_JOINED)
#define SetZombie(x) ((x)->status |= CHFL_ZOMBIE)
#define SetChannelManager(x) ((x)->status |= CHFL_CHANNEL_MANAGER)
@@ -224,8 +218,6 @@
#define ClearBanned(x) ((x)->status &= ~CHFL_BANNED)
#define ClearBanValid(x) ((x)->status &= ~CHFL_BANVALID)
-#define ClearDeopped(x) ((x)->status &= ~CHFL_DEOPPED)
-#define ClearServOpOk(x) ((x)->status &= ~CHFL_SERVOPOK)
#define ClearBurstJoined(x) ((x)->status &= ~CHFL_BURST_JOINED)
#define ClearDelayedJoin(x) ((x)->status &= ~CHFL_DELAYED)
Index: ircu2.10/include/client.h
diff -u ircu2.10/include/client.h:1.49 ircu2.10/include/client.h:1.50
--- ircu2.10/include/client.h:1.49 Thu Apr 6 20:27:51 2006
+++ ircu2.10/include/client.h Mon Jun 26 19:39:59 2006
@@ -19,7 +19,7 @@
*/
/** @file
* @brief Structures and functions for handling local clients.
- * @version $Id: client.h,v 1.49 2006/04/07 03:27:51 entrope Exp $
+ * @version $Id: client.h,v 1.50 2006/06/27 02:39:59 entrope Exp $
*/
#ifndef INCLUDED_client_h
#define INCLUDED_client_h
@@ -149,7 +149,6 @@
FLAG_GOTID, /**< successful ident lookup achieved */
FLAG_DOID, /**< I-lines say must use ident return */
FLAG_NONL, /**< No \n in buffer */
- FLAG_TS8, /**< Why do you want to know? */
FLAG_MAP, /**< Show server on the map */
FLAG_JUNCTION, /**< Junction causing the net.burst. */
FLAG_BURST, /**< Server is receiving a net.burst */
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.169 ircu2.10/ircd/channel.c:1.170
--- ircu2.10/ircd/channel.c:1.169 Thu Apr 6 20:27:50 2006
+++ ircu2.10/ircd/channel.c Mon Jun 26 19:39:59 2006
@@ -19,7 +19,7 @@
*/
/** @file
* @brief Channel management and maintenance
- * @version $Id: channel.c,v 1.169 2006/04/07 03:27:50 entrope Exp $
+ * @version $Id: channel.c,v 1.170 2006/06/27 02:39:59 entrope Exp $
*/
#include "config.h"
@@ -3005,8 +3005,6 @@
RevealDelayedJoin(member);
member->status |= (state->cli_change[i].flag &
(MODE_CHANOP | MODE_VOICE));
- if (state->cli_change[i].flag & MODE_CHANOP)
- ClearDeopped(member);
} else
member->status &= ~(state->cli_change[i].flag &
(MODE_CHANOP | MODE_VOICE));
Index: ircu2.10/ircd/m_burst.c
diff -u ircu2.10/ircd/m_burst.c:1.42 ircu2.10/ircd/m_burst.c:1.43
--- ircu2.10/ircd/m_burst.c:1.42 Thu Apr 6 20:27:50 2006
+++ ircu2.10/ircd/m_burst.c Mon Jun 26 19:39:59 2006
@@ -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_burst.c,v 1.42 2006/04/07 03:27:50 entrope Exp $
+ * $Id: m_burst.c,v 1.43 2006/06/27 02:39:59 entrope Exp $
*/
/*
@@ -443,7 +443,7 @@
int last_oplevel = 0;
struct Membership* member;
- base_mode = CHFL_DEOPPED | CHFL_BURST_JOINED;
+ base_mode = CHFL_BURST_JOINED;
if (chptr->mode.mode & MODE_DELJOINS)
base_mode |= CHFL_DELAYED;
current_mode = last_mode = base_mode;
@@ -468,7 +468,7 @@
current_mode = base_mode;
current_mode_needs_reset = 0;
}
- current_mode = (current_mode & ~(CHFL_DEOPPED |
CHFL_DELAYED)) | CHFL_CHANOP;
+ current_mode = (current_mode & ~CHFL_DELAYED) | CHFL_CHANOP;
}
else if (*ptr == 'v') { /* has voice status */
if (current_mode_needs_reset) {
@@ -487,7 +487,7 @@
}
oplevel = 0;
}
- current_mode = (current_mode & ~(CHFL_DEOPPED |
CHFL_DELAYED)) | CHFL_CHANOP;
+ current_mode = (current_mode & ~CHFL_DELAYED) | CHFL_CHANOP;
do {
level_increment = 10 * level_increment + *ptr++ - '0';
} while (IsDigit(*ptr));
@@ -582,9 +582,7 @@
modebuf_mode_client(mbuf, MODE_DEL | CHFL_CHANOP, member->user,
OpLevel(member));
if (member->status & CHFL_VOICE)
modebuf_mode_client(mbuf, MODE_DEL | CHFL_VOICE, member->user,
OpLevel(member));
- member->status = (member->status
- & ~(CHFL_CHANNEL_MANAGER | CHFL_CHANOP | CHFL_VOICE))
- | CHFL_DEOPPED;
+ member->status &= ~(CHFL_CHANNEL_MANAGER | CHFL_CHANOP | CHFL_VOICE);
}
}
Index: ircu2.10/ircd/m_join.c
diff -u ircu2.10/ircd/m_join.c:1.44 ircu2.10/ircd/m_join.c:1.45
--- ircu2.10/ircd/m_join.c:1.44 Thu Apr 6 20:27:50 2006
+++ ircu2.10/ircd/m_join.c Mon Jun 26 19:39:59 2006
@@ -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_join.c,v 1.44 2006/04/07 03:27:50 entrope Exp $
+ * $Id: m_join.c,v 1.45 2006/06/27 02:39:59 entrope Exp $
*/
#include "config.h"
@@ -178,7 +178,7 @@
} else if (check_target_limit(sptr, chptr, chptr->chname, 0)) {
continue;
} else {
- int flags = CHFL_DEOPPED;
+ int flags = 0;
int err = 0;
/* Check Apass/Upass -- since we only ever look at a single
@@ -287,7 +287,6 @@
struct Membership *member;
struct Channel *chptr;
struct JoinBuf join;
- unsigned int flags;
time_t creation = 0;
char *p = 0;
char *chanlist;
@@ -316,8 +315,6 @@
for (name = ircd_strtok(&p, chanlist, ","); name;
name = ircd_strtok(&p, 0, ",")) {
- flags = CHFL_DEOPPED;
-
if (IsLocalChannel(name) || !IsChannelName(name))
{
protocol_violation(cptr, "%s tried to join %s", cli_name(sptr), name);
@@ -333,8 +330,6 @@
name,cli_name(sptr));
continue;
}
- flags |= HasFlag(sptr, FLAG_TS8) ? CHFL_SERVOPOK : 0;
-
chptr->creationtime = creation;
}
else { /* We have a valid channel? */
@@ -344,12 +339,9 @@
if (!IsZombie(member)) /* already on channel */
continue;
- flags = member->status & (CHFL_DEOPPED | CHFL_SERVOPOK);
remove_user_from_channel(sptr, chptr);
chptr = FindChannel(name);
}
- else
- flags |= HasFlag(sptr, FLAG_TS8) ? CHFL_SERVOPOK : 0;
/* Always copy the timestamp when it is older, that is the only way to
ensure network-wide synchronization of creation times.
We now also copy a creation time that only 1 second younger...
@@ -417,7 +409,7 @@
}
}
- joinbuf_join(&join, chptr, flags);
+ joinbuf_join(&join, chptr, 0);
}
joinbuf_flush(&join); /* flush joins... */
Index: ircu2.10/ircd/m_kick.c
diff -u ircu2.10/ircd/m_kick.c:1.23 ircu2.10/ircd/m_kick.c:1.24
--- ircu2.10/ircd/m_kick.c:1.23 Mon Nov 14 13:22:54 2005
+++ ircu2.10/ircd/m_kick.c Mon Jun 26 19:39:59 2006
@@ -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_kick.c,v 1.23 2005/11/14 21:22:54 entrope Exp $
+ * $Id: m_kick.c,v 1.24 2006/06/27 02:39:59 entrope Exp $
*/
/*
@@ -112,8 +112,6 @@
struct Membership* member2;
char *name, *comment;
- ClrFlag(sptr, FLAG_TS8);
-
if (parc < 3 || *parv[1] == '\0')
return need_more_params(sptr, "KICK");
@@ -190,8 +188,6 @@
struct Membership *member = 0, *sptr_link = 0;
char *name, *comment;
- ClrFlag(sptr, FLAG_TS8);
-
if (parc < 3 || *parv[1] == '\0')
return need_more_params(sptr, "KICK");
Index: ircu2.10/ircd/m_mode.c
diff -u ircu2.10/ircd/m_mode.c:1.17 ircu2.10/ircd/m_mode.c:1.18
--- ircu2.10/ircd/m_mode.c:1.17 Thu Apr 6 20:27:50 2006
+++ ircu2.10/ircd/m_mode.c Mon Jun 26 19:39:59 2006
@@ -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_mode.c,v 1.17 2006/04/07 03:27:50 entrope Exp $
+ * $Id: m_mode.c,v 1.18 2006/06/27 02:39:59 entrope Exp $
*/
/*
@@ -115,8 +115,6 @@
if (!IsChannelName(parv[1]) || !(chptr = FindChannel(parv[1])))
return set_user_mode(cptr, sptr, parc, parv);
- ClrFlag(sptr, FLAG_TS8);
-
member = find_member_link(chptr, sptr);
if (parc < 3) {
@@ -170,8 +168,6 @@
if (!(chptr = FindChannel(parv[1])))
return set_user_mode(cptr, sptr, parc, parv);
- ClrFlag(sptr, FLAG_TS8);
-
if (IsServer(sptr)) {
if (find_conf_byhost(cli_confs(cptr), cli_name(sptr), CONF_UWORLD))
modebuf_init(&mbuf, sptr, cptr, chptr,
Index: ircu2.10/ircd/m_notice.c
diff -u ircu2.10/ircd/m_notice.c:1.10 ircu2.10/ircd/m_notice.c:1.11
--- ircu2.10/ircd/m_notice.c:1.10 Fri Dec 10 21:13:48 2004
+++ ircu2.10/ircd/m_notice.c Mon Jun 26 19:39:59 2006
@@ -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_notice.c,v 1.10 2004/12/11 05:13:48 klmitch Exp $
+ * $Id: m_notice.c,v 1.11 2006/06/27 02:39:59 entrope Exp $
*/
/*
@@ -113,8 +113,6 @@
assert(0 != cptr);
assert(cptr == sptr);
- ClrFlag(sptr, FLAG_TS8);
-
if (parc < 2 || EmptyString(parv[1]))
return send_reply(sptr, ERR_NORECIPIENT, MSG_NOTICE);
@@ -156,8 +154,6 @@
char* name;
char* server;
- ClrFlag(sptr, FLAG_TS8);
-
if (parc < 3) {
/*
* we can't deliver it, sending an error back is pointless
@@ -203,8 +199,6 @@
assert(0 != cptr);
assert(cptr == sptr);
- ClrFlag(sptr, FLAG_TS8);
-
if (parc < 2 || EmptyString(parv[1]))
return send_reply(sptr, ERR_NORECIPIENT, MSG_NOTICE);
Index: ircu2.10/ircd/m_part.c
diff -u ircu2.10/ircd/m_part.c:1.10 ircu2.10/ircd/m_part.c:1.11
--- ircu2.10/ircd/m_part.c:1.10 Tue Mar 29 20:01:17 2005
+++ ircu2.10/ircd/m_part.c Mon Jun 26 19:39:59 2006
@@ -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_part.c,v 1.10 2005/03/30 04:01:17 entrope Exp $
+ * $Id: m_part.c,v 1.11 2006/06/27 02:39:59 entrope Exp $
*/
/*
@@ -111,8 +111,6 @@
char *p = 0;
char *name;
- ClrFlag(sptr, FLAG_TS8);
-
/* check number of arguments */
if (parc < 2 || parv[1][0] == '\0')
return need_more_params(sptr, "PART");
@@ -172,8 +170,6 @@
char *p = 0;
char *name;
- ClrFlag(sptr, FLAG_TS8);
-
/* check number of arguments */
if (parc < 2 || parv[1][0] == '\0')
return need_more_params(sptr, "PART");
Index: ircu2.10/ircd/m_privmsg.c
diff -u ircu2.10/ircd/m_privmsg.c:1.11 ircu2.10/ircd/m_privmsg.c:1.12
--- ircu2.10/ircd/m_privmsg.c:1.11 Fri Dec 10 21:13:48 2004
+++ ircu2.10/ircd/m_privmsg.c Mon Jun 26 19:39:59 2006
@@ -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_privmsg.c,v 1.11 2004/12/11 05:13:48 klmitch Exp $
+ * $Id: m_privmsg.c,v 1.12 2006/06/27 02:39:59 entrope Exp $
*/
/*
@@ -112,8 +112,6 @@
assert(cptr == sptr);
assert(0 != cli_user(sptr));
- ClrFlag(sptr, FLAG_TS8);
-
if (feature_bool(FEAT_IDLE_FROM_MSG))
cli_user(sptr)->last = CurrentTime;
@@ -153,8 +151,6 @@
char* name;
char* server;
- ClrFlag(sptr, FLAG_TS8);
-
if (parc < 3) {
/*
* we can't deliver it, sending an error back is pointless
@@ -202,8 +198,6 @@
assert(cptr == sptr);
assert(0 != cli_user(sptr));
- ClrFlag(sptr, FLAG_TS8);
-
if (feature_bool(FEAT_IDLE_FROM_MSG))
cli_user(sptr)->last = CurrentTime;
Index: ircu2.10/ircd/m_server.c
diff -u ircu2.10/ircd/m_server.c:1.42 ircu2.10/ircd/m_server.c:1.43
--- ircu2.10/ircd/m_server.c:1.42 Fri Jan 6 03:22:31 2006
+++ ircu2.10/ircd/m_server.c Mon Jun 26 19:39:59 2006
@@ -22,7 +22,7 @@
*/
/** @file
* @brief Handlers for the SERVER command.
- * @version $Id: m_server.c,v 1.42 2006/01/06 11:22:31 isomer Exp $
+ * @version $Id: m_server.c,v 1.43 2006/06/27 02:39:59 entrope Exp $
*/
#include "config.h"
@@ -749,8 +749,6 @@
set_server_flags(acptr, parv[7] + 1);
Count_newremoteserver(UserStats);
- if (Protocol(acptr) < 10)
- SetFlag(acptr, FLAG_TS8);
add_client_to_list(acptr);
hAddClient(acptr);
if (*parv[5] == 'J')
Index: ircu2.10/ircd/m_wallchops.c
diff -u ircu2.10/ircd/m_wallchops.c:1.9 ircu2.10/ircd/m_wallchops.c:1.10
--- ircu2.10/ircd/m_wallchops.c:1.9 Fri Dec 10 21:14:03 2004
+++ ircu2.10/ircd/m_wallchops.c Mon Jun 26 19:39:59 2006
@@ -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_wallchops.c,v 1.9 2004/12/11 05:14:03 klmitch Exp $
+ * $Id: m_wallchops.c,v 1.10 2006/06/27 02:39:59 entrope Exp $
*/
/*
@@ -106,8 +106,6 @@
assert(0 != cptr);
assert(cptr == sptr);
- ClrFlag(sptr, FLAG_TS8);
-
if (parc < 2 || EmptyString(parv[1]))
return send_reply(sptr, ERR_NORECIPIENT, "WALLCHOPS");
Index: ircu2.10/ircd/m_wallvoices.c
diff -u ircu2.10/ircd/m_wallvoices.c:1.6 ircu2.10/ircd/m_wallvoices.c:1.7
--- ircu2.10/ircd/m_wallvoices.c:1.6 Fri Dec 10 21:14:03 2004
+++ ircu2.10/ircd/m_wallvoices.c Mon Jun 26 19:39:59 2006
@@ -19,7 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_wallvoices.c,v 1.6 2004/12/11 05:14:03 klmitch Exp $
+ * $Id: m_wallvoices.c,v 1.7 2006/06/27 02:39:59 entrope Exp $
*/
/*
@@ -105,8 +105,6 @@
assert(0 != cptr);
assert(cptr == sptr);
- ClrFlag(sptr, FLAG_TS8);
-
if (parc < 2 || EmptyString(parv[1]))
return send_reply(sptr, ERR_NORECIPIENT, "WALLVOICES");
Index: ircu2.10/ircd/s_user.c
diff -u ircu2.10/ircd/s_user.c:1.103 ircu2.10/ircd/s_user.c:1.104
--- ircu2.10/ircd/s_user.c:1.103 Thu Apr 6 20:27:50 2006
+++ ircu2.10/ircd/s_user.c Mon Jun 26 19:39:59 2006
@@ -22,7 +22,7 @@
*/
/** @file
* @brief Miscellaneous user-related helper functions.
- * @version $Id: s_user.c,v 1.103 2006/04/07 03:27:50 entrope Exp $
+ * @version $Id: s_user.c,v 1.104 2006/06/27 02:39:59 entrope Exp $
*/
#include "config.h"
@@ -430,8 +430,6 @@
SetFlag(sptr, FLAG_KILLED);
return exit_client(cptr, sptr, &me, "NICK server wrong direction");
}
- else if (HasFlag(acptr, FLAG_TS8))
- SetFlag(sptr, FLAG_TS8);
/*
* Check to see if this user is being propagated
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches