Log message:
Last of the bug fixes for do_kill()
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@672
c9e4aea6-c8fd-4c43-8297-
357d70d61c8c
2002-03-10 Joseph Bongaarts <foxxe@wtfs.net>
2002-03-10 Joseph Bongaarts <foxxe@wtfs.net>
+ * ircd/m_kill.c: Last of the bug fixes for do_kill()
+
* ircd/list.c: Don't remove clients from the linked list
that aren't actually in the list.
* ircd/list.c: Don't remove clients from the linked list
that aren't actually in the list.
*
*/
static int do_kill(struct Client* cptr, struct Client* sptr,
*
*/
static int do_kill(struct Client* cptr, struct Client* sptr,
- struct Client* victim, char* path)
+ struct Client* victim, char* inpath, char* path)
char* comment;
char buf[BUFSIZE];
char* comment;
char buf[BUFSIZE];
assert(0 != sptr);
assert(IsUser(victim));
assert(0 != sptr);
assert(IsUser(victim));
+ if (!MyConnect || IsServer(sptr))
+ {
if (!(comment = strchr(path, ' ')))
comment = "No reason supplied";
else
if (!(comment = strchr(path, ' ')))
comment = "No reason supplied";
else
* Note: "victim->name" is used instead of "user" because we may
* have changed the target because of the nickname change.
*/
* Note: "victim->name" is used instead of "user" because we may
* have changed the target because of the nickname change.
*/
- inpath = IsServer(sptr) ? cli_name(cptr) : cli_user(sptr)->host;
-
sendto_opmask_butone(0, IsServer(sptr) ? SNO_SERVKILL : SNO_OPERKILL,
"Received KILL message for %s. From %s Path: %s!%s",
sendto_opmask_butone(0, IsServer(sptr) ? SNO_SERVKILL : SNO_OPERKILL,
"Received KILL message for %s. From %s Path: %s!%s",
- get_client_name(victim, SHOW_IP), cli_name(cptr),
+ get_client_name(victim, SHOW_IP), cli_name(sptr),
inpath, comment);
log_write_kill(victim, sptr, inpath, path);
inpath, comment);
log_write_kill(victim, sptr, inpath, path);
sendcmdto_one(&me, CMD_KILL, cptr, "%C :%s (Ghost 5 Numeric Collided)",
victim, path);
}
sendcmdto_one(&me, CMD_KILL, cptr, "%C :%s (Ghost 5 Numeric Collided)",
victim, path);
}
- return do_kill(cptr, sptr, victim, path);
+ return do_kill(cptr, sptr, victim, cli_name(cptr), path);
sptr, cli_name(victim));
return 0;
}
sptr, cli_name(victim));
return 0;
}
- return do_kill(cptr, sptr, victim, path);
+ return do_kill(cptr, sptr, victim, cli_user(sptr)->host, path);