Michael Vetter
1ddac7b9c6
Put getting mentions in own function
...
So we can use it somewhere else too.
Regards https://github.com/profanity-im/profanity/issues/1261
2020-02-20 10:03:36 +01:00
Michael Vetter
be13e98fe7
Update my Copyright to 2020
2020-01-03 19:52:31 +01:00
Michael Vetter
46fd7150e5
Add vim modeline
2019-11-13 12:11:05 +01:00
Michael Vetter
f9eb302a59
Move code from jid_random_resource() into own function
...
Move the code that creates a random string into it's own function
+get_random_string().
2019-10-16 10:39:35 +02:00
Michael Vetter
c135f989ec
Check errors in is_dir() is_regular_file()
...
In case of error print the error. And return right value.
Improvement based on @pasis advice in https://github.com/profanity-im/profanity/pull/1036
Applying in preparation to merge that PR.
2019-10-04 23:29:10 +02:00
Michael Vetter
40b72ffe55
Add myself to copyright
...
Like discussed with James.
2019-06-17 10:44:08 +02:00
Frank Zschockelt
56e925ed03
Don't call mblen() to not depend on locale
...
mblen will fail with return code -1 if the locale used by the unit tests
isn't available on the machine. This will lead to an off by one error in some
tests where the needle is at the end of the haystack.
Since prof_occurrences expect null-terminated strings, the character after
the needle can simply be found by incrementing the address of the found needle
with strlen(needle).
2019-05-22 19:57:52 +02:00
Michael Vetter
1446ac15cb
Check for new profanity version using new URL
...
Regards https://github.com/profanity-im/profanity/issues/1085
2019-05-03 10:33:46 +02:00
Michael Vetter
706af9a900
Update copyright to include 2019
2019-01-22 11:31:45 +01:00
Michael Vetter
bb87122af9
Merge pull request #1011 from jubalh/sha1
...
Get rid of p_sha1 dependency
2018-09-19 11:45:19 +02:00
Michael Vetter
82f8083b85
Move p_sha1_hash() to stanza.c
...
Move `p_sha1_hash()` from `common.c` to `xmpp/stanza.c` as it is only
used in this file and now depends on libstrophe so xmpp is a better
namespace folder.
Renaming it as `_stanza_create_sha1_hash()`. And making static since
only used here.
The function cannot be tested in the unit tests anymore.
Once functional tests are working again we should write a test for the
sha1 functionality.
2018-09-06 20:40:09 +02:00
Philip Flohr
054267d738
Fix extended plugin handling PR
...
Fixes problems found in PR #999
2018-09-06 19:54:29 +03:00
Philip Flohr
e4ddced420
use gio functions for file copy
2018-09-06 19:28:02 +03:00
Michael Vetter
dcc249a616
Use libstrophe sha1 functions
...
Using libstrophes sha1 functions in p_sha1_hash() to get rid of the
p_sha1.c dependency.
Relates to https://github.com/boothj5/profanity/issues/882
2018-09-05 11:31:33 +02:00
Michael Vetter
6d80700329
Move ID generation to xmpp folder
...
create_unique_id() was changed to use UUIDs instead of a counter in the
last commit. Since now it depends on connection_create_uuid() which is
in the xmpp subfolder the function should also be moved there.
Renamed it to connection_create_stanza_id() and moved it to
src/xmpp/connection.c.
Discussion happened in https://github.com/boothj5/profanity/pull/1010
2018-08-30 11:17:04 +02:00
Michael Vetter
f4fb61b0c8
Use uuid in create_unique_id instead of counter
...
Message IDs should be unique so they can be used by XEPs like delivery receipts, chat markers, message correction.
So far it used a counter so restarting profanity will cause the counter
to be 0 again.
Let's rather use an UUID since we have such a function in the
xmpp/xmpp.h already.
Closes https://github.com/boothj5/profanity/issues/998
2018-08-14 15:51:18 +02:00
James Booth
250e972b7a
Update copyright
2018-01-21 15:00:02 +00:00
James Booth
d52355d72c
Set locale in unit tests
...
issue #901
2017-04-29 20:33:28 +01:00
James Booth
3e18aab9f3
Use g_utf8_find_ functions for prof_occurrences
...
issue #901
2017-04-28 21:41:55 +01:00
James Booth
97edebadcb
Update Glib dependency to 2.40
2017-03-25 02:07:27 +00:00
James Booth
286fecf38d
Allow installing plugins from directory
2017-02-05 21:09:03 +00:00
James Booth
68a3daedb9
Update Copyright
2017-01-28 17:24:22 +00:00
James Booth
6679b890a0
Fix multibyte chars in prof_occurrences
...
issue #901
2017-01-26 00:52:13 +00:00
James Booth
6cc4abedc5
Move window functions to window_list.c
2016-07-24 17:02:09 +01:00
James Booth
37742d71b6
Move resource conversions
2016-07-24 16:27:39 +01:00
James Booth
ef942bd27a
Add config/files.c
2016-07-24 16:22:15 +01:00
James Booth
0a57c4de78
Tidy headers
2016-07-24 15:43:51 +01:00
James Booth
e8fc80f5c1
Update GPL link in headers
2016-07-24 01:14:49 +01:00
James Booth
0991699ae6
Add /plugins install command
2016-07-12 23:50:21 +01:00
James Booth
5439317ba1
Reorder headers in common.c
...
Fixes unknown type name '_fpos64_t' error on Cygwin
2016-05-11 22:30:39 +01:00
James Booth
f243e333fc
Added whole word matches for room mention
2016-04-07 01:01:27 +01:00
James Booth
d9344b00fe
Added prof_strstr function
2016-04-03 22:30:24 +01:00
James Booth
9b177a9e01
Removed #AX_PREFIX_CONFIG_H
2016-03-31 21:05:02 +01:00
James Booth
185405b9d1
Fixed PLATFORM_CYGWIN references
2016-03-10 22:21:56 +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
10507b687b
Added sys/select.h header includes
2016-01-19 22:55:43 +00:00
James Booth
dd11334b06
Applied coding style to src/
2015-10-26 00:52:33 +00:00
Michael Vetter
e434b1bbf8
Create is_notify_enabled function
...
The same code was used on two different occasions. I put it into a
function.
2015-10-12 09:29:04 +02:00
James Booth
b4722632b6
Split PGP incoming and outgoing message handling
2015-08-30 01:32:13 +01:00
James Booth
1484e94b35
Fixed OTR decryption check
2015-08-27 00:37:48 +01:00
James Booth
ef52840d91
Added str_contains_str to common
2015-08-26 23:52:40 +01:00
James Booth
732533ee5a
I removed ncurses header dependencies, removed unused code
2015-06-15 17:11:11 +01:00
James Booth
e295a474dc
Added more connect tests
2015-05-24 20:31:18 +01:00
James Booth
1d002e5bdc
Use null check convention in common.c
2015-05-04 23:26:08 +01:00
James Booth
e7e1688d8a
Moved _strtoi to common, strtoi_range
2015-03-16 01:06:40 +00:00
James Booth
b24510c776
Merge branch 'master' into readline
...
Conflicts:
src/tools/history.c
src/tools/history.h
2015-02-11 00:09:58 +00:00
James Booth
b3be26a214
Updated copyright
2015-02-10 23:16:09 +00:00
James Booth
13297a151f
Merge branch 'master' into readline
...
Conflicts:
src/ui/inputwin.c
2015-02-10 20:47:22 +00:00
James Booth
6ab937c3e3
Copy list when sorting windows for /wins
2015-02-10 20:39:57 +00:00
James Booth
8cec79faef
Merge branch 'master' into readline
2015-02-08 21:03:26 +00:00
James Booth
44c5b34a71
Moved quote stripper to common, added tests
2015-02-08 20:59:51 +00:00
James Booth
9ecdb39433
Refactor inputwin.c
2015-01-18 22:55:51 +00:00
James Booth
ba89297382
Added utf8_display_len
2015-01-17 21:09:40 +00:00
James Booth
4c6cfcdca0
Simplified autocompleters and command history
2015-01-16 22:50:40 +00:00
Peter Vilim
0cb548683c
fgets: buffer size
2015-01-07 21:37:35 -06:00
James Booth
be7c4f5a00
Follow symlinks for profrc and accounts files
2014-10-26 20:43:05 +00:00
James Booth
f9737251a6
Added license exemption for OpenSSL to source headers
2014-08-24 20:57:39 +01:00
James Booth
1c62d7fda8
Renamed generate_unique_id -> create_unique_id
2014-06-15 21:49:34 +01:00
James Booth
92837ec186
Renamed sha1 functions to avoid naming clashes
2014-06-15 19:08:18 +01:00
James Booth
21af901fe4
Include stdint
2014-06-01 22:53:30 +01:00
James Booth
575b6acdd2
Use public domain SHA1 code, remove libgcrypt dependency
2014-06-01 22:42:10 +01:00
James Booth
6dbcc03543
Added g_hash_table_contains for glib < 2.32
2014-05-22 20:02:19 +01:00
James Booth
ce8f574444
Check for key on p_hash_table_add
2014-05-22 19:47:50 +01:00
James Booth
b1da6d1bc4
Added glib g_hash_table_add for glib < 2.32
2014-05-22 19:39:48 +01:00
James Booth
b3d49f2a3c
Added backwards compatible g_list_free_full for glib < 2.28
2014-05-21 21:39:31 +01:00
James Booth
3c5a73d29e
Use libgcrypt instead of libgnutls for SHA1 hashing
2014-05-21 20:35:01 +01:00
James Booth
524b1f2383
Changed to use gnutls instead of openssl for sha1 hashing
2014-05-01 22:18:04 +01: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
fbdecdad0c
generate_unique_id allows prefix
2014-01-25 23:18:10 +00:00
James Booth
bbdf2bea58
Removed unused encode.xml
2014-01-21 22:06:09 +00:00
James Booth
8a35bae267
Fixes to windows tidy
2013-08-28 23:09:54 +01:00
James Booth
b5eb095820
Removed limit on number of windows, WIP
2013-08-27 23:38:25 +01:00
James Booth
42c3a1c1f7
Added function to get next available window number, and tests
2013-08-27 22:02:23 +01:00
Dmitry Podgorny
32e18fb1a5
remove octet_compare
...
strcmp provides the same functionality
2013-08-26 02:42:01 +03:00
Dmitry Podgorny
20dff5fe2f
use posix stat syscall for windows
2013-08-04 19:14:07 +03:00
Dmitry Podgorny
3c385e0aaa
replace struct stat and stat() for windows
2013-08-03 14:42:02 +03:00
Dmitry Podgorny
6f498d1f69
refactored mkdir_recursive
...
Now this function returns result of operation. TRUE is success.
2013-08-03 14:14:30 +03:00
Dmitry Podgorny
034cf730cc
use get_unique_id for bookmarks
2013-07-14 13:49:50 +03:00
James Booth
d5e9ca649d
Show messages on /group add and /group remove
...
closes #189
closes #190
2013-06-23 17:38:30 +01:00
James Booth
c7100203e4
Moved cons_about() to console module
2013-04-20 23:39:17 +01:00
James Booth
e922568770
Added resource_presence_t and contact_presence_t
2013-02-10 17:13:19 +00:00
James Booth
3bee45fa76
Added presence string functions to common
2013-02-10 11:41:30 +00:00
James Booth
66647546f4
Moved xdg functions to common
2013-02-02 22:09:18 +00:00
James Booth
d86a774953
Moved directory creating functions to common.h
...
Removed duplicate function
2013-02-02 22:06:19 +00:00
James Booth
fc5bfb7d33
Tidied #include's
2013-02-02 20:55:58 +00:00
James Booth
e6749d669d
Option to use last presence at login, or use a specific presence
2013-01-31 00:01:38 +00:00
James Booth
0ef52901c9
Added glib < 2.30 compatibility function
2013-01-30 00:48:32 +00:00
James Booth
06ecfef1f3
Moved release module into common
2013-01-28 20:07:25 +00:00
James Booth
64d81c7c4c
Started work on creating sha-1 caps hash
2013-01-20 17:16:45 +00:00
James Booth
94bcf1889d
Added jid datatype
2013-01-12 23:10:56 +00:00
James Booth
d7b969b135
Moved jid related functions to common
2013-01-12 01:44:21 +00:00
James Booth
d29c7fd878
Updated copyright
2013-01-11 02:05:29 +00:00
Dmitry Podgorny
2630c111be
use internal implementation of getline
...
MacOS doesn't have function getline
2012-11-18 04:31:32 +02:00
James Booth
92ae93de33
Tidied escaping xml
2012-11-06 22:53:59 +00:00
James Booth
6bad38c2d5
Removed trailing whitespace from src and tests
2012-10-21 20:02:20 +01:00
James Booth
3edd75af75
Added comment to GLib compatibility function
2012-08-26 22:39:42 +01:00
James Booth
51e5156fab
Removed get_time from common.c
...
Uses GDateTime instead
2012-08-26 22:36:00 +01:00