Compare commits
18 Commits
wip/gsocke
...
2.14
Author | SHA1 | Date | |
---|---|---|---|
b304cfe850 | |||
ef1aad01bf | |||
8e60546aea | |||
29591e2b67 | |||
7da0a3aa2c | |||
6a7a134170 | |||
60c9263d49 | |||
4ab756af7b | |||
92f58b4420 | |||
b9d1efc2c2 | |||
79f7ff888f | |||
3588c519c3 | |||
ce528b6af8 | |||
a26cc20d21 | |||
3099c652bb | |||
edc7ad83e3 | |||
996b29ccca | |||
6a8b7013af |
@ -26,6 +26,19 @@
|
|||||||
<id>hexchat.desktop</id>
|
<id>hexchat.desktop</id>
|
||||||
</provides>
|
</provides>
|
||||||
<releases>
|
<releases>
|
||||||
|
<release date="2019-12-20" version="2.14.3">
|
||||||
|
<description>
|
||||||
|
<p>This is a bug-fix release:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Fix various incorrect parsing of IRC messages relating to trailing parameters</li>
|
||||||
|
<li>Fix SASL negotiation combined with multi-line cap</li>
|
||||||
|
<li>Fix input box theming with Yaru theme</li>
|
||||||
|
<li>python: Work around Python 3.7 regression causing crash on unload</li>
|
||||||
|
<li>sysinfo: Add support for /etc/os-release</li>
|
||||||
|
<li>sysinfo: Ignore irrelevant mounts when calculating storage size</li>
|
||||||
|
</ul>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
<release date="2018-08-29" version="2.14.2">
|
<release date="2018-08-29" version="2.14.2">
|
||||||
<description>
|
<description>
|
||||||
<p>This is a minor release:</p>
|
<p>This is a minor release:</p>
|
||||||
|
@ -2,8 +2,8 @@ pkg_conf = configuration_data()
|
|||||||
prefix = get_option('prefix')
|
prefix = get_option('prefix')
|
||||||
pkg_conf.set('prefix', prefix)
|
pkg_conf.set('prefix', prefix)
|
||||||
pkg_conf.set('VERSION', meson.project_version())
|
pkg_conf.set('VERSION', meson.project_version())
|
||||||
pkg_conf.set('hexchatlibdir', join_paths(prefix, plugindir))
|
pkg_conf.set('hexchatlibdir', join_paths('${prefix}', plugindir))
|
||||||
pkg_conf.set('includedir', join_paths(prefix, get_option('includedir')))
|
pkg_conf.set('includedir', join_paths('${prefix}', get_option('includedir')))
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'hexchat-plugin.pc.in',
|
input: 'hexchat-plugin.pc.in',
|
||||||
|
14
meson.build
14
meson.build
@ -1,6 +1,6 @@
|
|||||||
project('hexchat', 'c',
|
project('hexchat', 'c',
|
||||||
version: '2.14.2',
|
version: '2.14.3',
|
||||||
meson_version: '>= 0.38.0',
|
meson_version: '>= 0.40.0',
|
||||||
default_options: [
|
default_options: [
|
||||||
'c_std=gnu89',
|
'c_std=gnu89',
|
||||||
'buildtype=debugoptimized',
|
'buildtype=debugoptimized',
|
||||||
@ -87,8 +87,6 @@ endif
|
|||||||
|
|
||||||
global_cflags = []
|
global_cflags = []
|
||||||
test_cflags = [
|
test_cflags = [
|
||||||
'-pipe',
|
|
||||||
'-fPIE',
|
|
||||||
'-funsigned-char',
|
'-funsigned-char',
|
||||||
'-Wno-conversion',
|
'-Wno-conversion',
|
||||||
'-Wno-pointer-sign',
|
'-Wno-pointer-sign',
|
||||||
@ -136,7 +134,13 @@ test_ldflags = [
|
|||||||
'-Wl,--nxcompat',
|
'-Wl,--nxcompat',
|
||||||
]
|
]
|
||||||
foreach ldflag : test_ldflags
|
foreach ldflag : test_ldflags
|
||||||
if cc.has_argument(ldflag) and cc.links('int main (void) { return 0; }', args: ldflag)
|
if meson.version().version_compare('>= 0.46.0')
|
||||||
|
has_arg = cc.has_link_argument(ldflag)
|
||||||
|
else
|
||||||
|
has_arg = cc.has_argument(ldflag)
|
||||||
|
endif
|
||||||
|
|
||||||
|
if has_arg and cc.links('int main (void) { return 0; }', args: ldflag)
|
||||||
global_ldflags += ldflag
|
global_ldflags += ldflag
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
@ -2806,6 +2806,9 @@ hexchat_plugin_deinit(void)
|
|||||||
xchatout_buffer = NULL;
|
xchatout_buffer = NULL;
|
||||||
|
|
||||||
if (interp_plugin) {
|
if (interp_plugin) {
|
||||||
|
PyThreadState *tstate = ((PluginObject*)interp_plugin)->tstate;
|
||||||
|
PyThreadState_Swap(tstate);
|
||||||
|
Py_EndInterpreter(tstate);
|
||||||
Py_DECREF(interp_plugin);
|
Py_DECREF(interp_plugin);
|
||||||
interp_plugin = NULL;
|
interp_plugin = NULL;
|
||||||
}
|
}
|
||||||
|
@ -13,13 +13,13 @@ sysinfo_includes = []
|
|||||||
sysinfo_cargs = []
|
sysinfo_cargs = []
|
||||||
|
|
||||||
system = host_machine.system()
|
system = host_machine.system()
|
||||||
if system == 'linux' or system == 'darwin'
|
if system == 'linux' or system == 'gnu' or system.startswith('gnu/') or system == 'darwin'
|
||||||
sysinfo_includes += 'shared'
|
sysinfo_includes += 'shared'
|
||||||
sysinfo_sources += [
|
sysinfo_sources += [
|
||||||
'shared/df.c'
|
'shared/df.c'
|
||||||
]
|
]
|
||||||
|
|
||||||
if system == 'linux'
|
if system == 'linux' or system == 'gnu' or system.startswith('gnu/')
|
||||||
libpci = dependency('libpci', required: false, method: 'pkg-config')
|
libpci = dependency('libpci', required: false, method: 'pkg-config')
|
||||||
if libpci.found()
|
if libpci.found()
|
||||||
sysinfo_deps += libpci
|
sysinfo_deps += libpci
|
||||||
|
@ -26,7 +26,7 @@ int xs_parse_df(gint64 *out_total, gint64 *out_free)
|
|||||||
FILE *pipe;
|
FILE *pipe;
|
||||||
char buffer[bsize];
|
char buffer[bsize];
|
||||||
|
|
||||||
pipe = popen("df -k -l -P", "r");
|
pipe = popen("df -k -l -P --exclude-type=squashfs --exclude-type=devtmpfs --exclude-type=tmpfs", "r");
|
||||||
if(pipe==NULL)
|
if(pipe==NULL)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
@ -269,6 +269,16 @@ int xs_parse_meminfo(unsigned long long *mem_tot, unsigned long long *mem_free,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void strip_quotes(char *string)
|
||||||
|
{
|
||||||
|
size_t len = strlen(string);
|
||||||
|
if (string[len - 1] == '"')
|
||||||
|
string[--len] = '\0';
|
||||||
|
|
||||||
|
if (string[0] == '"')
|
||||||
|
memmove(string, string + 1, len);
|
||||||
|
}
|
||||||
|
|
||||||
int xs_parse_distro(char *name)
|
int xs_parse_distro(char *name)
|
||||||
{
|
{
|
||||||
FILE *fp = NULL;
|
FILE *fp = NULL;
|
||||||
@ -320,6 +330,20 @@ int xs_parse_distro(char *name)
|
|||||||
else
|
else
|
||||||
g_snprintf(buffer, bsize, "Gentoo Linux %s", keywords);
|
g_snprintf(buffer, bsize, "Gentoo Linux %s", keywords);
|
||||||
}
|
}
|
||||||
|
else if((fp = fopen("/etc/os-release", "r")) != NULL)
|
||||||
|
{
|
||||||
|
char name[bsize], version[bsize];
|
||||||
|
strcpy(name, "?");
|
||||||
|
strcpy(version, "?");
|
||||||
|
while(fgets(buffer, bsize, fp) != NULL)
|
||||||
|
{
|
||||||
|
find_match_char(buffer, "NAME=", name);
|
||||||
|
find_match_char(buffer, "VERSION=", version);
|
||||||
|
}
|
||||||
|
strip_quotes(name);
|
||||||
|
strip_quotes(version);
|
||||||
|
g_snprintf(buffer, bsize, "%s %s", name, version);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
g_snprintf(buffer, bsize, "Unknown Distro");
|
g_snprintf(buffer, bsize, "Unknown Distro");
|
||||||
if(fp != NULL)
|
if(fp != NULL)
|
||||||
|
@ -142,7 +142,7 @@ void pci_find_fullname(char *fullname, char *vendor, char *device)
|
|||||||
{
|
{
|
||||||
position = strstr(buffer, vendor);
|
position = strstr(buffer, vendor);
|
||||||
position += 6;
|
position += 6;
|
||||||
strncpy(vendorname, position, bsize/2);
|
g_strlcpy(vendorname, position, sizeof (vendorname));
|
||||||
position = strstr(vendorname, "\n");
|
position = strstr(vendorname, "\n");
|
||||||
*(position) = '\0';
|
*(position) = '\0';
|
||||||
break;
|
break;
|
||||||
@ -154,7 +154,7 @@ void pci_find_fullname(char *fullname, char *vendor, char *device)
|
|||||||
{
|
{
|
||||||
position = strstr(buffer, device);
|
position = strstr(buffer, device);
|
||||||
position += 6;
|
position += 6;
|
||||||
strncpy(devicename, position, bsize/2);
|
g_strlcpy(devicename, position, sizeof (devicename));
|
||||||
position = strstr(devicename, " (");
|
position = strstr(devicename, " (");
|
||||||
if (position == NULL)
|
if (position == NULL)
|
||||||
position = strstr(devicename, "\n");
|
position = strstr(devicename, "\n");
|
||||||
|
@ -1006,7 +1006,7 @@ dcc_socks_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
|||||||
sc.type = 1;
|
sc.type = 1;
|
||||||
sc.port = htons (dcc->port);
|
sc.port = htons (dcc->port);
|
||||||
sc.address = htonl (dcc->addr);
|
sc.address = htonl (dcc->addr);
|
||||||
strncpy (sc.username, prefs.hex_irc_user_name, 9);
|
g_strlcpy (sc.username, prefs.hex_irc_user_name, sizeof (sc.username));
|
||||||
memcpy (proxy->buffer, &sc, sizeof (sc));
|
memcpy (proxy->buffer, &sc, sizeof (sc));
|
||||||
proxy->buffersize = 8 + strlen (sc.username) + 1;
|
proxy->buffersize = 8 + strlen (sc.username) + 1;
|
||||||
proxy->bufferused = 0;
|
proxy->bufferused = 0;
|
||||||
@ -1618,13 +1618,13 @@ dcc_accept (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
guint32
|
guint32
|
||||||
dcc_get_my_address (void) /* the address we'll tell the other person */
|
dcc_get_my_address (session *sess) /* the address we'll tell the other person */
|
||||||
{
|
{
|
||||||
struct hostent *dns_query;
|
struct hostent *dns_query;
|
||||||
guint32 addr = 0;
|
guint32 addr = 0;
|
||||||
|
|
||||||
if (prefs.hex_dcc_ip_from_server && prefs.dcc_ip)
|
if (prefs.hex_dcc_ip_from_server && sess->server->dcc_ip)
|
||||||
addr = prefs.dcc_ip;
|
addr = sess->server->dcc_ip;
|
||||||
else if (prefs.hex_dcc_ip[0])
|
else if (prefs.hex_dcc_ip[0])
|
||||||
{
|
{
|
||||||
dns_query = gethostbyname ((const char *) prefs.hex_dcc_ip);
|
dns_query = gethostbyname ((const char *) prefs.hex_dcc_ip);
|
||||||
@ -1710,7 +1710,7 @@ dcc_listen_init (struct DCC *dcc, session *sess)
|
|||||||
/*if we have a dcc_ip, we use that, so the remote client can connect*/
|
/*if we have a dcc_ip, we use that, so the remote client can connect*/
|
||||||
/*else we try to take an address from hex_dcc_ip*/
|
/*else we try to take an address from hex_dcc_ip*/
|
||||||
/*if something goes wrong we tell the client to connect to our LAN ip*/
|
/*if something goes wrong we tell the client to connect to our LAN ip*/
|
||||||
dcc->addr = dcc_get_my_address ();
|
dcc->addr = dcc_get_my_address (sess);
|
||||||
|
|
||||||
/*if nothing else worked we use the address we bound to*/
|
/*if nothing else worked we use the address we bound to*/
|
||||||
if (dcc->addr == 0)
|
if (dcc->addr == 0)
|
||||||
|
@ -124,7 +124,7 @@ void dcc_chat (session *sess, char *nick, int passive);
|
|||||||
void handle_dcc (session *sess, char *nick, char *word[], char *word_eol[],
|
void handle_dcc (session *sess, char *nick, char *word[], char *word_eol[],
|
||||||
const message_tags_data *tags_data);
|
const message_tags_data *tags_data);
|
||||||
void dcc_show_list (session *sess);
|
void dcc_show_list (session *sess);
|
||||||
guint32 dcc_get_my_address (void);
|
guint32 dcc_get_my_address (session *sess);
|
||||||
void dcc_get_with_destfile (struct DCC *dcc, char *utf8file);
|
void dcc_get_with_destfile (struct DCC *dcc, char *utf8file);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -313,7 +313,6 @@ struct hexchatprefs
|
|||||||
|
|
||||||
/* these are the private variables */
|
/* these are the private variables */
|
||||||
guint32 local_ip;
|
guint32 local_ip;
|
||||||
guint32 dcc_ip;
|
|
||||||
|
|
||||||
unsigned int wait_on_exit; /* wait for logs to be flushed to disk IF we're connected */
|
unsigned int wait_on_exit; /* wait for logs to be flushed to disk IF we're connected */
|
||||||
|
|
||||||
@ -482,6 +481,10 @@ typedef struct server
|
|||||||
int proxy_sok4;
|
int proxy_sok4;
|
||||||
int proxy_sok6;
|
int proxy_sok6;
|
||||||
int id; /* unique ID number (for plugin API) */
|
int id; /* unique ID number (for plugin API) */
|
||||||
|
|
||||||
|
/* dcc_ip moved from haxchatprefs to make it per-server */
|
||||||
|
guint32 dcc_ip;
|
||||||
|
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
SSL_CTX *ctx;
|
SSL_CTX *ctx;
|
||||||
SSL *ssl;
|
SSL *ssl;
|
||||||
@ -575,6 +578,7 @@ typedef struct server
|
|||||||
unsigned int sasl_mech; /* mechanism for sasl auth */
|
unsigned int sasl_mech; /* mechanism for sasl auth */
|
||||||
unsigned int sent_capend:1; /* have sent CAP END yet */
|
unsigned int sent_capend:1; /* have sent CAP END yet */
|
||||||
unsigned int waiting_on_cap:1; /* waiting on another line of CAP LS */
|
unsigned int waiting_on_cap:1; /* waiting on another line of CAP LS */
|
||||||
|
unsigned int waiting_on_sasl:1; /* waiting on sasl */
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
unsigned int use_ssl:1; /* is server SSL capable? */
|
unsigned int use_ssl:1; /* is server SSL capable? */
|
||||||
unsigned int accept_invalid_cert:1;/* ignore result of server's cert. verify */
|
unsigned int accept_invalid_cert:1;/* ignore result of server's cert. verify */
|
||||||
|
@ -1420,7 +1420,7 @@ inbound_foundip (session *sess, char *ip, const message_tags_data *tags_data)
|
|||||||
HostAddr = gethostbyname (ip);
|
HostAddr = gethostbyname (ip);
|
||||||
if (HostAddr)
|
if (HostAddr)
|
||||||
{
|
{
|
||||||
prefs.dcc_ip = ((struct in_addr *) HostAddr->h_addr)->s_addr;
|
sess->server->dcc_ip = ((struct in_addr *) HostAddr->h_addr)->s_addr;
|
||||||
EMIT_SIGNAL_TIMESTAMP (XP_TE_FOUNDIP, sess->server->server_session,
|
EMIT_SIGNAL_TIMESTAMP (XP_TE_FOUNDIP, sess->server->server_session,
|
||||||
inet_ntoa (*((struct in_addr *) HostAddr->h_addr)),
|
inet_ntoa (*((struct in_addr *) HostAddr->h_addr)),
|
||||||
NULL, NULL, NULL, 0, tags_data->timestamp);
|
NULL, NULL, NULL, 0, tags_data->timestamp);
|
||||||
@ -1768,7 +1768,6 @@ inbound_cap_ls (server *serv, char *nick, char *extensions_str,
|
|||||||
{
|
{
|
||||||
char buffer[500]; /* buffer for requesting capabilities and emitting the signal */
|
char buffer[500]; /* buffer for requesting capabilities and emitting the signal */
|
||||||
gboolean want_cap = FALSE; /* format the CAP REQ string based on previous capabilities being requested or not */
|
gboolean want_cap = FALSE; /* format the CAP REQ string based on previous capabilities being requested or not */
|
||||||
gboolean want_sasl = FALSE; /* CAP END shouldn't be sent when SASL is requested, it needs further responses */
|
|
||||||
char **extensions;
|
char **extensions;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -1816,7 +1815,7 @@ inbound_cap_ls (server *serv, char *nick, char *extensions_str,
|
|||||||
serv->sasl_mech = sasl_mech;
|
serv->sasl_mech = sasl_mech;
|
||||||
}
|
}
|
||||||
want_cap = TRUE;
|
want_cap = TRUE;
|
||||||
want_sasl = TRUE;
|
serv->waiting_on_sasl = TRUE;
|
||||||
g_strlcat (buffer, "sasl ", sizeof(buffer));
|
g_strlcat (buffer, "sasl ", sizeof(buffer));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1842,7 +1841,7 @@ inbound_cap_ls (server *serv, char *nick, char *extensions_str,
|
|||||||
tags_data->timestamp);
|
tags_data->timestamp);
|
||||||
tcp_sendf (serv, "%s\r\n", g_strchomp (buffer));
|
tcp_sendf (serv, "%s\r\n", g_strchomp (buffer));
|
||||||
}
|
}
|
||||||
if (!want_sasl && !serv->waiting_on_cap)
|
if (!serv->waiting_on_sasl && !serv->waiting_on_cap)
|
||||||
{
|
{
|
||||||
/* if we use SASL, CAP END is dealt via raw numerics */
|
/* if we use SASL, CAP END is dealt via raw numerics */
|
||||||
serv->sent_capend = TRUE;
|
serv->sent_capend = TRUE;
|
||||||
@ -1851,13 +1850,25 @@ inbound_cap_ls (server *serv, char *nick, char *extensions_str,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
inbound_cap_nak (server *serv, const message_tags_data *tags_data)
|
inbound_cap_nak (server *serv, char *extensions_str, const message_tags_data *tags_data)
|
||||||
{
|
{
|
||||||
if (!serv->waiting_on_cap && !serv->sent_capend)
|
char **extensions;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
extensions = g_strsplit (extensions_str, " ", 0);
|
||||||
|
for (i=0; extensions[i]; i++)
|
||||||
|
{
|
||||||
|
if (!g_strcmp0 (extensions[i], "sasl"))
|
||||||
|
serv->waiting_on_sasl = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!serv->waiting_on_cap && !serv->waiting_on_sasl && !serv->sent_capend)
|
||||||
{
|
{
|
||||||
serv->sent_capend = TRUE;
|
serv->sent_capend = TRUE;
|
||||||
tcp_send_len (serv, "CAP END\r\n", 9);
|
tcp_send_len (serv, "CAP END\r\n", 9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_strfreev (extensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -92,7 +92,7 @@ void inbound_cap_ack (server *serv, char *nick, char *extensions,
|
|||||||
const message_tags_data *tags_data);
|
const message_tags_data *tags_data);
|
||||||
void inbound_cap_ls (server *serv, char *nick, char *extensions,
|
void inbound_cap_ls (server *serv, char *nick, char *extensions,
|
||||||
const message_tags_data *tags_data);
|
const message_tags_data *tags_data);
|
||||||
void inbound_cap_nak (server *serv, const message_tags_data *tags_data);
|
void inbound_cap_nak (server *serv, char *extensions, const message_tags_data *tags_data);
|
||||||
void inbound_cap_list (server *serv, char *nick, char *extensions,
|
void inbound_cap_list (server *serv, char *nick, char *extensions,
|
||||||
const message_tags_data *tags_data);
|
const message_tags_data *tags_data);
|
||||||
void inbound_cap_del (server *serv, char *nick, char *extensions,
|
void inbound_cap_del (server *serv, char *nick, char *extensions,
|
||||||
|
@ -109,6 +109,7 @@ hexchat_common = static_library('hexchatcommon',
|
|||||||
)
|
)
|
||||||
|
|
||||||
hexchat_common_dep = declare_dependency(
|
hexchat_common_dep = declare_dependency(
|
||||||
|
sources: [textevents] + marshal,
|
||||||
link_with: hexchat_common,
|
link_with: hexchat_common,
|
||||||
include_directories: common_includes,
|
include_directories: common_includes,
|
||||||
compile_args: common_cflags,
|
compile_args: common_cflags,
|
||||||
|
@ -735,6 +735,8 @@ handle_mode (server * serv, char *word[], char *word_eol[],
|
|||||||
if (!(*word[i + offset]))
|
if (!(*word[i + offset]))
|
||||||
break;
|
break;
|
||||||
num_args++;
|
num_args++;
|
||||||
|
if (word[i + offset][0] == ':')
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* count the number of modes (without the -/+ chars */
|
/* count the number of modes (without the -/+ chars */
|
||||||
@ -765,7 +767,7 @@ handle_mode (server * serv, char *word[], char *word_eol[],
|
|||||||
if ((all_modes_have_args || mode_has_arg (serv, sign, *modes)) && arg < (num_args + 1))
|
if ((all_modes_have_args || mode_has_arg (serv, sign, *modes)) && arg < (num_args + 1))
|
||||||
{
|
{
|
||||||
arg++;
|
arg++;
|
||||||
argstr = word[arg + offset];
|
argstr = STRIP_COLON(word, word_eol, arg+offset);
|
||||||
}
|
}
|
||||||
handle_single_mode (&mr, sign, *modes, nick, chan,
|
handle_single_mode (&mr, sign, *modes, nick, chan,
|
||||||
argstr, numeric_324 || prefs.hex_irc_raw_modes,
|
argstr, numeric_324 || prefs.hex_irc_raw_modes,
|
||||||
|
@ -3287,7 +3287,7 @@ cmd_send (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
|||||||
if (!word[2][0])
|
if (!word[2][0])
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
addr = dcc_get_my_address ();
|
addr = dcc_get_my_address (sess);
|
||||||
if (addr == 0)
|
if (addr == 0)
|
||||||
{
|
{
|
||||||
/* use the one from our connected server socket */
|
/* use the one from our connected server socket */
|
||||||
|
@ -60,8 +60,8 @@ irc_login (server *serv, char *user, char *realname)
|
|||||||
|
|
||||||
tcp_sendf (serv,
|
tcp_sendf (serv,
|
||||||
"NICK %s\r\n"
|
"NICK %s\r\n"
|
||||||
"USER %s %s %s :%s\r\n",
|
"USER %s 0 * :%s\r\n",
|
||||||
serv->nick, user, user, serv->servername, realname);
|
serv->nick, user, realname);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -714,7 +714,7 @@ process_numeric (session * sess, int n,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 333:
|
case 333:
|
||||||
inbound_topictime (serv, word[4], word[5], atol (word[6]), tags_data);
|
inbound_topictime (serv, word[4], word[5], atol (STRIP_COLON(word, word_eol, 6)), tags_data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -726,7 +726,7 @@ process_numeric (session * sess, int n,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
case 341: /* INVITE ACK */
|
case 341: /* INVITE ACK */
|
||||||
EMIT_SIGNAL_TIMESTAMP (XP_TE_UINVITE, sess, word[4], word[5],
|
EMIT_SIGNAL_TIMESTAMP (XP_TE_UINVITE, sess, word[4], STRIP_COLON(word, word_eol, 5),
|
||||||
serv->servername, NULL, 0, tags_data->timestamp);
|
serv->servername, NULL, 0, tags_data->timestamp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -957,6 +957,7 @@ process_numeric (session * sess, int n,
|
|||||||
EMIT_SIGNAL_TIMESTAMP (XP_TE_SASLRESPONSE, serv->server_session, word[1],
|
EMIT_SIGNAL_TIMESTAMP (XP_TE_SASLRESPONSE, serv->server_session, word[1],
|
||||||
word[2], word[3], ++word_eol[4], 0,
|
word[2], word[3], ++word_eol[4], 0,
|
||||||
tags_data->timestamp);
|
tags_data->timestamp);
|
||||||
|
serv->waiting_on_sasl = FALSE;
|
||||||
if (!serv->sent_capend)
|
if (!serv->sent_capend)
|
||||||
{
|
{
|
||||||
serv->sent_capend = TRUE;
|
serv->sent_capend = TRUE;
|
||||||
@ -1142,7 +1143,7 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
|||||||
{
|
{
|
||||||
|
|
||||||
case WORDL('A','C','C','O'):
|
case WORDL('A','C','C','O'):
|
||||||
inbound_account (serv, nick, word[3], tags_data);
|
inbound_account (serv, nick, STRIP_COLON(word, word_eol, 3), tags_data);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case WORDL('A', 'U', 'T', 'H'):
|
case WORDL('A', 'U', 'T', 'H'):
|
||||||
@ -1150,7 +1151,7 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case WORDL('C', 'H', 'G', 'H'):
|
case WORDL('C', 'H', 'G', 'H'):
|
||||||
inbound_user_info (sess, NULL, word[3], word[4], NULL, nick, NULL,
|
inbound_user_info (sess, NULL, word[3], STRIP_COLON(word, word_eol, 4), NULL, nick, NULL,
|
||||||
NULL, 0xff, tags_data);
|
NULL, 0xff, tags_data);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1330,7 +1331,7 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
|||||||
}
|
}
|
||||||
else if (strncasecmp (word[4], "NAK", 3) == 0)
|
else if (strncasecmp (word[4], "NAK", 3) == 0)
|
||||||
{
|
{
|
||||||
inbound_cap_nak (serv, tags_data);
|
inbound_cap_nak (serv, word[5][0] == ':' ? word_eol[5] + 1 : word_eol[5], tags_data);
|
||||||
}
|
}
|
||||||
else if (strncasecmp (word[4], "LIST", 4) == 0)
|
else if (strncasecmp (word[4], "LIST", 4) == 0)
|
||||||
{
|
{
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
(time_t)0, /* timestamp */ \
|
(time_t)0, /* timestamp */ \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define STRIP_COLON(word, word_eol, idx) (word)[(idx)][0] == ':' ? (word_eol)[(idx)]+1 : (word)[(idx)]
|
||||||
|
|
||||||
/* Message tag information that might be passed along with a server message
|
/* Message tag information that might be passed along with a server message
|
||||||
*
|
*
|
||||||
* See http://ircv3.atheme.org/specification/capability-negotiation-3.1
|
* See http://ircv3.atheme.org/specification/capability-negotiation-3.1
|
||||||
|
@ -1042,7 +1042,7 @@ traverse_socks (int print_fd, int sok, char *serverAddr, int port)
|
|||||||
sc.type = 1;
|
sc.type = 1;
|
||||||
sc.port = htons (port);
|
sc.port = htons (port);
|
||||||
sc.address = inet_addr (serverAddr);
|
sc.address = inet_addr (serverAddr);
|
||||||
strncpy (sc.username, prefs.hex_irc_user_name, 9);
|
g_strlcpy (sc.username, prefs.hex_irc_user_name, sizeof (sc.username));
|
||||||
|
|
||||||
send (sok, (char *) &sc, 8 + strlen (sc.username) + 1, 0);
|
send (sok, (char *) &sc, 8 + strlen (sc.username) + 1, 0);
|
||||||
buf[1] = 0;
|
buf[1] = 0;
|
||||||
|
@ -166,9 +166,6 @@ static const struct defaultserver def[] =
|
|||||||
/* irc. points to chat. but many users and urls still reference it */
|
/* irc. points to chat. but many users and urls still reference it */
|
||||||
{0, "irc.freenode.net"},
|
{0, "irc.freenode.net"},
|
||||||
|
|
||||||
{"Furnet", 0, 0, 0, 0, 0, TRUE},
|
|
||||||
{0, "irc.furnet.org"},
|
|
||||||
|
|
||||||
{"GalaxyNet", 0},
|
{"GalaxyNet", 0},
|
||||||
{0, "irc.galaxynet.org"},
|
{0, "irc.galaxynet.org"},
|
||||||
|
|
||||||
@ -196,6 +193,11 @@ static const struct defaultserver def[] =
|
|||||||
#endif
|
#endif
|
||||||
{0, "irc.globalgamers.net"},
|
{0, "irc.globalgamers.net"},
|
||||||
|
|
||||||
|
#ifdef USE_OPENSSL
|
||||||
|
{"hackint", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||||
|
{0, "irc.hackint.org"},
|
||||||
|
#endif
|
||||||
|
|
||||||
{"Hashmark", 0},
|
{"Hashmark", 0},
|
||||||
{0, "irc.hashmark.net"},
|
{0, "irc.hashmark.net"},
|
||||||
|
|
||||||
|
@ -293,10 +293,10 @@ create_input_style (GtkStyle *style)
|
|||||||
GtkSettings *settings = gtk_settings_get_default ();
|
GtkSettings *settings = gtk_settings_get_default ();
|
||||||
char *theme_name;
|
char *theme_name;
|
||||||
|
|
||||||
/* gnome-themes-standard 3.20 relies on images to do theming
|
/* gnome-themes-standard 3.20+ relies on images to do theming
|
||||||
* so we have to override that. */
|
* so we have to override that. */
|
||||||
g_object_get (settings, "gtk-theme-name", &theme_name, NULL);
|
g_object_get (settings, "gtk-theme-name", &theme_name, NULL);
|
||||||
if (g_str_has_prefix (theme_name, "Adwaita"))
|
if (g_str_has_prefix (theme_name, "Adwaita") || g_str_has_prefix (theme_name, "Yaru"))
|
||||||
gtk_rc_parse_string (adwaita_workaround_rc);
|
gtk_rc_parse_string (adwaita_workaround_rc);
|
||||||
g_free (theme_name);
|
g_free (theme_name);
|
||||||
|
|
||||||
|
@ -39,13 +39,9 @@ if gtk_dep.get_pkgconfig_variable('target') == 'x11'
|
|||||||
hexchat_gtk_deps += dependency('x11')
|
hexchat_gtk_deps += dependency('x11')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
hexchat_gtk_cflags = [
|
hexchat_gtk_cflags = []
|
||||||
'-fPIE'
|
|
||||||
]
|
|
||||||
|
|
||||||
hexchat_gtk_ldflags = [
|
hexchat_gtk_ldflags = []
|
||||||
'-pie'
|
|
||||||
]
|
|
||||||
|
|
||||||
if get_option('with-libnotify')
|
if get_option('with-libnotify')
|
||||||
hexchat_gtk_sources += 'notifications/notification-libnotify.c'
|
hexchat_gtk_sources += 'notifications/notification-libnotify.c'
|
||||||
@ -89,6 +85,7 @@ executable('hexchat',
|
|||||||
dependencies: hexchat_gtk_deps,
|
dependencies: hexchat_gtk_deps,
|
||||||
c_args: hexchat_gtk_cflags,
|
c_args: hexchat_gtk_cflags,
|
||||||
link_args: hexchat_gtk_ldflags,
|
link_args: hexchat_gtk_ldflags,
|
||||||
|
pie: true,
|
||||||
install: true,
|
install: true,
|
||||||
gui_app: true,
|
gui_app: true,
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user