| 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} |
| 44 |
> |
{ m_unregistered, m_time, mo_time, m_ignore, mo_time, m_ignore } |
| 45 |
|
}; |
| 46 |
|
|
| 47 |
|
#ifndef STATIC_MODULES |
| 59 |
|
|
| 60 |
|
const char *_version = "$Revision$"; |
| 61 |
|
#endif |
| 62 |
+ |
|
| 63 |
|
/* |
| 64 |
|
* m_time |
| 65 |
|
* parv[0] = sender prefix |
| 70 |
|
int parc, char *parv[]) |
| 71 |
|
{ |
| 72 |
|
/* this is not rate limited, so end the grace period */ |
| 73 |
< |
if(MyClient(source_p) && !IsFloodDone(source_p)) |
| 73 |
> |
if (!IsFloodDone(source_p)) |
| 74 |
|
flood_endgrace(source_p); |
| 75 |
|
|
| 76 |
|
/* This is safe enough to use during non hidden server mode */ |
| 77 |
< |
if(!ConfigFileEntry.disable_remote) |
| 78 |
< |
{ |
| 79 |
< |
if (hunt_server(client_p,source_p,":%s TIME :%s",1,parc,parv) != HUNTED_ISME) |
| 79 |
< |
return; |
| 80 |
< |
} |
| 77 |
> |
if (!ConfigFileEntry.disable_remote) |
| 78 |
> |
if (hunt_server(client_p,source_p,":%s TIME :%s",1,parc,parv) != HUNTED_ISME) |
| 79 |
> |
return; |
| 80 |
|
|
| 81 |
|
sendto_one(source_p, form_str(RPL_TIME), me.name, |
| 82 |
< |
parv[0], me.name, date(0)); |
| 82 |
> |
source_p->name, me.name, date(0)); |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
/* |
| 89 |
|
*/ |
| 90 |
|
static void |
| 91 |
|
mo_time(struct Client *client_p, struct Client *source_p, |
| 92 |
< |
int parc, char *parv[]) |
| 92 |
> |
int parc, char *parv[]) |
| 93 |
|
{ |
| 94 |
|
if (hunt_server(client_p,source_p,":%s TIME :%s",1,parc,parv) == HUNTED_ISME) |
| 95 |
|
sendto_one(source_p, form_str(RPL_TIME), me.name, |
| 96 |
< |
parv[0], me.name, date(0)); |
| 96 |
> |
source_p->name, me.name, date(0)); |
| 97 |
|
} |