/[svn]/ircd-hybrid/branches/8.0.x/modules/core/m_nick.c
ViewVC logotype

Diff of /ircd-hybrid/branches/8.0.x/modules/core/m_nick.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1684 by michael, Sat Oct 27 21:09:19 2012 UTC revision 1685 by michael, Wed Dec 19 20:24:52 2012 UTC
# Line 194  mr_nick(struct Client *client_p, struct Line 194  mr_nick(struct Client *client_p, struct
194          int parc, char *parv[])          int parc, char *parv[])
195  {  {
196    struct Client *target_p = NULL;    struct Client *target_p = NULL;
197      struct ConfItem *conf = NULL;
198    char nick[NICKLEN + 1];    char nick[NICKLEN + 1];
199    char *s = NULL;    char *s = NULL;
200    
# Line 220  mr_nick(struct Client *client_p, struct Line 221  mr_nick(struct Client *client_p, struct
221    }    }
222    
223    /* check if the nick is resv'd */    /* check if the nick is resv'd */
224    if (find_matching_name_conf(NRESV_TYPE, nick, NULL, NULL, 0) &&    if (!IsExemptResv(source_p))
       !IsExemptResv(source_p))  
225    {    {
226      sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME), me.name,      if ((conf = find_matching_name_conf(NRESV_TYPE, nick, NULL, NULL, 0)))
227                 source_p->name[0] ? source_p->name : "*", nick);      {
228      sendto_realops_flags(L_ALL, UMODE_REJ,        struct MatchItem *mi = map_to_conf(conf);
229                           "Forbidding reserved nick [%s] from user %s",        ++mi->count;
230                           nick, get_client_name(client_p, HIDE_IP));  
231      return;        sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME), me.name,
232                     source_p->name[0] ? source_p->name : "*", nick);
233          sendto_realops_flags(L_ALL, UMODE_REJ,
234                               "Forbidding reserved nick [%s] from user %s",
235                               nick, get_client_name(client_p, HIDE_IP));
236          return;
237        }
238    }    }
239    
240    if ((target_p = hash_find_client(nick)) == NULL)    if ((target_p = hash_find_client(nick)) == NULL)
# Line 260  m_nick(struct Client *client_p, struct C Line 266  m_nick(struct Client *client_p, struct C
266  {  {
267    char nick[NICKLEN + 1];    char nick[NICKLEN + 1];
268    struct Client *target_p = NULL;    struct Client *target_p = NULL;
269      struct ConfItem *conf = NULL;
270    
271    assert(source_p == client_p);    assert(source_p == client_p);
272    
# Line 285  m_nick(struct Client *client_p, struct C Line 292  m_nick(struct Client *client_p, struct C
292      return;      return;
293    }    }
294    
295    if (find_matching_name_conf(NRESV_TYPE, nick,    if (!IsExemptResv(source_p) && !(HasUMode(source_p, UMODE_OPER) &&
296                               NULL, NULL, 0) && !IsExemptResv(source_p) &&                                     ConfigFileEntry.oper_pass_resv))
      !(HasUMode(source_p, UMODE_OPER) && ConfigFileEntry.oper_pass_resv))  
297    {    {
298      sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME),      if ((conf = find_matching_name_conf(NRESV_TYPE, nick, NULL, NULL, 0)))
299                 me.name, source_p->name, nick);      {
300      sendto_realops_flags(L_ALL, UMODE_REJ,        struct MatchItem *mi = map_to_conf(conf);
301                           "Forbidding reserved nick [%s] from user %s",        ++mi->count;
302                           nick, get_client_name(client_p, HIDE_IP));        sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME),
303      return;                   me.name, source_p->name, nick);
304          sendto_realops_flags(L_ALL, UMODE_REJ,
305                               "Forbidding reserved nick [%s] from user %s",
306                               nick, get_client_name(client_p, HIDE_IP));
307          return;
308        }
309    }    }
310    
311    if ((target_p = hash_find_client(nick)) == NULL)    if ((target_p = hash_find_client(nick)) == NULL)

Legend:
Removed from v.1684  
changed lines
  Added in v.1685

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28