| 30 |
|
#include "numeric.h" |
| 31 |
|
#include "s_user.h" |
| 32 |
|
#include "send.h" |
| 33 |
– |
#include "s_conf.h" |
| 33 |
|
#include "msg.h" |
| 34 |
|
#include "parse.h" |
| 35 |
|
#include "modules.h" |
| 36 |
+ |
#include "listener.h" |
| 37 |
|
|
| 38 |
|
|
| 39 |
< |
static void mr_user(struct Client*, struct Client*, int, char**); |
| 39 |
> |
static void mr_user(struct Client *, struct Client *, int, char *[]); |
| 40 |
|
|
| 41 |
|
struct Message user_msgtab = { |
| 42 |
|
"USER", 0, 0, 5, 0, MFLG_SLOW, 0L, |
| 43 |
< |
{mr_user, m_registered, m_ignore, m_ignore, m_registered, m_ignore} |
| 43 |
> |
{ mr_user, m_registered, m_ignore, m_ignore, m_registered, m_ignore } |
| 44 |
|
}; |
| 45 |
|
|
| 46 |
|
#ifndef STATIC_MODULES |
| 59 |
|
const char *_version = "$Revision$"; |
| 60 |
|
#endif |
| 61 |
|
|
| 62 |
+ |
|
| 63 |
|
/* |
| 64 |
|
** mr_user |
| 65 |
|
** parv[0] = sender prefix |
| 74 |
|
{ |
| 75 |
|
char *p; |
| 76 |
|
|
| 77 |
< |
if ((p = strchr(parv[1],'@')) != NULL) |
| 77 |
> |
if (source_p->localClient->listener->flags & LISTENER_SERVER) |
| 78 |
> |
{ |
| 79 |
> |
exit_client(source_p, &me, "Use a different port"); |
| 80 |
> |
return; |
| 81 |
> |
} |
| 82 |
> |
|
| 83 |
> |
if ((p = strchr(parv[1], '@')) != NULL) |
| 84 |
|
*p = '\0'; |
| 85 |
|
|
| 86 |
< |
if (*parv[4] == '\0') |
| 86 |
> |
if (EmptyString(parv[4])) |
| 87 |
|
{ |
| 88 |
< |
sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), |
| 89 |
< |
me.name, EmptyString(parv[0]) ? "*" : parv[0], "USER"); |
| 88 |
> |
sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, |
| 89 |
> |
source_p->name[0] ? source_p->name : "*", "USER"); |
| 90 |
|
return; |
| 91 |
|
} |
| 92 |
|
|