| 23 |
|
*/ |
| 24 |
|
|
| 25 |
|
#include "stdinc.h" |
| 26 |
< |
#include "tools.h" |
| 26 |
> |
#include "list.h" |
| 27 |
|
#include "handlers.h" |
| 28 |
|
#include "channel.h" |
| 29 |
|
#include "channel_mode.h" |
| 35 |
|
#include "s_conf.h" |
| 36 |
|
#include "s_serv.h" |
| 37 |
|
#include "send.h" |
| 38 |
– |
#include "list.h" |
| 38 |
|
#include "msg.h" |
| 39 |
|
#include "parse.h" |
| 40 |
|
#include "modules.h" |
| 41 |
|
#include "s_user.h" |
| 42 |
|
|
| 43 |
< |
static void m_list(struct Client *, struct Client *, int, char **); |
| 44 |
< |
static void mo_list(struct Client *, struct Client *, int, char **); |
| 43 |
> |
static void m_list(struct Client *, struct Client *, int, char *[]); |
| 44 |
> |
static void mo_list(struct Client *, struct Client *, int, char *[]); |
| 45 |
|
|
| 46 |
|
struct Message list_msgtab = { |
| 47 |
|
"LIST", 0, 0, 0, 0, MFLG_SLOW, 0, |
| 48 |
|
{m_unregistered, m_list, m_ignore, m_ignore, mo_list, m_ignore} |
| 49 |
|
}; |
| 50 |
|
|
| 52 |
– |
#ifndef STATIC_MODULES |
| 51 |
|
void |
| 52 |
|
_modinit(void) |
| 53 |
|
{ |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
const char *_version = "$Revision$"; |
| 70 |
– |
#endif |
| 68 |
|
|
| 69 |
|
static int |
| 70 |
|
has_wildcards(const char *s) |
| 101 |
|
|
| 102 |
|
if (parc > 1) |
| 103 |
|
{ |
| 104 |
< |
char *opt, *save; |
| 104 |
> |
char *opt, *save = NULL; |
| 105 |
|
dlink_list *list; |
| 106 |
|
int i, errors = 0; |
| 107 |
|
|
| 110 |
|
switch (*opt) |
| 111 |
|
{ |
| 112 |
|
case '<': if ((i = atoi(opt + 1)) > 0) |
| 113 |
< |
lt->users_max = (unsigned int) i - 1; |
| 113 |
> |
lt->users_max = (unsigned int) i - 1; |
| 114 |
|
else |
| 115 |
< |
errors = 1; |
| 116 |
< |
break; |
| 115 |
> |
errors = 1; |
| 116 |
> |
break; |
| 117 |
|
case '>': if ((i = atoi(opt + 1)) >= 0) |
| 118 |
< |
lt->users_min = (unsigned int) i + 1; |
| 119 |
< |
else |
| 120 |
< |
errors = 1; |
| 121 |
< |
break; |
| 118 |
> |
lt->users_min = (unsigned int) i + 1; |
| 119 |
> |
else |
| 120 |
> |
errors = 1; |
| 121 |
> |
break; |
| 122 |
|
case '-': break; |
| 123 |
|
case 'C': |
| 124 |
< |
case 'c': switch (*++opt) |
| 125 |
< |
{ |
| 124 |
> |
case 'c': switch (*++opt) |
| 125 |
> |
{ |
| 126 |
|
case '<': if ((i = atoi(opt + 1)) >= 0) |
| 127 |
|
lt->created_max = (unsigned int) (CurrentTime |
| 128 |
|
- 60 * i); |
| 181 |
|
{ |
| 182 |
|
free_list_task(lt, source_p); |
| 183 |
|
sendto_one(source_p, form_str(ERR_LISTSYNTAX), |
| 184 |
< |
MyConnect(source_p) ? me.name : ID(&me), |
| 188 |
< |
MyConnect(source_p) ? source_p->name : ID(source_p)); |
| 184 |
> |
me.name, source_p->name); |
| 185 |
|
return; |
| 186 |
|
} |
| 187 |
|
} |
| 190 |
|
dlinkAdd(source_p, make_dlink_node(), &listing_client_list); |
| 191 |
|
|
| 192 |
|
sendto_one(source_p, form_str(RPL_LISTSTART), |
| 193 |
< |
MyConnect(source_p) ? me.name : ID(&me), |
| 198 |
< |
MyConnect(source_p) ? source_p->name : ID(source_p)); |
| 193 |
> |
me.name, source_p->name); |
| 194 |
|
safe_list_channels(source_p, lt, no_masked_channels && |
| 195 |
< |
lt->show_mask.head != NULL, !MyConnect(source_p)); |
| 195 |
> |
lt->show_mask.head != NULL); |
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
/* |
| 208 |
|
|
| 209 |
|
if (((last_used + ConfigFileEntry.pace_wait) > CurrentTime)) |
| 210 |
|
{ |
| 211 |
< |
sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,parv[0]); |
| 211 |
> |
sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, parv[0]); |
| 212 |
|
return; |
| 213 |
|
} |
| 214 |
|
|