ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid-7.3/modules/m_user.c
(Generate patch)

Comparing ircd-hybrid-7.2/modules/m_user.c (file contents):
Revision 34 by lusky, Sun Oct 2 21:05:51 2005 UTC vs.
Revision 900 by michael, Sun Nov 4 13:49:52 2007 UTC

# Line 30 | Line 30
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
# Line 59 | Line 59 | _moddeinit(void)
59   const char *_version = "$Revision$";
60   #endif
61  
62 +
63   /*
64   ** mr_user
65   **      parv[0] = sender prefix
# Line 73 | Line 74 | mr_user(struct Client *client_p, struct
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines