X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fm_rping.c;h=1db4b239174a047c2bd6d70eb4b08eaf4cdf324d;hb=refs%2Fheads%2Fupstream;hp=905dbf565474de3de673f36d6e05e1b700a9e572;hpb=583a9e32f05276009791bb504b9e8330202c5378;p=ircu2.10.12-pk.git diff --git a/ircd/m_rping.c b/ircd/m_rping.c index 905dbf5..1db4b23 100644 --- a/ircd/m_rping.c +++ b/ircd/m_rping.c @@ -79,17 +79,12 @@ * note: it is guaranteed that parv[0]..parv[parc-1] are all * non-NULL pointers. */ -#if 0 -/* - * No need to include handlers.h here the signatures must match - * and we don't need to force a rebuild of all the handlers everytime - * we add a new one to the list. --Bleep - */ -#include "handlers.h" -#endif /* 0 */ +#include "config.h" + #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -99,7 +94,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* @@ -151,7 +146,7 @@ int ms_rping(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) * if it's not for me, pass it on */ if (IsMe(destination)) - sendcmdto_one(&me, CMD_RPONG, sptr, "%s %s %s %s :%s", sptr->name, + sendcmdto_one(&me, CMD_RPONG, sptr, "%s %s %s %s :%s", cli_name(sptr), parv[2], parv[3], parv[4], parv[5]); else sendcmdto_one(sptr, CMD_RPING, destination, "%C %s %s %s :%s", @@ -160,9 +155,6 @@ int ms_rping(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) } else { if (parc < 3) { - /* - * PROTOCOL ERROR - */ return need_more_params(sptr, "RPING"); } /* @@ -219,7 +211,7 @@ int mo_rping(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) if (parc > 2) { if ((acptr = find_match_server(parv[2])) && !IsMe(acptr)) { - parv[2] = acptr->name; + parv[2] = cli_name(acptr); if (3 == parc) { /* * const_cast(start_time); @@ -243,73 +235,3 @@ int mo_rping(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) return 0; } - -#if 0 -/* - * m_rping -- by Run - * - * parv[0] = sender (sptr->name thus) - * if sender is a person: (traveling towards start server) - * parv[1] = pinged server[mask] - * parv[2] = start server (current target) - * parv[3] = optional remark - * if sender is a server: (traveling towards pinged server) - * parv[1] = pinged server (current target) - * parv[2] = original sender (person) - * parv[3] = start time in s - * parv[4] = start time in us - * parv[5] = the optional remark - */ -int m_rping(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) -{ - struct Client *acptr; - - if (!IsPrivileged(sptr)) - return 0; - - if (parc < (IsAnOper(sptr) ? (MyConnect(sptr) ? 2 : 3) : 6)) - { - return need_more_params(sptr, "RPING"); - return 0; - } - if (MyUser(sptr)) - { - if (parc == 2) - parv[parc++] = me.name; - else if (!(acptr = find_match_server(parv[2]))) - { - parv[3] = parv[2]; - parv[2] = me.name; - parc++; - } - else - parv[2] = acptr->name; - if (parc == 3) - parv[parc++] = ""; - } - - if (IsAnOper(sptr)) - { - if (hunt_server(1, cptr, sptr, "%s%s " TOK_RPING " %s %s :%s", 2, parc, parv) != /* XXX DEAD */ - HUNTED_ISME) - return 0; - if (!(acptr = find_match_server(parv[1])) || !IsServer(acptr)) - { - sendto_one(sptr, err_str(ERR_NOSUCHSERVER), me.name, parv[0], parv[1]); /* XXX DEAD */ - return 0; - } - sendto_one(acptr, ":%s RPING %s %s %s :%s", /* XXX DEAD */ - me.name, NumServ(acptr), sptr->name, militime(0, 0), parv[3]); - } - else - { - if (hunt_server(1, cptr, sptr, "%s%s " TOK_RPING " %s %s %s %s :%s", 1, parc, parv) /* XXX DEAD */ - != HUNTED_ISME) - return 0; - sendto_one(cptr, ":%s RPONG %s %s %s %s :%s", me.name, parv[0], /* XXX DEAD */ - parv[2], parv[3], parv[4], parv[5]); - } - return 0; -} -#endif /* 0 */ -