Author: Isomer <isomer@coders.net>
[ircu2.10.12-pk.git] / ircd / m_ping.c
index f0de8a8730fda153759854d8e22d33f328b717c1..0d6c689502740c0b6c75080023263b0fe7816506 100644 (file)
  * parv[2] = destination
  */
 int m_ping(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
+{
+  assert(0 != cptr);
+  assert(cptr == sptr);
+
+  if (parc < 2 || EmptyString(parv[1]))
+    return send_reply(sptr, ERR_NOORIGIN);
+
+  sendcmdto_one(&me, CMD_PONG, sptr, "%C :%s", &me, origin);
+  return 0;
+}
+
+/*
+ * mo_ping - oper message handler
+ *
+ * parv[0] = sender prefix
+ * parv[1] = origin
+ * parv[2] = destination
+ */
+int mo_ping(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 {
   struct Client* acptr;
   char*          destination;