projects
/
ircu2.10.12-pk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added gnutls backend and moved backend code into new files
[ircu2.10.12-pk.git]
/
ircd
/
m_ping.c
diff --git
a/ircd/m_ping.c
b/ircd/m_ping.c
index 6766b60797b66683e2ecf8dd9aad614116fcf87f..95d747953e3a37d8ede7a9abfac110e0127099f6 100644
(file)
--- a/
ircd/m_ping.c
+++ b/
ircd/m_ping.c
@@
-178,24
+178,15
@@
int m_ping(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
int mo_ping(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
struct Client* acptr;
int mo_ping(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
struct Client* acptr;
- char *destination
, *origin
;
+ char *destination;
assert(0 != cptr);
assert(cptr == sptr);
if (parc < 2 || EmptyString(parv[1]))
return send_reply(sptr, ERR_NOORIGIN);
assert(0 != cptr);
assert(cptr == sptr);
if (parc < 2 || EmptyString(parv[1]))
return send_reply(sptr, ERR_NOORIGIN);
- origin = parv[1];
destination = parv[2]; /* Will get NULL or pointer (parc >= 2!!) */
destination = parv[2]; /* Will get NULL or pointer (parc >= 2!!) */
- if (parc > 3)
- {
- /* AsLL ping, send reply back */
- int diff = atoi(militime_float(parv[3]));
- sendcmdto_one(&me, CMD_PONG, sptr, "%C %s %s %i %s", &me, origin,
- parv[3], diff, militime_float(NULL));
- return 0;
- }
if (!EmptyString(destination) && 0 != ircd_strcmp(destination, cli_name(&me))) {
if ((acptr = FindServer(destination)))
sendcmdto_one(sptr, CMD_PING, acptr, "%C :%s", sptr, destination);
if (!EmptyString(destination) && 0 != ircd_strcmp(destination, cli_name(&me))) {
if ((acptr = FindServer(destination)))
sendcmdto_one(sptr, CMD_PING, acptr, "%C :%s", sptr, destination);
@@
-252,6
+243,14
@@
int ms_ping(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
origin = parv[1];
destination = parv[2]; /* Will get NULL or pointer (parc >= 2!!) */
origin = parv[1];
destination = parv[2]; /* Will get NULL or pointer (parc >= 2!!) */
+ if (parc > 3)
+ {
+ /* AsLL ping, send reply back */
+ int diff = atoi(militime_float(parv[3]));
+ sendcmdto_one(&me, CMD_PONG, sptr, "%C %s %s %i %s", &me, origin,
+ parv[3], diff, militime_float(NULL));
+ return 0;
+ }
if (!EmptyString(destination) && 0 != ircd_strcmp(destination, cli_name(&me))) {
if ((acptr = FindServer(destination))) {
/*
if (!EmptyString(destination) && 0 != ircd_strcmp(destination, cli_name(&me))) {
if ((acptr = FindServer(destination))) {
/*