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

Diff of /ircd-hybrid/modules/m_whowas.c

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

revision 141 by adx, Tue Oct 4 16:09:51 2005 UTC revision 142 by michael, Sun Oct 16 09:46:29 2005 UTC
# Line 46  static void whowas_do(struct Client *, s Line 46  static void whowas_do(struct Client *, s
46    
47  struct Message whowas_msgtab = {  struct Message whowas_msgtab = {
48    "WHOWAS", 0, 0, 0, 0, MFLG_SLOW, 0,    "WHOWAS", 0, 0, 0, 0, MFLG_SLOW, 0,
49    { m_unregistered, m_whowas, m_error, m_ignore, mo_whowas, m_ignore }    { m_unregistered, m_whowas, mo_whowas, m_ignore, mo_whowas, m_ignore }
50  };  };
51    
52  #ifndef STATIC_MODULES  #ifndef STATIC_MODULES
# Line 116  whowas_do(struct Client *client_p, struc Line 116  whowas_do(struct Client *client_p, struc
116    struct Whowas *temp = NULL;    struct Whowas *temp = NULL;
117    int cur = 0;    int cur = 0;
118    int max = -1;    int max = -1;
119    char *p, *nick;    char *p = NULL, *nick = NULL;
120    
121    if (parc > 2)    if (parc > 2)
122      max = atoi(parv[2]);      max = atoi(parv[2]);
123    
124    if (parc > 3)    if (parc > 3)
125      if (hunt_server(client_p, source_p, ":%s WHOWAS %s %s :%s", 3, parc, parv))      if (hunt_server(client_p, source_p, ":%s WHOWAS %s %s :%s", 3,
126                        parc, parv) != HUNTED_ISME)
127        return;        return;
128    
129    nick = parv[1];    nick = parv[1];
# Line 132  whowas_do(struct Client *client_p, struc Line 134  whowas_do(struct Client *client_p, struc
134    if (*nick == '\0')    if (*nick == '\0')
135      return;      return;
136    
137    temp  = WHOWASHASH[strhash(nick)];    for (temp = WHOWASHASH[strhash(nick)]; temp; temp = temp->next)
   
   for (; temp; temp = temp->next)  
138    {    {
139      if (irccmp(nick, temp->name) == 0)      if (irccmp(nick, temp->name) == 0)
140      {      {
# Line 151  whowas_do(struct Client *client_p, struc Line 151  whowas_do(struct Client *client_p, struc
151          sendto_one(source_p, form_str(RPL_WHOISSERVER),          sendto_one(source_p, form_str(RPL_WHOISSERVER),
152                     me.name, source_p->name, temp->name,                     me.name, source_p->name, temp->name,
153                     temp->servername, myctime(temp->logoff));                     temp->servername, myctime(temp->logoff));
154        cur++;        ++cur;
155      }      }
156    
157      if (max > 0 && cur >= max)      if (max > 0 && cur >= max)

Legend:
Removed from v.141  
changed lines
  Added in v.142

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