+2001-07-28 Kevin L. Mitchell <klmitch@mit.edu>
+
+ * ircd/s_user.c: implement send_supported() to send two ISUPPORT
+ messages containing our feature buffers; make register_user() use
+ send_supported()
+
+ * ircd/s_misc.c (exit_client): make sure not to give away a remote
+ server in the ERROR message sent to the client; if the killer is a
+ server, we substitute our name in its place
+
+ * ircd/m_version.c (m_version): use send_supported() to send the
+ ISUPPORT values to the user
+
+ * ircd/m_nick.c: shave nick collision kills here a bit, too, for
+ the same reasons as for m_kill.c
+
+ * ircd/m_kill.c: shave kills a bit so that the results look
+ exactly the same no matter where you are; if we didn't do this, it
+ would be possible to map the network by looking at the differences
+ between kills originating under various circumstances
+
+ * include/supported.h: split the features into two, so as to not
+ bust the parameter count when sending the features list
+
+ * include/s_user.h: declare new send_supported() function to send
+ the ISUPPORT information
+
2001-07-27 Kevin L. Mitchell <klmitch@mit.edu>
* ircd/s_bsd.c: disable IP (*not* TCP) options to prevent
#
# ChangeLog for ircu2.10.10
#
-# $Id: ChangeLog.10,v 1.9 2001-06-29 16:15:56 kev Exp $
+# $Id: ChangeLog.10,v 1.10 2001-07-28 16:57:33 kev Exp $
#
# Insert new changes at beginning of the change list.
#
+-------------------------- Released 2.10.10.pl15
+* Fiddle with /KILL and various exits to make the user experience uniform,
+ no matter who's doing the killing or where. Previously, differences in
+ QUITs and in the messages sent to the killed client could help make a
+ partial map of the network; now that these messages are all uniform, there
+ is no way to tell. -Kev
+* Split ISUPPORT numeric into two numerics, so as not to exceed the 15
+ parameter limit imposed by the RFC -Kev
+* Turn on HEAD_IN_SAND_REMOTE...oops -Kev
+* Send prefixed error messages to other servers, so ERROR doesn't get
+ interpreted as a prefix -Kev
* Reverse sense of HEAD_IN_SAND_WHO_HOPCOUNT to do what was intended; use a
hopcount of 0 if user is using /who on him/herself -Kev
* Allow a user to see his/her own idle time without having to do
* Fixed /who showing server name -- Isomer
* Fixed burst showing linking server -- Isomer
* Fixed burst bans showing linked server -- Isomer
+* Fixed /whowas showing server name -- Isomer
-------------------------- Released 2.10.10.pl14 (You got any issues with that punk?)
* Changed (then fixed) /LINKS to output an empty links list -- Isomer
* Make netsplit server notice say the right thing
extern void add_target(struct Client *sptr, void *target);
extern unsigned int umode_make_snomask(unsigned int oldmask, char *arg,
int what);
+extern int send_supported(struct Client *cptr);
#define NAMES_ALL 1 /* List all users in channel */
#define NAMES_VIS 2 /* List only visible users in non-secret channels */
/*
* 'Features' supported by this ircd
*/
-#define FEATURES \
+#define FEATURES1 \
"WHOX"\
" WALLCHOPS"\
" USERIP"\
" NICKLEN=%i" \
" TOPICLEN=%i" \
" KICKLEN=%i" \
- " CHANTYPES=%s" \
- " PREFIX=%s" \
+ " CHANTYPES=%s"
+
+#define FEATURES2 "PREFIX=%s" \
" CHANMODES=%s" \
" CHARSET=%s"
-#define FEATURESVALUES feature_int(FEAT_MAXSILES), MAXMODEPARAMS, \
- feature_int(FEAT_MAXCHANNELSPERUSER), \
- feature_int(FEAT_MAXBANS), NICKLEN, TOPICLEN, \
- TOPICLEN, "+#&", "(ov)@+", "b,k,l,imnpst", "rfc1459"
+#define FEATURESVALUES1 feature_int(FEAT_MAXSILES), MAXMODEPARAMS, \
+ feature_int(FEAT_MAXCHANNELSPERUSER), \
+ feature_int(FEAT_MAXBANS), NICKLEN, TOPICLEN, \
+ TOPICLEN, "+#&"
+
+#define FEATURESVALUES2 "(ov)@+", "b,k,l,imnpst", "rfc1459"
#endif /* INCLUDED_supported_h */
const char* inpath;
char* user;
char* path;
- char* killer;
+ char* comment;
char buf[BUFSIZE];
assert(0 != cptr);
*/
cli_flags(victim) |= FLAGS_KILLED;
+ /*
+ * the first space in path will be at the end of the
+ * opers name:
+ * bla.bla.bla!host.net.dom!opername (comment)
+ */
+ if (!(comment = strchr(path, ' ')))
+ comment = " (No reason given)";
/*
* Tell the victim she/he has been zapped, but *only* if
* the victim is on current server--no sense in sending the
* anyway (as this user don't exist there any more either)
*/
if (MyConnect(victim))
- sendcmdto_one(sptr, CMD_KILL, victim, "%C :%s!%s", victim, NumServ(cptr),
- path);
- /*
- * the first space in path will be at the end of the
- * opers name:
- * bla.bla.bla!host.net.dom!opername (comment)
- */
- if ((killer = strchr(path, ' '))) {
- while (killer > path && '!' != *killer)
- --killer;
- if ('!' == *killer)
- ++killer;
- }
- else
- killer = path;
- ircd_snprintf(0, buf, sizeof(buf), "Killed (%s)", killer);
+ sendcmdto_one(IsServer(sptr) ? &me : sptr, CMD_KILL, victim,
+ "%C :%s!%s", victim, IsServer(sptr) ? "*.undernet.org" :
+ cli_name(sptr), comment);
+
+ ircd_snprintf(0, buf, sizeof(buf), "Killed (%s%s)", IsServer(sptr) ?
+ "*.undernet.org" : cli_name(sptr), comment);
return exit_client(cptr, victim, sptr, buf);
}
inpath = cli_user(sptr)->host;
- ircd_snprintf(0, buf, sizeof(buf), "%s%s (%s)", cli_name(cptr),
- IsOper(sptr) ? "" : "(L)", comment);
+ ircd_snprintf(0, buf, sizeof(buf), "%s (%s)", cli_name(cptr), comment);
path = buf;
/*
*/
cli_flags(victim) |= FLAGS_KILLED;
- ircd_snprintf(0, buf, sizeof(buf), "Killed by %s (%s)", cli_name(sptr),
- comment);
}
else {
/*
* notification chasing the above kill, it won't get far
* anyway (as this user don't exist there any more either)
*/
- sendcmdto_one(sptr, CMD_KILL, victim, "%C :%s!%s", victim, inpath, path);
- ircd_snprintf(0, buf, sizeof(buf), "Local kill by %s (%s)",
- cli_name(sptr), comment);
+ sendcmdto_one(sptr, CMD_KILL, victim, "%C :%s", victim, path);
}
+ ircd_snprintf(0, buf, sizeof(buf), "Killed (%s (%s))", cli_name(sptr),
+ comment);
+
return exit_client(cptr, victim, sptr, buf);
}
}
assert(0 != acptr);
- if (IsServer(acptr)) {
+ if (IsServer(acptr)) { /* shouldn't even happen, actually */
/*
* We have a nickname trying to use the same name as
* a server. Send out a nick collision KILL to remove
/*
* if sptr is a server it is exited here, nothing else to do
*/
- return exit_client(cptr, sptr, &me, "Nick/Server collision");
+ return exit_client_msg(cptr, sptr, &me,
+ "Killed (*.undernet.org (%s <- %s))",
+ cli_name(cli_from(acptr)), cli_name(cptr));
}
/*
assert(!MyConnect(sptr));
cli_flags(sptr) |= FLAGS_KILLED;
- exit_client(cptr, sptr, &me, "Nick collision (you're a ghost)");
+ exit_client(cptr, sptr, &me,
+ "Killed (*.undernet.org (Nick collision))");
/*
* we have killed sptr off, zero out it's pointer so if it's used
* again we'll know about it --Bleep
if (differ) {
sendcmdto_serv_butone(&me, CMD_KILL, acptr, "%C :%s (older nick "
"overruled)", acptr, cli_name(&me));
- if (MyConnect(acptr))
- sendcmdto_one(acptr, CMD_QUIT, cptr, ":Local kill by %s (Ghost)",
- cli_name(&me));
- exit_client(cptr, acptr, &me, "Nick collision (older nick overruled)");
+ if (MyConnect(acptr)) {
+ sendcmdto_one(acptr, CMD_QUIT, cptr, ":Killed (*.undernet.org (older "
+ "nick overruled))");
+ sendcmdto_one(&me, CMD_KILL, acptr, "%C :*.undernet.org (older nick "
+ "overruled)", acptr);
+ }
+ exit_client(cptr, acptr, &me, "Killed (*.undernet.org (older nick "
+ "overruled))");
}
else {
sendcmdto_serv_butone(&me, CMD_KILL, acptr, "%C :%s (nick collision from "
"same user@host)", acptr, cli_name(&me));
- if (MyConnect(acptr))
- sendcmdto_one(acptr, CMD_QUIT, cptr, ":Local kill by %s (Ghost: ",
- "switched servers too fast)", cli_name(&me));
- exit_client(cptr, acptr, &me, "Nick collision (You collided yourself)");
+ if (MyConnect(acptr)) {
+ sendcmdto_one(acptr, CMD_QUIT, cptr, ":Killed (*.undernet.org (nick "
+ "collision from same user@host))");
+ sendcmdto_one(&me, CMD_KILL, acptr, "%C :*.undernet.org (older nick "
+ "overruled)", acptr);
+ }
+ exit_client(cptr, acptr, &me, "Killed (*.undernet.org (nick collision "
+ "from same user@host))");
}
if (lastnick == cli_lastnick(acptr))
return 0;
if (hunt_server_cmd(sptr, CMD_VERSION, cptr, HEAD_IN_SAND_REMOTE, ":%C", 1,
parc, parv) == HUNTED_ISME)
{
- char featurebuf[512];
-
- ircd_snprintf(0, featurebuf, sizeof(featurebuf), FEATURES, FEATURESVALUES);
-
send_reply(sptr, RPL_VERSION, version, debugmode, cli_name(&me),
debug_serveropts());
- send_reply(sptr, RPL_ISUPPORT, featurebuf);
+ send_supported(sptr);
}
return 0;
cli_name(killer), comment);
else
sendrawto_one(victim, MSG_ERROR " :Closing Link: %s by %s (%s)",
- cli_name(victim), cli_name(killer), comment);
+ cli_name(victim), IsServer(killer) ? cli_name(&me) :
+ cli_name(killer), comment);
}
}
if ((IsServer(victim) || IsHandshake(victim) || IsConnecting(victim)) &&
short digitgroups = 0;
struct User* user = cli_user(sptr);
char ip_base64[8];
- char featurebuf[512];
user->last = CurrentTime;
parv[0] = cli_name(sptr);
send_reply(sptr, RPL_YOURHOST, cli_name(&me), version);
send_reply(sptr, RPL_CREATED, creation);
send_reply(sptr, RPL_MYINFO, cli_name(&me), version);
- ircd_snprintf(0, featurebuf, sizeof(featurebuf), FEATURES, FEATURESVALUES);
- send_reply(sptr, RPL_ISUPPORT, featurebuf);
+ send_supported(sptr);
m_lusers(sptr, sptr, 1, parv);
update_load();
motd_signon(sptr);
return 0;
}
+int
+send_supported(struct Client *cptr)
+{
+ char featurebuf[512];
+
+ ircd_snprintf(0, featurebuf, sizeof(featurebuf), FEATURES1, FEATURESVALUES1);
+ send_reply(sptr, RPL_ISUPPORT, featurebuf);
+ ircd_snprintf(0, featurebuf, sizeof(featurebuf), FEATURES2, FEATURESVALUES2);
+ send_reply(sptr, RPL_ISUPPORT, featurebuf);
+
+ return 0; /* convenience return, if it's ever needed */
+}