1 # HG changeset patch |
1 # HG changeset patch |
2 # Parent d4d77c56d8da7c9771579efe469440eb25947271 |
2 # Parent 86cf5edde8624b3992557f29b5576388a57965ab |
3 Convert extcmd into a module |
3 Convert extcmd into a module |
4 |
4 |
5 diff -r d4d77c56d8da mcabber/configure.ac |
5 diff -r 86cf5edde862 mcabber/configure.ac |
6 --- a/mcabber/configure.ac Sat Nov 07 17:28:17 2015 +0200 |
6 --- a/mcabber/configure.ac Fri Dec 09 01:38:29 2016 +0200 |
7 +++ b/mcabber/configure.ac Sat Nov 07 17:38:46 2015 +0200 |
7 +++ b/mcabber/configure.ac Fri Dec 09 01:48:48 2016 +0200 |
8 @@ -295,6 +295,7 @@ |
8 @@ -308,6 +308,7 @@ |
9 modules/beep/Makefile |
9 modules/beep/Makefile |
10 modules/xttitle/Makefile |
10 modules/xttitle/Makefile |
11 modules/fifo/Makefile |
11 modules/fifo/Makefile |
12 + modules/eventcmd/Makefile |
12 + modules/eventcmd/Makefile |
13 modules/urlregex/Makefile |
13 modules/urlregex/Makefile |
14 doc/Makefile |
14 doc/Makefile |
15 doc/guide/Makefile |
15 doc/guide/Makefile |
16 diff -r d4d77c56d8da mcabber/mcabber/Makefile.am |
16 diff -r 86cf5edde862 mcabber/mcabber/Makefile.am |
17 --- a/mcabber/mcabber/Makefile.am Sat Nov 07 17:28:17 2015 +0200 |
17 --- a/mcabber/mcabber/Makefile.am Fri Dec 09 01:38:29 2016 +0200 |
18 +++ b/mcabber/mcabber/Makefile.am Sat Nov 07 17:38:46 2015 +0200 |
18 +++ b/mcabber/mcabber/Makefile.am Fri Dec 09 01:48:48 2016 +0200 |
19 @@ -7,8 +7,7 @@ |
19 @@ -7,8 +7,7 @@ |
20 xmpp.c xmpp.h xmpp_helper.c xmpp_helper.h xmpp_defines.h \ |
20 xmpp.c xmpp.h xmpp_helper.c xmpp_helper.h xmpp_defines.h \ |
21 xmpp_iq.c xmpp_iq.h xmpp_iqrequest.c xmpp_iqrequest.h \ |
21 xmpp_iq.c xmpp_iq.h xmpp_iqrequest.c xmpp_iqrequest.h \ |
22 xmpp_muc.c xmpp_muc.h xmpp_s10n.c xmpp_s10n.h \ |
22 xmpp_muc.c xmpp_muc.h xmpp_s10n.c xmpp_s10n.h \ |
23 - caps.c caps.h help.c help.h carbons.c carbons.h \ |
23 - caps.c caps.h help.c help.h carbons.c carbons.h \ |
33 -mcabber_SOURCES += fifo_internal.c fifo.h |
33 -mcabber_SOURCES += fifo_internal.c fifo.h |
34 +mcabber_SOURCES += fifo_internal.c fifo.h extcmd.c extcmd.h |
34 +mcabber_SOURCES += fifo_internal.c fifo.h extcmd.c extcmd.h |
35 endif |
35 endif |
36 |
36 |
37 #SUBDIRS = |
37 #SUBDIRS = |
38 diff -r d4d77c56d8da mcabber/mcabber/hooks.c |
38 diff -r 86cf5edde862 mcabber/mcabber/hooks.c |
39 --- a/mcabber/mcabber/hooks.c Sat Nov 07 17:28:17 2015 +0200 |
39 --- a/mcabber/mcabber/hooks.c Fri Dec 09 01:38:29 2016 +0200 |
40 +++ b/mcabber/mcabber/hooks.c Sat Nov 07 17:38:46 2015 +0200 |
40 +++ b/mcabber/mcabber/hooks.c Fri Dec 09 01:48:48 2016 +0200 |
41 @@ -36,7 +36,10 @@ |
41 @@ -34,7 +34,10 @@ |
42 #include "utf8.h" |
42 #include "utf8.h" |
43 #include "commands.h" |
43 #include "commands.h" |
44 #include "main.h" |
44 #include "main.h" |
45 -#include "extcmd.h" |
45 -#include "extcmd.h" |
46 + |
46 + |
97 hk_ext_cmd(bjid, EXT_CMD_TYPE_STATUS, newstatus, status_msg); |
97 hk_ext_cmd(bjid, EXT_CMD_TYPE_STATUS, newstatus, status_msg); |
98 +#endif |
98 +#endif |
99 } |
99 } |
100 |
100 |
101 void hk_mystatuschange(time_t timestamp, enum imstatus old_status, |
101 void hk_mystatuschange(time_t timestamp, enum imstatus old_status, |
102 @@ -711,11 +722,13 @@ |
102 @@ -710,11 +721,13 @@ |
103 prev_muc_unread = muc_unread; |
103 prev_muc_unread = muc_unread; |
104 prev_muc_attention = muc_attention; |
104 prev_muc_attention = muc_attention; |
105 |
105 |
106 +#ifndef MODULES_ENABLE |
106 +#ifndef MODULES_ENABLE |
107 /* Call external command */ |
107 /* Call external command */ |
111 g_free(str_unread); |
111 g_free(str_unread); |
112 +#endif |
112 +#endif |
113 } |
113 } |
114 |
114 |
115 // hk_presence_subscription_request(jid, message) |
115 // hk_presence_subscription_request(jid, message) |
116 diff -r d4d77c56d8da mcabber/mcabber/main.c |
116 diff -r 86cf5edde862 mcabber/mcabber/main.c |
117 --- a/mcabber/mcabber/main.c Sat Nov 07 17:28:17 2015 +0200 |
117 --- a/mcabber/mcabber/main.c Fri Dec 09 01:38:29 2016 +0200 |
118 +++ b/mcabber/mcabber/main.c Sat Nov 07 17:38:46 2015 +0200 |
118 +++ b/mcabber/mcabber/main.c Fri Dec 09 01:48:48 2016 +0200 |
119 @@ -50,9 +50,9 @@ |
119 @@ -49,9 +49,9 @@ |
120 #include "help.h" |
120 #include "help.h" |
121 #include "events.h" |
121 #include "events.h" |
122 #include "compl.h" |
122 #include "compl.h" |
123 -#include "extcmd.h" |
123 -#include "extcmd.h" |
124 |
124 |
125 #ifndef MODULES_ENABLE |
125 #ifndef MODULES_ENABLE |
126 +# include "extcmd.h" |
126 +# include "extcmd.h" |
127 # include "fifo.h" |
127 # include "fifo.h" |
128 #endif |
128 #endif |
129 |
129 |
130 @@ -509,9 +509,11 @@ |
130 @@ -526,9 +526,11 @@ |
131 } |
131 } |
132 #endif |
132 #endif |
133 |
133 |
134 +#ifndef MODULES_ENABLE |
134 +#ifndef MODULES_ENABLE |
135 optstring = settings_opt_get("events_command"); |
135 optstring = settings_opt_get("events_command"); |
137 hk_ext_cmd_init(optstring); |
137 hk_ext_cmd_init(optstring); |
138 +#endif |
138 +#endif |
139 |
139 |
140 optstring = settings_opt_get("roster_display_filter"); |
140 optstring = settings_opt_get("roster_display_filter"); |
141 if (optstring) |
141 if (optstring) |
142 diff -r d4d77c56d8da mcabber/modules/Makefile.am |
142 diff -r 86cf5edde862 mcabber/modules/Makefile.am |
143 --- a/mcabber/modules/Makefile.am Sat Nov 07 17:28:17 2015 +0200 |
143 --- a/mcabber/modules/Makefile.am Fri Dec 09 01:38:29 2016 +0200 |
144 +++ b/mcabber/modules/Makefile.am Sat Nov 07 17:38:46 2015 +0200 |
144 +++ b/mcabber/modules/Makefile.am Fri Dec 09 01:48:48 2016 +0200 |
145 @@ -1,1 +1,1 @@ |
145 @@ -1,1 +1,1 @@ |
146 -SUBDIRS = beep xttitle fifo urlregex |
146 -SUBDIRS = beep xttitle fifo urlregex |
147 +SUBDIRS = beep xttitle fifo eventcmd urlregex |
147 +SUBDIRS = beep xttitle fifo eventcmd urlregex |
148 diff -r d4d77c56d8da mcabber/modules/eventcmd/Makefile.am |
148 diff -r 86cf5edde862 mcabber/modules/eventcmd/Makefile.am |
149 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
149 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
150 +++ b/mcabber/modules/eventcmd/Makefile.am Sat Nov 07 17:38:46 2015 +0200 |
150 +++ b/mcabber/modules/eventcmd/Makefile.am Fri Dec 09 01:48:48 2016 +0200 |
151 @@ -0,0 +1,13 @@ |
151 @@ -0,0 +1,13 @@ |
152 + |
152 + |
153 +if INSTALL_HEADERS |
153 +if INSTALL_HEADERS |
154 +pkglib_LTLIBRARIES = libeventcmd.la |
154 +pkglib_LTLIBRARIES = libeventcmd.la |
155 +libeventcmd_la_SOURCES = eventcmd.c ../mcabber/extcmd.c ../mcabber/extcmd.h |
155 +libeventcmd_la_SOURCES = eventcmd.c ../mcabber/extcmd.c ../mcabber/extcmd.h |
160 + $(GLIB_CFLAGS) $(LOUDMOUTH_CFLAGS) \ |
160 + $(GLIB_CFLAGS) $(LOUDMOUTH_CFLAGS) \ |
161 + $(GPGME_CFLAGS) $(LIBOTR_CFLAGS) \ |
161 + $(GPGME_CFLAGS) $(LIBOTR_CFLAGS) \ |
162 + $(ENCHANT_CFLAGS) |
162 + $(ENCHANT_CFLAGS) |
163 +endif |
163 +endif |
164 + |
164 + |
165 diff -r d4d77c56d8da mcabber/modules/eventcmd/eventcmd.c |
165 diff -r 86cf5edde862 mcabber/modules/eventcmd/eventcmd.c |
166 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
166 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
167 +++ b/mcabber/modules/eventcmd/eventcmd.c Sat Nov 07 17:38:46 2015 +0200 |
167 +++ b/mcabber/modules/eventcmd/eventcmd.c Fri Dec 09 01:48:48 2016 +0200 |
168 @@ -0,0 +1,221 @@ |
168 @@ -0,0 +1,221 @@ |
169 + |
169 + |
170 +/* Copyright 2009 Myhailo Danylenko |
170 +/* Copyright 2009 Myhailo Danylenko |
171 + * |
171 + * |
172 + * This file is part of mcabber |
172 + * This file is part of mcabber |