#
# ChangeLog for Undernet ircu Servers
#
-# $Id: ChangeLog,v 1.6 2000-01-01 00:00:32 bleep Exp $
+# $Id: ChangeLog,v 1.7 2000-01-20 04:51:29 bleep Exp $
#
# Please insert new entries on the top of the list, a one or two line comment
# is sufficient. Please include your name on the entries we know who to blame.
# Please keep lines < 80 chars.
#-------------------------------------------------------------------------------
+* doc/readme.www: add Runs link update patch for linux info. --Bleep
+* channel.c, channel.h: add David M's fixup for local channel oper overrides.
+ --Bleep
* s_misc.c (date): add Runs Y2K patch --Bleep
* hash.c (hChangeClient): bug fix. If the client pointer matched the first
pointer in the bucket, the change was ignored (returned 0), leaving stale
me.name, chptr->chname, modebuf, parabuf);
sendto_op_mask(SNO_HACK4,
"OPER MODE: %s MODE %s %s %s",
- me.name,chptr->chname,modebuf,parabuf);
+ sptr->name,chptr->chname,modebuf,parabuf);
}
else
#endif
static int can_join(aClient *sptr, aChannel *chptr, char *key)
{
Reg1 Link *lp;
-
+ int overrideJoin = 0;
+
#ifdef OPER_WALK_THROUGH_LMODES
- if (IsOperOnLocalChannel(sptr, chptr->chname))
- return 0;
+ /* An oper can force a join on a local channel using "OVERRIDE" as the key.
+ a HACK(4) notice will be sent if he would not have been supposed
+ to join normally. */
+ if (IsOperOnLocalChannel(sptr,chptr->chname) && !BadPtr(key) &&
+ compall("OVERRIDE",key) == 0)
+ overrideJoin = MAGIC_OPER_OVERRIDE;
#endif
/*
* Now a banned user CAN join if invited -- Nemesi
if (!lp)
{
if (chptr->mode.limit && chptr->users >= chptr->mode.limit)
- return (ERR_CHANNELISFULL);
+ return (overrideJoin + ERR_CHANNELISFULL);
/*
* This can return an "Invite only" msg instead of the "You are banned"
* if _both_ conditions are true, but who can say what is more
* appropriate ? checking again IsBanned would be _SO_ cpu-xpensive !
*/
- return ((chptr->mode.mode & MODE_INVITEONLY) ?
+ return overrideJoin + ((chptr->mode.mode & MODE_INVITEONLY) ?
ERR_INVITEONLYCHAN : ERR_BANNEDFROMCHAN);
}
}
/* now using compall (above) to test against a whole key ring -Kev */
if (*chptr->mode.key && (BadPtr(key) || compall(chptr->mode.key, key)))
- return (ERR_BADCHANNELKEY);
+ return overrideJoin + (ERR_BADCHANNELKEY);
return 0;
}
/*
* Opers are allowed to join any number of channels
*/
- if (sptr->user->joined >= MAXCHANNELSPERUSER && !IsOper(sptr))
+ if (sptr->user->joined >= MAXCHANNELSPERUSER && !IsAnOper(sptr))
#else
if (sptr->user->joined >= MAXCHANNELSPERUSER)
#endif
}
if ((i = can_join(sptr, chptr, keysOrTS)))
{
- sendto_one(sptr, err_str(i), me.name, parv[0], chptr->chname);
- continue;
+#ifdef OPER_WALK_THROUGH_LMODES
+ if (i > MAGIC_OPER_OVERRIDE)
+ {
+ switch(i - MAGIC_OPER_OVERRIDE)
+ {
+ case ERR_CHANNELISFULL: i = 'l'; break;
+ case ERR_INVITEONLYCHAN: i = 'i'; break;
+ case ERR_BANNEDFROMCHAN: i = 'b'; break;
+ case ERR_BADCHANNELKEY: i = 'k'; break;
+ }
+ sendto_op_mask(SNO_HACK4,"OPER JOIN: %s JOIN %s (overriding +%c)",sptr->name,chptr->chname,i);
+ }
+ else
+ {
+ sendto_one(sptr, err_str(i), me.name, parv[0], chptr->chname);
+ continue;
+ }
+#else
+ sendto_one(sptr, err_str(i), me.name, parv[0], chptr->chname);
+ continue;
+#endif
}
}
/*
const char *name;
unsigned int numeric;
} server_table[] = {
- {
- "Uworld.undernet.org", 22},
- {
- "Uworld2.undernet.org", 23},
- {
- "channels.undernet.org", 30},
- {
- "channels2.undernet.org", 31},
+ { "Uworld.undernet.org", 22},
+ { "Uworld2.undernet.org", 23},
+ { "channels.undernet.org", 30},
+ { "channels2.undernet.org", 31},
{
0, 0}
};