Cutting off all text after \001 can result in users hiding text
so lets only bother handling it if it is a valid CTCP message
(starting and ending with \001).
If n becomes 0 at the same time that the end of either s1 or s2 are
reached, the next iteration of the while loop wouldn't happen, so we
wouldn't correctly return 0.
rfc_casecmp was broken because reaching terminator for str1 was used as
a terminal condition and str2 may be shorter than str1, resulting in an
oob read condition for str2.
rfc_ncasecmp was broken because it checked if n characters were checked
or if BOTH pointers reached their terminator, however the strings may
be different lengths and also less than n characters in length, meaning
that they don't both reach their terminators at the same time,
resulting in an oob read condition.
If ptr[0] is NULL, then strchr may return a pointer to the NULL
terminator for serv->nick_prefixes, making the if statement true, which
then leads to the pointer increment leaving ptr oob. Now we check to
ensure ptr[0] != NULL.
From the Linux manpages for strchr:
The terminating null byte is considered part of the string, so that if c is
specified as '\0', these functions return a pointer to the terminator.
Quick rundown of benefits:
- Much faster:
- Autotools (with autogen): 22 seconds
- Meson: 7 seconds
- Meson (with ccache): 2 seconds
- Simpler:
- ~1000 lines smaller
- Single simple language
- Potentially better Windows (Visual Studio) support
What is not done:
- Complete Windows support
- OSX support (easy)
Closes#2013Closes#1937Closes#1803
This could possibly cause a crash.
On a related note exec_data() and exec_handle_colors() could probably
use a pass cleaning up to ensure they "do the right thing".
- Combine the three properties into a single one
- Finally fully fix the handling with plugins handling events
TODO: Look into lastact handling of these, seems wrong
Part 2 of 03767ee0f9
So how the colors work should be pretty straight forward:
- A message comes in and is handled, this sets the state flags:
nick_said, msg_said, new_data. These map to tab colors.
- This state is reset under one of these conditions:
- It is commited to the UI when actually printed on unfocused tab
- Event is interupted by a plugin hook
- The tab focus is changed
At least try the untranslated one...
Also while at it don't present a ton of dialogs to the user
about this failure, they wouldn't even know what to do with
that information.
When hexchat is already installed into a non-default prefix, a new build
could pick up ${prefix}/include/hexchat-plugin.h from the installed
version instead of the local header, as configuration variables such as
$(GLIB_CFLAGS) would point to -I${prefix}/include.
Reordering the includes and moving -I arguments to CPPFLAGS prevents
this, as it ensures the local directories are always searched first.
This was no problem when compiling for /usr or /usr/local as these
directories in the compiler search path are always searched last.
Closes#1822
It just duplicates functionality and this fixes:
- alert_taskbar chanopt not being respected
- tab color being incorrect when highlight print events are eaten
Multiple offers for the same file are resumable. Attempts to resume more
than one of the offers causes the other offers to start a new file.
Closes#1764Fixes#1763
This allows us to omit the lagometer timer in the event that it is not
enabled, bringing the baseline wake-up rate down to 1Hz from 2Hz, which
could bring considerable power savings on mobile devices.
- Fix setting new encoding when switching networks
- Ignore ports when looking for network by hostname
- Only set UTF-8 when nothing explicitly set
Fixes#1628
According to OpenSSL document
(https://www.openssl.org/docs/manmaster/ssl/SSL_get_verify_result.html),
when using SSL_get_verify_result(), the existence of certificate
needs to be checked. However, in current code, it does not.
Therefore, certificate existence check is required for correctly
handling the exception.
Closes#1549
- Properly use filesystem encoding
- Validate utf8 when loading (hopefully fixing crashes)
- Use Gio
- Handle Windows line endings
- Remove dead code
- Fix respecting max length of scrollback files
- AES and Blowfish mechanisms are deemed insecure and servers
have removed support for them
- Remove attempts to retry since we only support one mech
- Handle SASL 3.2's new syntax for supported mechs