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

Comparing:
ircd-hybrid-7.2/modules/m_pong.c (file contents), Revision 982 by michael, Thu Aug 13 22:15:08 2009 UTC vs.
ircd-hybrid/modules/m_pong.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 "list.h"
27   #include "ircd.h"
28   #include "handlers.h"
29   #include "s_user.h"
# Line 36 | Line 37
37   #include "parse.h"
38   #include "modules.h"
39  
40 < static void mr_pong(struct Client *, struct Client *, int, char **);
41 < static void ms_pong(struct Client *, struct Client *, int, char **);
40 > static void mr_pong(struct Client *, struct Client *, int, char *[]);
41 > static void ms_pong(struct Client *, struct Client *, int, char *[]);
42  
43   struct Message pong_msgtab = {
44    "PONG", 0, 0, 1, 0, MFLG_SLOW | MFLG_UNREG, 0,
45    {mr_pong, m_ignore, ms_pong, m_ignore, m_ignore, m_ignore}
46   };
47  
47 #ifndef STATIC_MODULES
48   void
49   _modinit(void)
50   {
# Line 58 | Line 58 | _moddeinit(void)
58   }
59  
60   const char *_version = "$Revision$";
61 #endif
61  
62   static void
63   ms_pong(struct Client *client_p, struct Client *source_p,
# Line 67 | Line 66 | ms_pong(struct Client *client_p, struct
66    struct Client *target_p;
67    const char *origin, *destination;
68  
69 <  if (parc < 2 || *parv[1] == '\0')
69 >  if (parc < 2 || EmptyString(parv[1]))
70    {
71      sendto_one(source_p, form_str(ERR_NOORIGIN),
72                 me.name, parv[0]);
# Line 115 | Line 114 | mr_pong(struct Client *client_p, struct
114        {
115          if (source_p->localClient->random_ping == incoming_ping)
116          {
118          char buf[USERLEN + 1];
119
120          strlcpy(buf, source_p->username, sizeof(buf));
117            SetPingCookie(source_p);
118 <          register_local_user(client_p, source_p, source_p->name, buf);
118 >          register_local_user(source_p);
119          }
120          else
121          {
# Line 133 | Line 129 | mr_pong(struct Client *client_p, struct
129    else
130      sendto_one(source_p, form_str(ERR_NOORIGIN), me.name, parv[0]);
131   }
136

Diff Legend

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