|
1 /* |
|
2 Copyright 2010 Mikael Berthe |
|
3 |
|
4 Module "comment" -- adds a dummy /# command |
|
5 (ignore the rest of the command line) |
|
6 |
|
7 This module is free software: you can redistribute it and/or modify |
|
8 it under the terms of the GNU General Public License as published by |
|
9 the Free Software Foundation, either version 2 of the License, or |
|
10 (at your option) any later version. |
|
11 |
|
12 This program is distributed in the hope that it will be useful, |
|
13 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
15 GNU General Public License for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
19 */ |
|
20 |
|
21 #include <mcabber/modules.h> |
|
22 #include <mcabber/commands.h> |
|
23 |
|
24 static void comment_init(void); |
|
25 static void comment_uninit(void); |
|
26 |
|
27 /* Module description */ |
|
28 module_info_t info_comment = { |
|
29 .mcabber_version = "0.10.0", |
|
30 .requires = NULL, |
|
31 .init = comment_init, |
|
32 .uninit = comment_uninit, |
|
33 }; |
|
34 |
|
35 static void do_comment(char *args) |
|
36 { |
|
37 /* This is actually a no-op! */ |
|
38 } |
|
39 |
|
40 /* Initialization */ |
|
41 static void comment_init(void) |
|
42 { |
|
43 /* Add command */ |
|
44 cmd_add("#", "Ignore", 0, 0, do_comment, NULL); |
|
45 } |
|
46 |
|
47 /* Deinitialization */ |
|
48 static void comment_uninit(void) |
|
49 { |
|
50 /* Unregister command */ |
|
51 cmd_del("comment"); |
|
52 } |
|
53 |
|
54 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |