CmdHashEntry *irc_cmd_hash[CMD_HASH_SIZE];
extern void m_error(char *, uint, char **);
+extern void m_kill(char *, uint, char **);
extern void m_nick(char *, uint, char **);
extern void m_pass(char *, uint, char **);
extern void m_ping(char *, uint, char **);
IRC_SRCS = \
irc/m_error.c \
+ irc/m_kill.c \
irc/m_nick.c \
irc/m_pass.c \
irc/m_ping.c \
static CmdHashEntry irc_commands[] =
{
{ "ERROR", AC_NA, 0, m_error },
+ { "KILL", AC_NA, 0, m_kill },
{ "NICK", AC_NA, 0, m_nick },
{ "PASS", AC_NA, 0, m_pass },
{ "PING", AC_NA, 0, m_ping },
--- /dev/null
+/* praxis: services for TSora IRC networks.
+ * src/irc/m_kill.c: Handles IRC's KILL message.
+ *
+ * Copyright (c) 2004 Eric Will <rakaur@malkier.net>
+ * Copyright (c) 2003-2004 shrike development team.
+ *
+ * $Id$
+ */
+
+#include "praxis.h"
+#include "dlink.h"
+#include "balloc.h"
+#include "connection.h"
+#include "ilog.h"
+#include "irc.h"
+#include "send.h"
+#include "server.h"
+#include "uplink.h"
+#include "user.h"
+
+/* :<origin> KILL <target> :<path/reason>
+ *
+ * parv[0] = target
+ * parv[1] = path/reason (not used)
+ */
+void
+m_kill(char *origin, uint parc, char *parv[])
+{
+ if (parc > 2)
+ {
+ ilog(L_ERROR, "m_kill(): Got user kill with too few parameters");
+
+ return;
+ }
+
+ ilog(L_DEBUG2, "m_kill(): User killed: %s by %s", parv[0], origin);
+
+ if (curr_uplink->ts_version == 6)
+ userFindUIDDelete(parv[0]);
+ else
+ userFindNickDelete(parv[0]);
+
+ /* XXX - check to see if they killed our clients */
+}
if (curr_uplink->ts_version == 6)
{
- server_p = serverFindSID(parv[0]);
-
- /* I'm not sure if this is a bug with ircd-ratbox or what:
- * On the initial burst, we get a TS6 to emulate EOB.
+ /* On the initial burst, we get a TS6 to emulate EOB.
* However, all PINGs from there on out are TS5.
* I'm not sure if that's "the right thing to do,"
- * but we'll try TS6 first and fall back to TS5.
+ * but we'll try TS5 first and fall back to TS6.
* We'll also send back a TS6 PONG regardless.
*
+ * androsyn tells me this is done because hybrid-7.1
+ * chokes on SIDs in PING... still doesn't explain
+ * the TS6 EOB PING though.
+ *
* In the long run this doesn't matter; any
- * activity on the line registers as a reply.
- * But it bugs me.
+ * activity on the line registers as a reply,
+ * but it still bugs me.
*/
+ server_p = serverFindName(parv[0]);
+
if (server_p == NULL)
- server_p = serverFindName(parv[0]);
+ server_p = serverFindSID(parv[0]);
iassert(server_p != NULL);
* Copyright (c) 2004 Eric Will <rakaur@malkier.net>
* Copyright (c) 2003-2004 shrike development team.
*
- * $Id: m_sid.c 2 2004-06-29 05:30:31Z rakaur $
+ * $Id$
*/
#include "praxis.h"
* Copyright (c) 2004 Eric Will <rakaur@malkier.net>
* Copyright (c) 2003-2004 shrike development team.
*
- * $Id: m_server.c 2 2004-06-29 05:30:31Z rakaur $
+ * $Id$
*/
#include "praxis.h"