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

Comparing:
ircd-hybrid-7.2/modules/m_list.c (file contents), Revision 885 by michael, Wed Oct 31 18:09:24 2007 UTC vs.
ircd-hybrid/modules/m_list.c (file contents), Revision 1155 by michael, Tue Aug 9 20:27:45 2011 UTC

# Line 23 | Line 23
23   */
24  
25   #include "stdinc.h"
26 < #include "tools.h"
26 > #include "list.h"
27   #include "handlers.h"
28   #include "channel.h"
29   #include "channel_mode.h"
# Line 35 | Line 35
35   #include "s_conf.h"
36   #include "s_serv.h"
37   #include "send.h"
38 – #include "list.h"
38   #include "msg.h"
39   #include "parse.h"
40   #include "modules.h"
41   #include "s_user.h"
42  
43 < static void m_list(struct Client *, struct Client *, int, char **);
44 < static void mo_list(struct Client *, struct Client *, int, char **);
43 > static void m_list(struct Client *, struct Client *, int, char *[]);
44 > static void mo_list(struct Client *, struct Client *, int, char *[]);
45  
46   struct Message list_msgtab = {
47    "LIST", 0, 0, 0, 0, MFLG_SLOW, 0,
48    {m_unregistered, m_list, m_ignore, m_ignore, mo_list, m_ignore}
49   };
50  
52 – #ifndef STATIC_MODULES
51   void
52   _modinit(void)
53   {
# Line 67 | Line 65 | _moddeinit(void)
65   }
66  
67   const char *_version = "$Revision$";
70 – #endif
68  
69   static int
70   has_wildcards(const char *s)
# Line 104 | Line 101 | do_list(struct Client *source_p, int par
101  
102    if (parc > 1)
103    {
104 <    char *opt, *save;
104 >    char *opt, *save = NULL;
105      dlink_list *list;
106      int i, errors = 0;
107  
# Line 113 | Line 110 | do_list(struct Client *source_p, int par
110        switch (*opt)
111        {
112          case '<': if ((i = atoi(opt + 1)) > 0)
113 <                    lt->users_max = (unsigned int) i - 1;
113 >                    lt->users_max = (unsigned int) i - 1;
114                    else
115 <                    errors = 1;
116 <                  break;
115 >                    errors = 1;
116 >                  break;
117          case '>': if ((i = atoi(opt + 1)) >= 0)
118 <                    lt->users_min = (unsigned int) i + 1;
119 <                  else
120 <                    errors = 1;
121 <                  break;
118 >                    lt->users_min = (unsigned int) i + 1;
119 >                  else
120 >                    errors = 1;
121 >                  break;
122          case '-': break;
123          case 'C':
124 <        case 'c': switch (*++opt)
125 <                  {
124 >        case 'c': switch (*++opt)
125 >                  {
126                      case '<': if ((i = atoi(opt + 1)) >= 0)
127                                  lt->created_max = (unsigned int) (CurrentTime
128                                                    - 60 * i);
# Line 184 | Line 181 | do_list(struct Client *source_p, int par
181      {
182        free_list_task(lt, source_p);
183        sendto_one(source_p, form_str(ERR_LISTSYNTAX),
184 <                 MyConnect(source_p) ? me.name : ID(&me),
188 <                 MyConnect(source_p) ? source_p->name : ID(source_p));
184 >                 me.name, source_p->name);
185        return;
186      }
187    }
# Line 194 | Line 190 | do_list(struct Client *source_p, int par
190    dlinkAdd(source_p, make_dlink_node(), &listing_client_list);
191  
192    sendto_one(source_p, form_str(RPL_LISTSTART),
193 <             MyConnect(source_p) ? me.name : ID(&me),
198 <             MyConnect(source_p) ? source_p->name : ID(source_p));
193 >             me.name, source_p->name);
194    safe_list_channels(source_p, lt, no_masked_channels &&
195 <                     lt->show_mask.head != NULL, !MyConnect(source_p));
195 >                     lt->show_mask.head != NULL);
196   }
197  
198   /*
# Line 213 | Line 208 | m_list(struct Client *client_p, struct C
208  
209    if (((last_used + ConfigFileEntry.pace_wait) > CurrentTime))
210    {
211 <    sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,parv[0]);
211 >    sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, parv[0]);
212      return;
213    }
214  

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)