+2003-07-07 Bas Steendijk <steendijk@xs4all.nl>
+
+ * ircd/s_user.c: invalidate ban cache for user on host hiding/account
+
+2003-07-04 Bas Steendijk <steendijk@xs4all.nl>
+
+ * 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.
+
+2003-07-04 Bas Steendijk <steendijk@xs4all.nl>
+ * ircd/s_user.c: umode_str (user modes in N token) internal flags var
+ was not initialized to the user's flags, returned a string with
+ random modes set.
+
+2003-07-01 Bas Steendijk <steendijk@xs4all.nl>
+
+ * ircd/m_names.c: length counter being incremented one too many
+ for each nick, resulting names reply messages are about 50 chars
+ shorter than possible. fixed.
+
+2003-06-29 Bas Steendijk <steendijk@xs4all.nl>
+
+ * ircd/channel.c: don't ever send mode changes for local channels to
+ servers.
+
+2003-06-27 Bas Steendijk <steendijk@xs4all.nl>
+
+ * include/channel.h, include/client.h, ircd/s_user.c, ircd/s_err.c:
+ moved the supported channel/user mode strings of the 004 reply from
+ s_err.c to the header files where the channels/user modes are
+ defined, and show or hide +Au based on OPLEVELS setting.
+
+2003-06-25 Bas Steendijk <steendijk@xs4all.nl>
+
+ * ircd/m_burst.c: Clear topic set by netrider on burst.
+
2003-08-05 Diane Bruce <db@db.net>
* ircd/parse.c: Fixed the typo the fix of the typo created
*/
#define MODE_WPARAS (MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT|MODE_APASS|MODE_UPASS)
+#define infochanmodes feature_bool(FEAT_OPLEVELS) ? "Abiklmnopstuvr" : "biklmnopstvr"
+#define infochanmodeswithparams feature_bool(FEAT_OPLEVELS) ? "Abklouv" : "bklov"
+
#define HoldChannel(x) (!(x))
/* name invisible */
#define SecretChannel(x) ((x) && ((x)->mode.mode & MODE_SECRET))
#define FLAGSET_SET(set, flag) (set).bits[FLAGSET_INDEX(flag)] |= FLAGSET_MASK(flag)
#define FLAGSET_CLEAR(set, flag) (set).bits[FLAGSET_INDEX(flag)] &= ~FLAGSET_MASK(flag)
+#define infousermodes "dioswkgx"
+
enum Priv
{
PRIV_CHAN_LIMIT, /* no channel limit on oper */
#define SetHiddenHost(x) SetFlag(x, FLAG_HIDDENHOST)
#define SetPingSent(x) SetFlag(x, FLAG_PINGSENT)
+#define SeeOper(sptr,acptr) (IsAnOper(acptr) && (HasPriv(acptr, PRIV_DISPLAY) \
+ || HasPriv(sptr, PRIV_SEE_OPERS)))
+
#define ClearAccess(x) ClrFlag(x, FLAG_CHKACCESS)
#define ClearBurst(x) ClrFlag(x, FLAG_BURST)
#define ClearBurstAck(x) ClrFlag(x, FLAG_BURST_ACK)
assert(0 != chan);
assert(0 != dest);
+ if (IsLocalChannel(chan->chname)) dest &= ~MODEBUF_DEST_SERVER;
+
mbuf->mb_add = 0;
mbuf->mb_rem = 0;
mbuf->mb_source = source;
/* mark bans for wipeout */
for (lp = chptr->banlist; lp; lp = lp->next)
lp->flags |= CHFL_BURST_BAN_WIPEOUT;
+
+ /* clear topic set by netrider (if set) */
+ if (*chptr->topic) {
+ *chptr->topic = '\0';
+ *chptr->topic_nick = '\0';
+ chptr->topic_time = 0;
+ sendcmdto_channel_butserv_butone(&me, CMD_TOPIC, chptr, NULL,
+ "%H :%s", chptr, chptr->topic);
+ }
} else if (chptr->creationtime == timestamp) {
modebuf_init(mbuf = &modebuf, &me, cptr, chptr,
MODEBUF_DEST_CHANNEL | MODEBUF_DEST_NOKEY);
idx++;
}
strcat(buf, cli_name(c2ptr));
- idx += strlen(cli_name(c2ptr)) + 1;
+ idx += strlen(cli_name(c2ptr));
flag = 1;
if (mlen + idx + NICKLEN + 5 > BUFSIZE)
/* space, modifier, nick, \r \n \0 */
{
assert(IsUser(cptr));
msgq_append(0, mb, "%s%s=%c%s@%s", cli_name(cptr),
- HasPriv(cptr, PRIV_DISPLAY) ? "*" : "",
+ SeeOper(sptr,cptr) ? "*" : "",
cli_user(cptr)->away ? '-' : '+', cli_user(cptr)->username,
HasHiddenHost(cptr) && !IsAnOper(sptr) ?
cli_user(cptr)->host : cli_user(cptr)->realhost);
{
assert(IsUser(cptr));
msgq_append(0, mb, "%s%s=%c%s@%s", cli_name(cptr),
- HasPriv(cptr, PRIV_DISPLAY) ? "*" : "",
+ SeeOper(sptr,cptr) ? "*" : "",
cli_user(cptr)->away ? '-' : '+', cli_user(cptr)->username,
HasHiddenHost(cptr) && !IsAnOper(sptr) ?
feature_str(FEAT_HIDDEN_IP) :
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;
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);
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))
{
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;
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))
/* 003 */
{ RPL_CREATED, ":This server was created %s", "003" },
/* 004 */
- { RPL_MYINFO, "%s %s dioswkgx Abiklmnopstuvr Abklouv", "004" },
+ { RPL_MYINFO, "%s %s %s %s %s", "004" },
/* 005 */
{ RPL_ISUPPORT, "%s :are supported by this server", "005" },
/* 006 */
*/
send_reply(sptr, RPL_YOURHOST, cli_name(&me), version);
send_reply(sptr, RPL_CREATED, creation);
- send_reply(sptr, RPL_MYINFO, cli_name(&me), version);
+ send_reply(sptr, RPL_MYINFO, cli_name(&me), infousermodes, infochanmodes,
+ infochanmodeswithparams, version);
send_supported(sptr);
m_lusers(sptr, sptr, 1, parv);
update_load();
flag == FLAG_HIDDENHOST)
return 0;
+/* Invalidate all bans against the user so we check them again */
+ for (chan = (cli_user(cptr))->channel; chan;
+ chan = chan->next_channel)
+ ClearBanValid(chan);
+
SetFlag(cptr, flag);
if (!HasFlag(cptr, FLAG_HIDDENHOST) || !HasFlag(cptr, FLAG_ACCOUNT))
return 0;
/* Maximum string size: "owidgrx\0" */
char *m = umodeBuf;
int i;
- struct Flags c_flags;
+ struct Flags c_flags = cli_flags(cptr);
if (HasPriv(cptr, PRIV_PROPAGATE))
FlagSet(&c_flags, FLAG_OPER);
*(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