37 |
#include "modules.h" |
#include "modules.h" |
38 |
#include "s_conf.h" |
#include "s_conf.h" |
39 |
|
|
40 |
static void mr_motd(struct Client *, struct Client *, int, char **); |
static void mr_motd(struct Client *, struct Client *, int, char *[]); |
41 |
static void m_motd(struct Client*, struct Client*, int, char**); |
static void m_motd(struct Client*, struct Client*, int, char *[]); |
42 |
static void mo_motd(struct Client*, struct Client*, int, char**); |
static void mo_motd(struct Client*, struct Client*, int, char *[]); |
43 |
|
|
44 |
/* |
/* |
45 |
* note regarding mo_motd being used twice: |
* note regarding mo_motd being used twice: |
89 |
mr_motd(struct Client *client_p, struct Client *source_p, |
mr_motd(struct Client *client_p, struct Client *source_p, |
90 |
int parc, char *parv[]) |
int parc, char *parv[]) |
91 |
{ |
{ |
92 |
|
ClearCap(client_p, CAP_TS6); |
93 |
/* allow unregistered clients to see the motd, but exit them */ |
/* allow unregistered clients to see the motd, but exit them */ |
94 |
send_message_file(source_p, &ConfigFileEntry.motd); |
send_message_file(source_p, &ConfigFileEntry.motd); |
95 |
exit_client(source_p, source_p, "Client Exit after MOTD"); |
exit_client(source_p, source_p, "Client Exit after MOTD"); |
109 |
if ((last_used + ConfigFileEntry.pace_wait) > CurrentTime) |
if ((last_used + ConfigFileEntry.pace_wait) > CurrentTime) |
110 |
{ |
{ |
111 |
/* safe enough to give this on a local connect only */ |
/* safe enough to give this on a local connect only */ |
112 |
sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name); |
sendto_one(source_p, form_str(RPL_LOAD2HI), |
113 |
|
me.name, source_p->name); |
114 |
return; |
return; |
115 |
} |
} |
116 |
else |
|
117 |
last_used = CurrentTime; |
last_used = CurrentTime; |
118 |
|
|
119 |
/* This is safe enough to use during non hidden server mode */ |
/* This is safe enough to use during non hidden server mode */ |
120 |
if (!ConfigFileEntry.disable_remote && !ConfigServerHide.hide_servers) |
if (!ConfigFileEntry.disable_remote && !ConfigServerHide.hide_servers) |
121 |
{ |
if (hunt_server(client_p, source_p, ":%s MOTD :%s", 1, parc, parv) |
122 |
if (hunt_server(client_p, source_p, ":%s MOTD :%s", 1,parc,parv)!=HUNTED_ISME) |
!= HUNTED_ISME) |
123 |
return; |
return; |
|
} |
|
124 |
|
|
125 |
#ifdef STATIC_MODULES |
#ifdef STATIC_MODULES |
126 |
send_message_file(source_p, &ConfigFileEntry.motd); |
send_message_file(source_p, &ConfigFileEntry.motd); |