ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/src/ctcp-common.C
(Generate patch)

Comparing ermyth/src/ctcp-common.C (file contents):
Revision 1.3 by pippijn, Sat Jul 21 13:23:21 2007 UTC vs.
Revision 1.4 by pippijn, Tue Aug 28 17:08:12 2007 UTC

4 * Rights to this code are documented in doc/pod/license.pod. 4 * Rights to this code are documented in doc/pod/license.pod.
5 * 5 *
6 * CTCP command handling. 6 * CTCP command handling.
7 */ 7 */
8 8
9static char const rcsid[] = "$Id: ctcp-common.C,v 1.3 2007/07/21 13:23:21 pippijn Exp $"; 9static char const rcsid[] = "$Id: ctcp-common.C,v 1.4 2007/08/28 17:08:12 pippijn Exp $";
10 10
11#include <map> 11#include <map>
12 12
13#include "atheme.h" 13#include "atheme.h"
14#include "users.h" 14#include "users.h"
22 22
23static void 23static void
24ctcp_ping_handler (char *cmd, char *args, char *origin, char *svsnick) 24ctcp_ping_handler (char *cmd, char *args, char *origin, char *svsnick)
25{ 25{
26 char *s; 26 char *s;
27 char const *m = 0;
27 28
28 s = strtok (args, "\001"); 29 s = strtok (args, "\001");
29 if (s != NULL) 30 if (s != NULL)
30 strip (s); 31 strip (s);
31 else 32 else
32 s = "pong!"; 33 m = "pong!";
33 34
34 notice (svsnick, origin, "\001PING %.100s\001", s); 35 notice (svsnick, origin, "\001PING %.100s\001", s ? s : m);
35} 36}
36 37
37static void 38static void
38ctcp_version_handler (char *cmd, char *args, char *origin, char *svsnick) 39ctcp_version_handler (char *cmd, char *args, char *origin, char *svsnick)
39{ 40{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines