equal
deleted
inserted
replaced
19 * USA |
19 * USA |
20 */ |
20 */ |
21 |
21 |
22 #include <stdlib.h> |
22 #include <stdlib.h> |
23 #include <glib.h> |
23 #include <glib.h> |
24 #include <gmodule.h> |
|
25 #include <unistd.h> |
24 #include <unistd.h> |
26 #include <errno.h> |
25 #include <errno.h> |
27 |
26 |
28 #include <mcabber/commands.h> |
27 #include <mcabber/commands.h> |
29 #include <mcabber/logprint.h> |
28 #include <mcabber/logprint.h> |
30 #include <mcabber/utils.h> |
29 #include <mcabber/utils.h> |
31 #include <mcabber/settings.h> |
30 #include <mcabber/settings.h> |
32 #include <mcabber/hbuf.h> |
31 #include <mcabber/hbuf.h> |
33 #include <mcabber/xmpp.h> |
32 #include <mcabber/xmpp.h> |
34 #include <mcabber/roster.h> |
33 #include <mcabber/roster.h> |
|
34 #include <mcabber/modules.h> |
|
35 |
|
36 static void mcmd_init (void); |
|
37 static void mcmd_uninit (void); |
|
38 |
|
39 module_info_t info_cmd = { |
|
40 .mcabber_version = "0.10.0", |
|
41 .requires = NULL, |
|
42 .init = mcmd_init, |
|
43 .uninit = mcmd_uninit, |
|
44 }; |
35 |
45 |
36 typedef struct { |
46 typedef struct { |
37 gchar *jid; |
47 gchar *jid; |
38 GString *input; |
48 GString *input; |
39 gchar *subject; |
49 gchar *subject; |
297 cmd_channels = g_slist_append (cmd_channels, cb); |
307 cmd_channels = g_slist_append (cmd_channels, cb); |
298 } |
308 } |
299 } |
309 } |
300 } |
310 } |
301 |
311 |
302 const gchar *g_module_check_init(GModule *module) |
312 static void mcmd_init (void) |
303 { |
313 { |
304 cmd_add ("cmd", "", 0, 0, do_cmd, NULL); |
314 cmd_add ("cmd", "", 0, 0, do_cmd, NULL); |
305 |
315 } |
306 return NULL; |
316 |
307 } |
317 static void mcmd_uninit (void) |
308 |
|
309 void g_module_unload(GModule *module) |
|
310 { |
318 { |
311 GSList *sel; |
319 GSList *sel; |
312 |
320 |
313 cmd_del ("cmd"); |
321 cmd_del ("cmd"); |
314 |
322 |