/[svn]/ircd-hybrid/trunk/modules/m_whois.c
ViewVC logotype

Diff of /ircd-hybrid/trunk/modules/m_whois.c

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

revision 2353 by michael, Sun Jun 16 10:48:39 2013 UTC revision 2354 by michael, Thu Jul 4 11:47:20 2013 UTC
# Line 169  whois_person(struct Client *source_p, st Line 169  whois_person(struct Client *source_p, st
169   * side effects - Does whois   * side effects - Does whois
170   */   */
171  static void  static void
172  do_whois(struct Client *source_p, int parc, char *parv[])  do_whois(struct Client *source_p, const char *name)
173  {  {
174    struct Client *target_p = NULL;    struct Client *target_p = NULL;
   char *nick = parv[1];  
   char *p = NULL;  
175    
176    if ((p = strchr(nick, ',')) != NULL)    if ((target_p = hash_find_client(name)) && IsClient(target_p))
     *p = '\0';  
   if (*nick == '\0')  
     return;  
   
   if ((target_p = hash_find_client(nick)) && IsClient(target_p))  
177      whois_person(source_p, target_p);      whois_person(source_p, target_p);
178    else if (!IsDigit(*nick))    else if (!IsDigit(*name))
179      sendto_one(source_p, form_str(ERR_NOSUCHNICK),      sendto_one(source_p, form_str(ERR_NOSUCHNICK),
180                 me.name, source_p->name, nick);                 me.name, source_p->name, name);
181    
182    sendto_one(source_p, form_str(RPL_ENDOFWHOIS),    sendto_one(source_p, form_str(RPL_ENDOFWHOIS),
183               me.name, source_p->name, nick);               me.name, source_p->name, name);
184  }  }
185    
186  /*  /*
# Line 235  m_whois(struct Client *client_p, struct Line 228  m_whois(struct Client *client_p, struct
228      parv[1] = parv[2];      parv[1] = parv[2];
229    }    }
230    
231    do_whois(source_p, parc, parv);    do_whois(source_p, parv[1]);
232  }  }
233    
234  /*  /*
# Line 263  mo_whois(struct Client *client_p, struct Line 256  mo_whois(struct Client *client_p, struct
256      parv[1] = parv[2];      parv[1] = parv[2];
257    }    }
258    
259    do_whois(source_p, parc, parv);    do_whois(source_p, parv[1]);
260  }  }
261    
262  static struct Message whois_msgtab = {  static struct Message whois_msgtab = {

Legend:
Removed from v.2353  
changed lines
  Added in v.2354

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