23 |
|
*/ |
24 |
|
|
25 |
|
#include "stdinc.h" |
26 |
+ |
#include "list.h" |
27 |
|
#include "ircd.h" |
28 |
|
#include "handlers.h" |
29 |
|
#include "s_user.h" |
37 |
|
#include "parse.h" |
38 |
|
#include "modules.h" |
39 |
|
|
40 |
< |
static void mr_pong(struct Client *, struct Client *, int, char **); |
41 |
< |
static void ms_pong(struct Client *, struct Client *, int, char **); |
40 |
> |
static void mr_pong(struct Client *, struct Client *, int, char *[]); |
41 |
> |
static void ms_pong(struct Client *, struct Client *, int, char *[]); |
42 |
|
|
43 |
|
struct Message pong_msgtab = { |
44 |
|
"PONG", 0, 0, 1, 0, MFLG_SLOW | MFLG_UNREG, 0, |
45 |
|
{mr_pong, m_ignore, ms_pong, m_ignore, m_ignore, m_ignore} |
46 |
|
}; |
47 |
|
|
47 |
– |
#ifndef STATIC_MODULES |
48 |
|
void |
49 |
|
_modinit(void) |
50 |
|
{ |
58 |
|
} |
59 |
|
|
60 |
|
const char *_version = "$Revision$"; |
61 |
– |
#endif |
61 |
|
|
62 |
|
static void |
63 |
|
ms_pong(struct Client *client_p, struct Client *source_p, |
66 |
|
struct Client *target_p; |
67 |
|
const char *origin, *destination; |
68 |
|
|
69 |
< |
if (parc < 2 || *parv[1] == '\0') |
69 |
> |
if (parc < 2 || EmptyString(parv[1])) |
70 |
|
{ |
71 |
|
sendto_one(source_p, form_str(ERR_NOORIGIN), |
72 |
|
me.name, parv[0]); |
114 |
|
{ |
115 |
|
if (source_p->localClient->random_ping == incoming_ping) |
116 |
|
{ |
118 |
– |
char buf[USERLEN + 1]; |
119 |
– |
|
120 |
– |
strlcpy(buf, source_p->username, sizeof(buf)); |
117 |
|
SetPingCookie(source_p); |
118 |
< |
register_local_user(client_p, source_p, source_p->name, buf); |
118 |
> |
register_local_user(source_p); |
119 |
|
} |
120 |
|
else |
121 |
|
{ |
129 |
|
else |
130 |
|
sendto_one(source_p, form_str(ERR_NOORIGIN), me.name, parv[0]); |
131 |
|
} |
136 |
– |
|