36 |
|
#include "modules.h" |
37 |
|
#include "packet.h" |
38 |
|
|
39 |
< |
static void m_time(struct Client*, struct Client*, int, char**); |
40 |
< |
static void mo_time(struct Client*, struct Client*, int, char**); |
39 |
> |
static void m_time(struct Client *, struct Client *, int, char *[]); |
40 |
> |
static void mo_time(struct Client *, struct Client *, int, char *[]); |
41 |
|
|
42 |
|
struct Message time_msgtab = { |
43 |
< |
"TIME", 0, 0, 0, 0, MFLG_SLOW, 0, |
44 |
< |
{m_unregistered, m_time, mo_time, m_ignore, mo_time, m_ignore} |
43 |
> |
"TIME", 0, 0, 0, MAXPARA, MFLG_SLOW, 0, |
44 |
> |
{ m_unregistered, m_time, mo_time, m_ignore, mo_time, m_ignore } |
45 |
|
}; |
46 |
|
|
47 |
– |
#ifndef STATIC_MODULES |
47 |
|
void |
48 |
|
_modinit(void) |
49 |
|
{ |
57 |
|
} |
58 |
|
|
59 |
|
const char *_version = "$Revision$"; |
60 |
< |
#endif |
60 |
> |
|
61 |
|
/* |
62 |
|
* m_time |
63 |
|
* parv[0] = sender prefix |
68 |
|
int parc, char *parv[]) |
69 |
|
{ |
70 |
|
/* this is not rate limited, so end the grace period */ |
71 |
< |
if(MyClient(source_p) && !IsFloodDone(source_p)) |
71 |
> |
if (!IsFloodDone(source_p)) |
72 |
|
flood_endgrace(source_p); |
73 |
|
|
74 |
|
/* This is safe enough to use during non hidden server mode */ |
75 |
< |
if(!ConfigFileEntry.disable_remote) |
76 |
< |
{ |
77 |
< |
if (hunt_server(client_p,source_p,":%s TIME :%s",1,parc,parv) != HUNTED_ISME) |
79 |
< |
return; |
80 |
< |
} |
75 |
> |
if (!ConfigFileEntry.disable_remote) |
76 |
> |
if (hunt_server(client_p,source_p,":%s TIME :%s",1,parc,parv) != HUNTED_ISME) |
77 |
> |
return; |
78 |
|
|
79 |
|
sendto_one(source_p, form_str(RPL_TIME), me.name, |
80 |
< |
parv[0], me.name, date(0)); |
80 |
> |
source_p->name, me.name, date(0)); |
81 |
|
} |
82 |
|
|
83 |
|
/* |
87 |
|
*/ |
88 |
|
static void |
89 |
|
mo_time(struct Client *client_p, struct Client *source_p, |
90 |
< |
int parc, char *parv[]) |
90 |
> |
int parc, char *parv[]) |
91 |
|
{ |
92 |
|
if (hunt_server(client_p,source_p,":%s TIME :%s",1,parc,parv) == HUNTED_ISME) |
93 |
|
sendto_one(source_p, form_str(RPL_TIME), me.name, |
94 |
< |
parv[0], me.name, date(0)); |
94 |
> |
source_p->name, me.name, date(0)); |
95 |
|
} |