-
- /*
- * The kill originates from this server, initialize path.
- * (In which case the 'path' may contain user suplied
- * explanation ...or some nasty comment, sigh... >;-)
- *
- * ...!operhost!oper
- * ...!operhost!oper (comment)
- */
-
- comment = parv[parc - 1]; /* Either defined or NULL (parc >= 3) */
-
- if (strlen(comment) > TOPICLEN)
- comment[TOPICLEN] = '\0';
-
- inpath = cli_user(sptr)->host;
-
- ircd_snprintf(0, buf, sizeof(buf), "%s%s (%s)", cli_name(cptr),
- IsOper(sptr) ? "" : "(L)", comment);
- path = buf;
-
- /*
- * Notify all *local* opers about the KILL (this includes the one
- * originating the kill, if from this server--the special numeric
- * reply message is not generated anymore).
- *
- * Note: "victim->name" is used instead of "user" because we may
- * have changed the target because of the nickname change.
- */
- sendto_opmask_butone(0, SNO_OPERKILL,
- "Received KILL message for %s. From %s Path: %s!%s",
- get_client_name(victim,SHOW_IP), parv[0], inpath, path);
-
- log_write_kill(victim, sptr, inpath, path);
- /*
- * And pass on the message to other servers. Note, that if KILL
- * was changed, the message has to be sent to all links, also
- * back.
- * Suicide kills are NOT passed on --SRB
- */
- if (!MyConnect(victim)) {
- sendcmdto_serv_butone(sptr, CMD_KILL, cptr, "%C :%s!%s", victim, inpath,
- path);
-
- /*
- * Set FLAGS_KILLED. This prevents exit_one_client from sending
- * the unnecessary QUIT for this. (This flag should never be
- * set in any other place)
- */
- cli_flags(victim) |= FLAGS_KILLED;
-
- ircd_snprintf(0, buf, sizeof(buf), "Killed by %s (%s)", cli_name(sptr),
- comment);
- }
- else {
- /*
- * Tell the victim she/he has been zapped, but *only* if
- * the victim is on current server--no sense in sending the
- * 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);
- }
-
- return exit_client(cptr, victim, sptr, buf);