ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/vendor/ircservices-5.1.24/modules/protocol/svsnick.c
Revision: 3389
Committed: Fri Apr 25 14:12:15 2014 UTC (11 years, 4 months ago) by michael
Content type: text/x-csrc
File size: 1690 byte(s)
Log Message:
- Imported ircservices-5.1.24

File Contents

# Content
1 /* Code for servers supporting the ircd.dal SVSNICK command.
2 *
3 * IRC Services is copyright (c) 1996-2009 Andrew Church.
4 * E-mail: <achurch@achurch.org>
5 * Parts written by Andrew Kempe and others.
6 * This program is free but copyrighted software; see the file GPL.txt for
7 * details.
8 */
9
10 #include "services.h"
11 #include "modules.h"
12
13 #include "svsnick.h"
14
15 /* Command name for SVSNICK */
16 static const char *cmd_SVSNICK = "SVSNICK";
17
18 /*************************************************************************/
19 /*************************************************************************/
20
21 /* Send a command to change the nickname of a user on another server. */
22
23 static void svsnick_send_nickchange_remote(const char *nick,
24 const char *newnick)
25 {
26 send_cmd(ServerName, "%s %s %s :%ld", cmd_SVSNICK, nick, newnick,
27 (long)time(NULL));
28 }
29
30 /*************************************************************************/
31 /*************************************************************************/
32
33 int init_svsnick(const char *cmdname)
34 {
35 cmd_SVSNICK = cmdname;
36 send_nickchange_remote = svsnick_send_nickchange_remote;
37 protocol_features |= PF_CHANGENICK;
38 return 1;
39 }
40
41 /*************************************************************************/
42
43 void exit_svsnick(void)
44 {
45 protocol_features &= ~PF_CHANGENICK;
46 send_nickchange_remote = NULL;
47 }
48
49 /*************************************************************************/
50
51 /*
52 * Local variables:
53 * c-file-style: "stroustrup"
54 * c-file-offsets: ((case-label . *) (statement-case-intro . *))
55 * indent-tabs-mode: nil
56 * End:
57 *
58 * vim: expandtab shiftwidth=4:
59 */