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

Comparing:
ircd-hybrid/modules/m_whowas.c (file contents), Revision 32 by knight, Sun Oct 2 20:41:23 2005 UTC vs.
ircd-hybrid-8/modules/m_whowas.c (file contents), Revision 1178 by michael, Mon Aug 15 08:11:31 2011 UTC

# Line 46 | Line 46 | static void mo_whowas(struct Client *, s
46   static void whowas_do(struct Client *, struct Client *, int, char *[]);
47  
48   struct Message whowas_msgtab = {
49 <  "WHOWAS", 0, 0, 0, 0, MFLG_SLOW, 0,
50 <  { m_unregistered, m_whowas, m_error, m_ignore, mo_whowas, m_ignore }
49 >  "WHOWAS", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
50 >  { m_unregistered, m_whowas, mo_whowas, m_ignore, mo_whowas, m_ignore }
51   };
52  
53 #ifndef STATIC_MODULES
53   void
54   _modinit(void)
55   {
# Line 64 | Line 63 | _moddeinit(void)
63   }
64  
65   const char *_version = "$Revision$";
67 #endif
66  
67   /*
68   ** m_whowas
# Line 77 | Line 75 | m_whowas(struct Client *client_p, struct
75   {
76    static time_t last_used = 0;
77  
78 <  if (parc < 2 || *parv[1] == '\0')
78 >  if (parc < 2 || EmptyString(parv[1]))
79    {
80      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
81                 me.name, source_p->name);
82      return;
83    }
84  
85 <  if ((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime)
85 >  if ((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
86    {
87      sendto_one(source_p,form_str(RPL_LOAD2HI),
88                 me.name, source_p->name);
89      return;
90    }
91 <  else
92 <    last_used = CurrentTime;
91 >
92 >  last_used = CurrentTime;
93  
94    whowas_do(client_p, source_p, parc, parv);
95   }
# Line 100 | Line 98 | static void
98   mo_whowas(struct Client *client_p, struct Client *source_p,
99            int parc, char *parv[])
100   {
101 <  if (parc < 2 || *parv[1] == '\0')
101 >  if (parc < 2 || EmptyString(parv[1]))
102    {
103      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
104                 me.name, source_p->name);
# Line 117 | Line 115 | whowas_do(struct Client *client_p, struc
115    struct Whowas *temp = NULL;
116    int cur = 0;
117    int max = -1;
118 <  char *p, *nick;
118 >  char *p = NULL, *nick = NULL;
119  
120    if (parc > 2)
121 +  {
122      max = atoi(parv[2]);
123 +
124 +    if (!MyConnect(source_p) && max > 20)
125 +      max = 20;
126 +  }
127 +
128    if (parc > 3)
129 <    if (hunt_server(client_p, source_p, ":%s WHOWAS %s %s :%s", 3, parc, parv))
129 >    if (hunt_server(client_p, source_p, ":%s WHOWAS %s %s :%s", 3,
130 >                    parc, parv) != HUNTED_ISME)
131        return;
132  
133    nick = parv[1];
# Line 137 | Line 142 | whowas_do(struct Client *client_p, struc
142  
143    for (; temp; temp = temp->next)
144    {
145 <    if (irccmp(nick, temp->name) == 0)
145 >    if (!irccmp(nick, temp->name))
146      {
147        sendto_one(source_p, form_str(RPL_WHOWASUSER),
148                   me.name, source_p->name, temp->name,

Comparing:
ircd-hybrid/modules/m_whowas.c (property svn:keywords), Revision 32 by knight, Sun Oct 2 20:41:23 2005 UTC vs.
ircd-hybrid-8/modules/m_whowas.c (property svn:keywords), Revision 1178 by michael, Mon Aug 15 08:11:31 2011 UTC

# Line 1 | Line 1
1 < Revision
1 > Id Revision

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines