1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00
Commit Graph

315 Commits

Author SHA1 Message Date
James Booth
92780f3e6e Remove free DiscoInfo values 2016-05-02 00:59:37 +01:00
James Booth
31ab43ea2d Free stanza text and DiscoInfo features 2016-05-02 00:40:16 +01:00
James Booth
2bacd43a16 Free stanza text on plugin send hooks 2016-05-01 23:41:57 +01:00
James Booth
b8c94376aa Add /blocked command 2016-05-01 19:39:39 +01:00
Dmitry Podgorny
efbf233c85 Define stanza's attributes as const char*
In most get-like funcitons libstrophe returns pointer to a string
that resides in an internal structure (e.g. xmpp_stanza_t). Hence,
Profanity must not change such strings. Define respective variables
as 'const char*' to reduce a chance of error and conform future
libstrophe's interface.

This patch mostly replaces 'char *' with 'const char*', but also
fixes two memory leaks after stanza_get_reason(). Add comment within
stanza_get_reason() to fix conflict with different allocator types.
2016-04-27 10:31:28 +00:00
Dominik Heidler
1b0ce852bb Implement XEP-0363: HTTP File Upload 2016-04-26 23:50:55 +02:00
Dominik Heidler
28e260c7da Cache all disco items and features on connect 2016-04-20 00:19:40 +02:00
Dominik Heidler
4b1481987d Fix typo: diso -> disco 2016-04-01 12:09:35 +02:00
James Booth
9b177a9e01 Removed #AX_PREFIX_CONFIG_H 2016-03-31 21:05:02 +01:00
James Booth
c6730783bf Removed duplicate typedef 2016-03-28 15:44:03 +01:00
James Booth
d39e48ba18 Use one stanza handler per type (message, iq, presence)
Allows plugins to stop stanza processing
2016-03-28 01:25:48 +01:00
James Booth
8933d59b03 Added basic stanza receive eooks 2016-03-27 21:36:29 +01:00
James Booth
7b34f72007 Use xmpp_send_raw_string instead of xmpp_send_raw 2016-03-26 16:44:02 +00:00
James Booth
d0397f3da5 Added stanza send hooks for plugins 2016-03-26 15:50:16 +00:00
James Booth
4c913aa08b Added prof_send_stanza to plugins API 2016-03-23 22:57:03 +00:00
James Booth
1f90aca503 Merge branch 'master' into plugins-c
Conflicts:
	src/main.c
	src/ui/console.c
2016-02-14 23:00:52 +00:00
James Booth
e53e94f1e2 Updated copyright 2016-02-14 22:54:46 +00:00
James Booth
41fe8c22b1 Added C plugin code from plugins branch 2016-02-14 22:28:55 +00:00
James Booth
7938db0a25 Use offline presence for software version responses from non contacts
fixes #714
2016-01-13 22:25:29 +00:00
James Booth
3d9e860574 Set autoping timeout default to 10 seconds, added null checks 2016-01-02 16:45:20 +00:00
James Booth
f27cae68c5 Added autoping timeout preference 2016-01-01 19:50:13 +00:00
James Booth
94b0d2c6da Added hardcoded autoping timeout 2015-12-31 01:48:04 +00:00
James Booth
08d30a4a83 Abort autping when existing attempt already in progress 2015-12-31 00:33:05 +00:00
James Booth
2847e39659 Tidy ping handlers 2015-12-31 00:11:58 +00:00
James Booth
a0c9b0cb70 Renamed autoping handler 2015-12-30 23:50:39 +00:00
James Booth
38255e9be4 Make all mucconfwin functions take ProfMucConfWin 2015-11-02 22:19:01 +00:00
James Booth
a3e9178ea2 Renamed mucconfwin functions 2015-11-02 22:05:17 +00:00
James Booth
1602011e01 mucwin_role_set_error takes ProfMucWin 2015-11-02 00:52:50 +00:00
James Booth
982bc8e066 mucwin_affiliation_set_error takes ProfMucWin 2015-11-02 00:51:12 +00:00
James Booth
7bedb6c294 mucwin_handle_role_list takes ProfMucWin 2015-11-02 00:47:43 +00:00
James Booth
1aa3c0ea4f mucwin_role_list_error takes ProfMucWin 2015-11-02 00:44:33 +00:00
James Booth
3341e8c202 mucwin_handle_affiliation_list takes ProfMucWin 2015-11-02 00:40:23 +00:00
James Booth
d81dbdb233 mucwin_affiliation_list_error takes ProfMucWin 2015-11-02 00:38:26 +00:00
James Booth
5c53c94253 mucwin_kick_error takes ProfMucWin 2015-11-02 00:33:31 +00:00
James Booth
d21faa4609 mucwin_room_disco_info takes ProfMucWin 2015-11-01 23:33:50 +00:00
James Booth
363fda82c1 mucwin_room_info_error takes ProfMucWin 2015-11-01 23:30:44 +00:00
James Booth
67f8faf645 Renamed ui_handle_room_role_set_error -> mucwin_role_set_error 2015-11-01 21:53:12 +00:00
James Booth
50765190f7 Renamed ui_handle_room_affiliation_set_error -> mucwin_affiliation_set_error 2015-11-01 21:52:27 +00:00
James Booth
556985ec39 Renamed ui_handle_room_role_list -> mucwin_handle_role_list 2015-11-01 21:50:32 +00:00
James Booth
2cc5f17871 Renamed ui_handle_room_role_list_error -> mucwin_role_list_error 2015-11-01 21:48:28 +00:00
James Booth
fa0ed64190 Renamed ui_handle_room_affiliation_list -> mucwin_handle_affiliation_list 2015-11-01 21:45:59 +00:00
James Booth
21d560f068 Renamed ui_handle_room_affiliation_list_error -> mucwin_affiliation_list_error 2015-11-01 21:37:09 +00:00
James Booth
a575ab174c Renamed ui_handle_room_kick_error -> mucwin_kick_error 2015-11-01 21:34:28 +00:00
James Booth
fdd00b33a4 Renamed ui_show_room_disco_info -> mucwin_room_disco_info 2015-11-01 21:19:08 +00:00
James Booth
bb14b19bb1 Renamed ui_handle_room_info_error -> mucwin_room_info_error 2015-11-01 21:18:13 +00:00
James Booth
c8a6bdb381 Applied coding style to src/xmpp/ 2015-10-26 00:14:23 +00:00
James Booth
1fd2a8a4e9 Send service-unavailable when lastactivity disabled 2015-10-14 21:45:19 +01:00
James Booth
1afe492e30 Added jabber:iq:last to capabilities 2015-09-29 23:55:01 +01:00
James Booth
bfdda17b7f Fix last active query 2015-09-29 00:53:58 +01:00
James Booth
26d160cae8 WIP: Added last activity request and response 2015-09-29 00:01:38 +01:00
James Booth
fe22fea9a8 Fixed spelling mistake 2015-09-27 18:32:21 +01:00
James Booth
2b88e2f1bf Check for libmesode, fall back to libstrophe 2015-09-21 21:40:04 +01:00
James Booth
131f1788c2 Free software version result properties 2015-08-09 01:10:02 +01:00
James Booth
70c0eeed1e Free error message in carbons handlers 2015-08-09 00:43:00 +01:00
James Booth
406b821b35 Show software version result in current window 2015-08-06 01:56:52 +01:00
James Booth
af38ddc9e7 Handle resource not found on sofware version request 2015-08-05 01:14:41 +01:00
James Booth
0b7c79ac13 Use original JID in software version request in MUC 2015-08-05 01:01:46 +01:00
James Booth
ac3e7dd9e8 Handle software version requests for gateways that return from domainpart 2015-08-05 00:48:50 +01:00
James Booth
2a92169351 Use id handler for software version requests, handle errors 2015-08-05 00:26:29 +01:00
James Booth
8e2578459e Use null check convention in iq.c 2015-05-04 23:19:10 +01:00
James Booth
0118178080 Removed server event delegation functions 2015-05-01 00:55:40 +01:00
James Booth
8aba52f4fe Renamed event functions 2015-04-28 23:38:56 +01:00
James Booth
e688dd7d28 Renamed server event functions 2015-04-19 17:29:54 +01:00
James Booth
424f52c3fa Moved server_events to event/ 2015-04-19 16:54:16 +01:00
James Booth
714faeb2e6 Add callback data to room disco info response handler 2015-03-29 00:55:33 +00:00
James Booth
24a45e5292 Set members only property when getting room features 2015-03-29 00:21:18 +00:00
James Booth
3c1e8c4e15 Added server error handling when setting /carbons preference 2015-03-09 23:07:51 +00:00
James Booth
945f29873e Merge remote-tracking branch 'oliverlemoal/xep-0280' into xep-0280 2015-03-08 21:51:50 +00:00
James Booth
9951da0c8f Free jid on caps response handler 2015-02-11 00:17:07 +00:00
James Booth
b3be26a214 Updated copyright 2015-02-10 23:16:09 +00:00
Olivier LE MOAL
48f9f3b3b0 Add XEP-0280 support 2015-02-10 11:32:22 +01:00
James Booth
38e6dc0e85 Free expected_node for legacy caps 2015-02-09 21:59:17 +00:00
James Booth
9d94ac5c63 Removed function pointers 2014-12-22 22:13:42 +00:00
James Booth
aec7afd06a Added caching of legacy capabilities 2014-11-30 00:37:36 +00:00
James Booth
94bd9dbdfe Store capabilities against fulljid when unsupported hash 2014-11-27 01:08:02 +00:00
James Booth
7a03dd7641 Free datetime on ping errors 2014-11-03 21:09:49 +00:00
James Booth
c4ab9405f6 Fixed leaks in /affiliation and /role 2014-11-03 20:57:22 +00:00
James Booth
c4412fe823 Fixed various memory leaks 2014-11-01 01:48:36 +00:00
James Booth
c014bb34b3 Renamed room destroy function 2014-10-23 23:33:12 +01:00
James Booth
0cc25e1b76 Removed debug messages when setting roles/affiliations 2014-10-18 19:19:01 +01:00
James Booth
965f048b18 Implemented setting and listing roles 2014-10-06 21:42:09 +01:00
James Booth
d12534c58e Implemented /room kick command 2014-10-05 20:52:34 +01:00
James Booth
ac7bc02c63 Added /room kick command 2014-10-05 03:52:55 +01:00
James Booth
2026ab4b6e Implemented getting affiliation list, and setting affiliation 2014-10-05 01:39:48 +01:00
James Booth
0b78a9a57e Implemented setting affiliation and listing affiliations 2014-10-04 23:40:36 +01:00
James Booth
58fb89ad33 Allow adding and removing room owners 2014-10-04 21:38:31 +01:00
James Booth
25b04537e1 Added service discovery to /room info command 2014-10-02 23:37:10 +01:00
James Booth
4f7feedb65 Changed rooms to use Occupant type instead of PContact 2014-09-30 00:16:01 +01:00
James Booth
d25d6b4502 Tidied muc module 2014-09-28 22:09:20 +01:00
James Booth
7703f57584 Use log_warning for room config form errors 2014-09-25 20:26:42 +01:00
James Booth
41f4621e6f Free caps, remove strdup 2014-09-24 01:06:49 +01:00
James Booth
95a2cec953 Handle errors for /disco info requests 2014-09-24 00:30:05 +01:00
James Booth
c343b3ecef Log errors on caps responses 2014-09-21 16:51:35 +01:00
James Booth
2fb9989123 Added jid->hash lookup for capabilities 2014-09-20 23:50:19 +01:00
James Booth
99c0b3f2cf wip - refactoring capabilities 2014-09-19 00:49:48 +01:00
James Booth
d2a06ab18e Handle result of room configuration submit 2014-09-17 21:48:55 +01:00
James Booth
c4b4cb557f form_get_field_by_var->form_get_form_type_field 2014-09-13 21:55:46 +01:00
James Booth
eba3a7cb30 Implemented /room config submit for saving room configuration 2014-09-10 23:05:35 +01:00
James Booth
41a069278a Tidied error handling for room forms 2014-09-09 23:16:12 +01:00
James Booth
9d74bdb58d Merge branch 'master' into roomconfig 2014-09-09 22:44:14 +01:00
James Booth
aa7fe0991f Added usages for stanza_get_error_message in iq.c 2014-09-09 22:32:52 +01:00
James Booth
3417f25dd1 Use stanza_get_error_message for pong errors 2014-09-09 22:26:14 +01:00
James Booth
6166d456e8 Added TODO for handling room config form request errors 2014-09-09 00:16:29 +01:00
James Booth
14ede0e44c Merge branch 'master' into roomconfig
Conflicts:
	src/server_events.h
2014-09-07 21:54:04 +01:00
James Booth
8f08c7a21e Added error handling for /ping command responses 2014-09-07 21:50:59 +01:00
James Booth
2599c43d66 Rewrite form parser 2014-09-06 22:40:57 +01:00
James Booth
157a1b5ff7 Created form module 2014-09-05 21:04:16 +01:00
James Booth
5e1023dfd9 Parse data form for room configuration 2014-09-04 23:15:51 +01:00
James Booth
763356464a Added ID handler for room config form 2014-09-04 22:41:10 +01:00
James Booth
1e0e5597c2 Added /room config edit and /room config cancel 2014-09-04 22:29:57 +01:00
James Booth
4ba33cb13c Added /ping command 2014-09-04 01:08:10 +01:00
James Booth
b50b786dcc Validate usage of /room config command, added UI messages 2014-09-03 22:56:33 +01:00
James Booth
64521eb135 Handle /room config cancel 2014-09-03 22:00:08 +01:00
James Booth
aa9f1dfa06 Send room destroy iq on /room config cancel 2014-09-03 20:29:17 +01:00
James Booth
09c10f62f2 Send instant room request 2014-09-03 13:55:06 +01:00
James Booth
f9737251a6 Added license exemption for OpenSSL to source headers 2014-08-24 20:57:39 +01:00
Dariusz Dwornikowski
225312802e Spelling errors fixed and hyphenation used as minus sign fixed 2014-08-11 18:54:20 +02:00
James Booth
d6e92f62dc Fixed cppcheck warnings 2014-04-26 00:36:36 +01:00
James Booth
26726b207a Updated copyright 2014-03-09 01:18:19 +00:00
James Booth
b177250f47 Refactored muc_room_is_active to only take room, rather than full jid 2014-03-08 21:20:26 +00:00
Dmitry Podgorny
0fbaa6f5ee fixed build error when make run with -jN option
Race can occur when gitversion file isn't fully generated before
it is used.
2014-03-06 02:06:22 +02:00
James Booth
16de267906 Added id handler for pings, disable ping on error type 'cancel' 2014-01-26 00:53:24 +00:00
James Booth
5472c6965a Moved xmpp ping to iq module 2014-01-26 00:15:34 +00:00
James Booth
9b82551809 Renamed iq handlers 2014-01-25 21:41:17 +00:00
James Booth
d083a5407d Moved handle_room_list and handle_disco_items to server_events 2014-01-05 21:20:15 +00:00
James Booth
b14d5707cb Moved handle_disco_info to server_events 2014-01-05 21:17:07 +00:00
James Booth
460a42c7c9 Moved handle_software_version_result to server_events 2014-01-05 21:11:09 +00:00
James Booth
90e7ce1c56 Bind iq functions in main.c 2013-12-22 23:19:20 +00:00
James Booth
81909ef000 Dynamically bind xmpp module api 2013-12-18 20:16:55 +00:00
James Booth
107fdd355e Added simple mock test, refactored roster 2013-12-14 15:34:17 +00:00
James Booth
ee8ff948bf Use git revision in development strings 2013-09-17 01:28:35 +01:00
Dmitry Podgorny
7a9fcd53d2 fixed crash because of incorrect string releasing 2013-08-26 12:31:41 +03:00
Dmitry Podgorny
b1bfdf650a fixed memory leaks in various files 2013-08-25 14:54:34 +03:00
Dmitry Podgorny
012366cf13 fixed memleak in _iq_handle_discoinfo_get 2013-08-24 00:40:23 +03:00
Dmitry Podgorny
a6e66cc571 fixed memory leaks
Also avoided several NULL pointer dereferences.
2013-08-03 14:38:38 +03:00
James Booth
c1ee75da40 Removed contact_list, moved roster logic to xmpp/roster module 2013-05-06 23:04:46 +01:00
James Booth
05f2d29396 Renamed contact_list_ functions to roster_ 2013-05-06 22:32:58 +01:00
James Booth
097ea18dab Tidied includes in iq.c 2013-05-06 22:00:11 +01:00
James Booth
3ae74feaa2 Created roster module, moved roster iq's 2013-05-06 21:53:59 +01:00
James Booth
ef7aacc709 Respond to disco items query 2013-03-24 17:40:46 +00:00
James Booth
d703301f7f Respond to disco info requests without node attribute 2013-03-24 17:27:30 +00:00
James Booth
e7202120cb Renamed ID attribute for capabilities disco info request 2013-03-17 21:46:49 +00:00
James Booth
e2bc9bde74 Implemented output for /disco info 2013-03-14 23:41:36 +00:00
James Booth
7bd7c15994 Added output for /disco items 2013-03-14 22:18:21 +00:00
James Booth
681c3b6be2 Show name as well as jid for room list 2013-03-14 22:03:38 +00:00
James Booth
816c019ef8 Removed unnecessary NULL checks 2013-03-14 21:20:18 +00:00
James Booth
31cd507d3c Added /disco command 2013-03-14 20:50:09 +00:00
James Booth
b960b76034 Added basic /rooms command to get chat room list 2013-03-13 23:38:26 +00:00
James Booth
c8088bea41 Tidied fix for id attributes that cause a segfault
fixes #151
2013-03-08 00:17:31 +00:00
James Booth
e955df8894 Colour title on /caps and /software output 2013-02-17 16:39:37 +00:00
James Booth
bced3d4b36 Added autocomplete for /software command 2013-02-17 02:10:56 +00:00
James Booth
44d2f8da7a Added /caps command 2013-02-17 01:04:10 +00:00
James Booth
a84e4adee7 Show all resources ordered by priority with /info command 2013-02-17 00:05:57 +00:00
James Booth
e922568770 Added resource_presence_t and contact_presence_t 2013-02-10 17:13:19 +00:00
James Booth
591f8a8dbf Renamed jabber_presence_t->presence_t 2013-02-10 11:31:31 +00:00
James Booth
ec78914044 Only create contacts resource when online 2013-02-10 11:19:36 +00:00
James Booth
835906bada Changed parameter to contact_list_add jid->barejid 2013-02-10 00:02:06 +00:00
James Booth
5e5590b047 Show detailed software/os information if available in capabilities 2013-02-05 23:06:30 +00:00
James Booth
0b40de5a4f Moved private xmpp functions to connection.h 2013-02-03 22:40:54 +00:00
James Booth
0b740bb355 Added debugging to presence and iq handlers 2013-02-03 18:28:54 +00:00
James Booth
fc5bfb7d33 Tidied #include's 2013-02-02 20:55:58 +00:00
James Booth
8cc4b55945 Removed caps functions from xmpp.h 2013-02-02 20:33:54 +00:00
James Booth
5e3d414ee0 Removed iq functions from xmpp.h 2013-02-02 20:22:39 +00:00
James Booth
bc2784dae6 Removed stanza functions from xmpp.h 2013-02-02 20:07:44 +00:00
James Booth
1d3739bb79 Added xmpp subdir to source 2013-02-02 19:47:41 +00:00