41 |
|
sendhelpfile(struct Client *source_p, const char *path, const char *topic) |
42 |
|
{ |
43 |
|
FILE *file = NULL; |
44 |
< |
char line[HELPLEN] = { '\0' }; |
44 |
> |
char line[HELPLEN] = ""; |
45 |
|
|
46 |
|
if ((file = fopen(path, "r")) == NULL) |
47 |
|
{ |
73 |
|
static void |
74 |
|
do_help(struct Client *source_p, char *topic) |
75 |
|
{ |
76 |
– |
char *p = topic; |
76 |
|
char h_index[] = "index"; |
77 |
|
char path[HYB_PATH_MAX + 1]; |
78 |
|
struct stat sb; |
80 |
|
if (EmptyString(topic)) |
81 |
|
topic = h_index; |
82 |
|
else |
83 |
< |
for (; *p; ++p) |
83 |
> |
for (char *p = topic; *p; ++p) |
84 |
|
*p = ToLower(*p); |
85 |
|
|
86 |
|
if (strpbrk(topic, "/\\")) |
128 |
|
{ |
129 |
|
static time_t last_used = 0; |
130 |
|
|
131 |
< |
/* HELP is always local */ |
133 |
< |
if ((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime) |
131 |
> |
if ((last_used + ConfigGeneral.pace_wait_simple) > CurrentTime) |
132 |
|
{ |
135 |
– |
/* safe enough to give this on a local connect only */ |
133 |
|
sendto_one_numeric(source_p, &me, RPL_LOAD2HI); |
134 |
|
return 0; |
135 |
|
} |
160 |
|
|
161 |
|
static struct Message help_msgtab = |
162 |
|
{ |
163 |
< |
"HELP", 0, 0, 0, MAXPARA, MFLG_SLOW, 0, |
163 |
> |
"HELP", NULL, 0, 0, 0, MAXPARA, MFLG_SLOW, 0, |
164 |
|
{ m_unregistered, m_help, m_ignore, m_ignore, mo_help, m_ignore } |
165 |
|
}; |
166 |
|
|