Merge branch 'hexchat-plugin-server-tags' of github.com:DasBrain/hexchat into hexchat-plugin-server-tags
This commit is contained in:
commit
084914ca54
2
.github/workflows/ubuntu-build.yml
vendored
2
.github/workflows/ubuntu-build.yml
vendored
@ -5,7 +5,7 @@ jobs:
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
|
74
.github/workflows/windows-build.yml
vendored
Normal file
74
.github/workflows/windows-build.yml
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
name: Windows Build
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2019
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [x64, win32]
|
||||
arch: [x64, x86]
|
||||
exclude:
|
||||
- platform: x64
|
||||
arch: x86
|
||||
- platform: win32
|
||||
arch: x64
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
New-Item -Name "deps" -ItemType "Directory"
|
||||
|
||||
Invoke-WebRequest http://files.jrsoftware.org/is/5/innosetup-5.5.9-unicode.exe -OutFile deps\innosetup-unicode.exe
|
||||
& deps\innosetup-unicode.exe /VERYSILENT | Out-Null
|
||||
|
||||
Invoke-WebRequest https://dl.hexchat.net/misc/idpsetup-1.5.1.exe -OutFile deps\idpsetup.exe
|
||||
& deps\idpsetup.exe /VERYSILENT
|
||||
|
||||
Invoke-WebRequest https://dl.hexchat.net/gtk/gtk-${{ matrix.platform }}-2018-08-29.7z -OutFile deps\gtk-${{ matrix.arch }}.7z
|
||||
& 7z.exe x deps\gtk-${{ matrix.arch }}.7z -oC:\gtk-build\gtk
|
||||
|
||||
Invoke-WebRequest https://dl.hexchat.net/gtk-win32/gendef-20111031.7z -OutFile deps\gendef.7z
|
||||
& 7z.exe x deps\gendef.7z -oC:\gtk-build
|
||||
|
||||
Invoke-WebRequest https://dl.hexchat.net/gtk-win32/WinSparkle-20151011.7z -OutFile deps\WinSparkle.7z
|
||||
& 7z.exe x deps\WinSparkle.7z -oC:\gtk-build\WinSparkle
|
||||
|
||||
Invoke-WebRequest https://dl.hexchat.net/misc/perl/perl-5.20.0-${{ matrix.arch }}.7z -OutFile deps\perl-${{ matrix.arch }}.7z
|
||||
& 7z.exe x deps\perl-${{ matrix.arch }}.7z -oC:\gtk-build\perl-5.20\${{ matrix.platform }}
|
||||
|
||||
New-Item -Path "c:\gtk-build" -Name "python-2.7" -ItemType "Directory"
|
||||
New-Item -Path "c:\gtk-build" -Name "python-3.6" -ItemType "Directory"
|
||||
New-Item -Path "c:\gtk-build\python-2.7" -Name "${{ matrix.platform }}" -ItemType "SymbolicLink" -Value "C:/hostedtoolcache/windows/Python/2.7.18/${{ matrix.arch }}"
|
||||
New-Item -Path "c:\gtk-build\python-3.6" -Name "${{ matrix.platform }}" -ItemType "SymbolicLink" -Value "C:/hostedtoolcache/windows/Python/3.6.8/${{ matrix.arch }}"
|
||||
|
||||
C:/hostedtoolcache/windows/Python/3.6.8/${{ matrix.arch }}/python.exe -m pip install cffi
|
||||
C:/hostedtoolcache/windows/Python/2.7.18/${{ matrix.arch }}/python.exe -m pip install -qq cffi
|
||||
shell: powershell
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
|
||||
msbuild win32\hexchat.sln /m /verbosity:minimal /p:Configuration=Release /p:Platform=${{ matrix.platform }}
|
||||
shell: cmd
|
||||
|
||||
- name: Preparing Artifacts
|
||||
run: |
|
||||
move ..\hexchat-build\${{ matrix.platform }}\HexChat*.exe .\
|
||||
move ..\hexchat-build .\
|
||||
shell: cmd
|
||||
|
||||
- uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: Installer
|
||||
path: HexChat*.exe
|
||||
|
||||
- uses: actions/upload-artifact@v2-preview
|
||||
with:
|
||||
name: Build
|
||||
path: hexchat-build
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
@ -58,6 +58,7 @@ typedef struct
|
||||
|
||||
static const channel_options chanopt[] =
|
||||
{
|
||||
{"alert_balloon", NULL, S_F(alert_balloon)},
|
||||
{"alert_beep", "BEEP", S_F(alert_beep)},
|
||||
{"alert_taskbar", NULL, S_F(alert_taskbar)},
|
||||
{"alert_tray", "TRAY", S_F(alert_tray)},
|
||||
@ -182,6 +183,7 @@ typedef struct
|
||||
{
|
||||
/* Per-Channel Alerts */
|
||||
/* use a byte, because we need a pointer to each element */
|
||||
guint8 alert_balloon;
|
||||
guint8 alert_beep;
|
||||
guint8 alert_taskbar;
|
||||
guint8 alert_tray;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
@ -493,6 +493,7 @@ session_new (server *serv, char *from, int type, int focus)
|
||||
sess->logfd = -1;
|
||||
sess->type = type;
|
||||
|
||||
sess->alert_balloon = SET_DEFAULT;
|
||||
sess->alert_beep = SET_DEFAULT;
|
||||
sess->alert_taskbar = SET_DEFAULT;
|
||||
sess->alert_tray = SET_DEFAULT;
|
||||
|
@ -363,6 +363,7 @@ typedef struct session
|
||||
{
|
||||
/* Per-Channel Alerts */
|
||||
/* use a byte, because we need a pointer to each element */
|
||||
guint8 alert_balloon;
|
||||
guint8 alert_beep;
|
||||
guint8 alert_taskbar;
|
||||
guint8 alert_tray;
|
||||
@ -569,6 +570,7 @@ typedef struct server
|
||||
unsigned int have_idmsg:1; /* freenode's IDENTIFY-MSG */
|
||||
unsigned int have_accnotify:1; /* cap account-notify */
|
||||
unsigned int have_extjoin:1; /* cap extended-join */
|
||||
unsigned int have_account_tag:1; /* cap account-tag */
|
||||
unsigned int have_server_time:1; /* cap server-time */
|
||||
unsigned int have_sasl:1; /* SASL capability */
|
||||
unsigned int have_except:1; /* ban exemptions +e */
|
||||
|
@ -1671,6 +1671,8 @@ inbound_toggle_caps (server *serv, const char *extensions_str, gboolean enable)
|
||||
serv->have_server_time = enable;
|
||||
else if (!strcmp (extension, "away-notify"))
|
||||
serv->have_awaynotify = enable;
|
||||
else if (!strcmp (extension, "account-tag"))
|
||||
serv->have_account_tag = enable;
|
||||
else if (!strcmp (extension, "sasl"))
|
||||
{
|
||||
serv->have_sasl = enable;
|
||||
@ -1724,6 +1726,9 @@ static const char * const supported_caps[] = {
|
||||
"userhost-in-names",
|
||||
"cap-notify",
|
||||
"chghost",
|
||||
"setname",
|
||||
"invite-notify",
|
||||
"account-tag",
|
||||
|
||||
/* ZNC */
|
||||
"znc.in/server-time-iso",
|
||||
|
@ -115,6 +115,34 @@ enum
|
||||
HOOK_DELETED = 1 << 7 /* marked for deletion */
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CHANNEL_FLAG_CONNECTED = 1 << 0,
|
||||
CHANNEL_FLAG_CONNECING = 1 << 1,
|
||||
CHANNEL_FLAG_AWAY = 1 << 2,
|
||||
CHANNEL_FLAG_END_OF_MOTD = 1 << 3,
|
||||
CHANNEL_FLAG_HAS_WHOX = 1 << 4,
|
||||
CHANNEL_FLAG_HAS_IDMSG = 1 << 5,
|
||||
CHANNEL_FLAG_HIDE_JOIN_PARTS = 1 << 6,
|
||||
CHANNEL_FLAG_HIDE_JOIN_PARTS_UNSET = 1 << 7,
|
||||
CHANNEL_FLAG_BEEP = 1 << 8,
|
||||
CHANNEL_FLAG_BEEP_UNSET = 1 << 9,
|
||||
CHANNEL_FLAG_UNUSED = 1 << 10,
|
||||
CHANNEL_FLAG_LOGGING = 1 << 11,
|
||||
CHANNEL_FLAG_LOGGING_UNSET = 1 << 12,
|
||||
CHANNEL_FLAG_SCROLLBACK = 1 << 13,
|
||||
CHANNEL_FLAG_SCROLLBACK_UNSET = 1 << 14,
|
||||
CHANNEL_FLAG_STRIP_COLORS = 1 << 15,
|
||||
CHANNEL_FLAG_STRIP_COLORS_UNSET = 1 << 16,
|
||||
CHANNEL_FLAG_TRAY = 1 << 17,
|
||||
CHANNEL_FLAG_TRAY_UNSET = 1 << 18,
|
||||
CHANNEL_FLAG_TASKBAR = 1 << 19,
|
||||
CHANNEL_FLAG_TASKBAR_UNSET = 1 << 20,
|
||||
CHANNEL_FLAG_BALLOON = 1 << 21,
|
||||
CHANNEL_FLAG_BALLOON_UNSET = 1 << 22,
|
||||
CHANNEL_FLAG_COUNT = 23
|
||||
};
|
||||
|
||||
GSList *plugin_list = NULL; /* export for plugingui.c */
|
||||
static GSList *hook_list = NULL;
|
||||
|
||||
@ -1522,7 +1550,11 @@ hexchat_list_int (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
|
||||
{
|
||||
guint32 hash = str_hash (name);
|
||||
gpointer data = ph->context;
|
||||
int tmp = 0;
|
||||
|
||||
int channel_flag;
|
||||
int channel_flags[CHANNEL_FLAG_COUNT];
|
||||
int channel_flags_used = 0;
|
||||
|
||||
int type = LIST_CHANNELS;
|
||||
|
||||
/* a NULL xlist is a shortcut to current "channels" context */
|
||||
@ -1583,48 +1615,38 @@ hexchat_list_int (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
|
||||
case 0xd1b: /* id */
|
||||
return ((struct session *)data)->server->id;
|
||||
case 0x5cfee87: /* flags */
|
||||
/* used if alert_taskbar is unset */ /* 20 */
|
||||
tmp <<= 1;
|
||||
tmp |= ((struct session *)data)->alert_taskbar; /* 19 */
|
||||
tmp <<= 1;
|
||||
/* used if alert_tray is unset */ /* 18 */
|
||||
tmp <<= 1;
|
||||
tmp |= ((struct session *)data)->alert_tray; /* 17 */
|
||||
tmp <<= 1;
|
||||
/* used if text_strip is unset */ /* 16 */
|
||||
tmp <<= 1;
|
||||
tmp |= ((struct session *)data)->text_strip; /* 15 */
|
||||
tmp <<= 1;
|
||||
/* used if text_scrollback is unset */ /* 14 */
|
||||
tmp <<= 1;
|
||||
tmp |= ((struct session *)data)->text_scrollback; /* 13 */
|
||||
tmp <<= 1;
|
||||
/* used if text_logging is unset */ /* 12 */
|
||||
tmp <<= 1;
|
||||
tmp |= ((struct session *)data)->text_logging; /* 11 */
|
||||
tmp <<= 1;
|
||||
/* unused for historical reasons */ /* 10 */
|
||||
tmp <<= 1;
|
||||
/* used if alert_beep is unset */ /* 9 */
|
||||
tmp <<= 1;
|
||||
tmp |= ((struct session *)data)->alert_beep; /* 8 */
|
||||
tmp <<= 1;
|
||||
/* used if text_hidejoinpart is unset */ /* 7 */
|
||||
tmp <<= 1;
|
||||
tmp |= ((struct session *)data)->text_hidejoinpart; /* 6 */
|
||||
tmp <<= 1;
|
||||
tmp |= ((struct session *)data)->server->have_idmsg; /* 5 */
|
||||
tmp <<= 1;
|
||||
tmp |= ((struct session *)data)->server->have_whox; /* 4 */
|
||||
tmp <<= 1;
|
||||
tmp |= ((struct session *)data)->server->end_of_motd;/* 3 */
|
||||
tmp <<= 1;
|
||||
tmp |= ((struct session *)data)->server->is_away; /* 2 */
|
||||
tmp <<= 1;
|
||||
tmp |= ((struct session *)data)->server->connecting; /* 1 */
|
||||
tmp <<= 1;
|
||||
tmp |= ((struct session *)data)->server->connected; /* 0 */
|
||||
return tmp;
|
||||
channel_flags[0] = ((struct session *)data)->server->connected;
|
||||
channel_flags[1] = ((struct session *)data)->server->connecting;
|
||||
channel_flags[2] = ((struct session *)data)->server->is_away;
|
||||
channel_flags[3] = ((struct session *)data)->server->end_of_motd;
|
||||
channel_flags[4] = ((struct session *)data)->server->have_whox;
|
||||
channel_flags[5] = ((struct session *)data)->server->have_idmsg;
|
||||
channel_flags[6] = ((struct session *)data)->text_hidejoinpart;
|
||||
channel_flags[7] = ((struct session *)data)->text_hidejoinpart == SET_DEFAULT;
|
||||
channel_flags[8] = ((struct session *)data)->alert_beep;
|
||||
channel_flags[9] = ((struct session *)data)->alert_beep == SET_DEFAULT;
|
||||
channel_flags[10] = 0; /* unused for historical reasons */
|
||||
channel_flags[11] = ((struct session *)data)->text_logging;
|
||||
channel_flags[12] = ((struct session *)data)->text_logging == SET_DEFAULT;
|
||||
channel_flags[13] = ((struct session *)data)->text_scrollback;
|
||||
channel_flags[14] = ((struct session *)data)->text_scrollback == SET_DEFAULT;
|
||||
channel_flags[15] = ((struct session *)data)->text_strip;
|
||||
channel_flags[16] = ((struct session *)data)->text_strip == SET_DEFAULT;
|
||||
channel_flags[17] = ((struct session *)data)->alert_tray;
|
||||
channel_flags[18] = ((struct session *)data)->alert_tray == SET_DEFAULT;
|
||||
channel_flags[19] = ((struct session *)data)->alert_taskbar;
|
||||
channel_flags[20] = ((struct session *)data)->alert_taskbar == SET_DEFAULT;
|
||||
channel_flags[21] = ((struct session *)data)->alert_balloon;
|
||||
channel_flags[22] = ((struct session *)data)->alert_balloon == SET_DEFAULT;
|
||||
|
||||
/* Set flags */
|
||||
for (channel_flag = 0; channel_flag < CHANNEL_FLAG_COUNT; ++channel_flag) {
|
||||
if (channel_flags[channel_flag]) {
|
||||
channel_flags_used |= 1 << channel_flag;
|
||||
}
|
||||
}
|
||||
|
||||
return channel_flags_used;
|
||||
case 0x1a192: /* lag */
|
||||
return ((struct session *)data)->server->lag;
|
||||
case 0x1916144c: /* maxmodes */
|
||||
|
@ -1010,6 +1010,7 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
||||
const message_tags_data *tags_data)
|
||||
{
|
||||
server *serv = sess->server;
|
||||
char *account;
|
||||
char ip[128], nick[NICKLEN];
|
||||
char *text, *ex;
|
||||
int len = strlen (type);
|
||||
@ -1028,6 +1029,14 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
||||
ex[0] = '!';
|
||||
}
|
||||
|
||||
|
||||
/** Update the account for this message's source. */
|
||||
if (serv->have_account_tag)
|
||||
{
|
||||
account = tags_data->account && *tags_data->account ? tags_data->account : "*";
|
||||
inbound_account (serv, nick, account, tags_data);
|
||||
}
|
||||
|
||||
if (len == 4)
|
||||
{
|
||||
guint32 t;
|
||||
@ -1157,16 +1166,22 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
||||
NULL, 0xff, tags_data);
|
||||
return;
|
||||
|
||||
case WORDL('S', 'E', 'T', 'N'):
|
||||
inbound_user_info (sess, NULL, NULL, NULL, NULL, nick, STRIP_COLON(word, word_eol, 3),
|
||||
NULL, 0xff, tags_data);
|
||||
return;
|
||||
|
||||
case WORDL('I','N','V','I'):
|
||||
if (ignore_check (word[1], IG_INVI))
|
||||
return;
|
||||
|
||||
if (word[4][0] == ':')
|
||||
EMIT_SIGNAL_TIMESTAMP (XP_TE_INVITED, sess, word[4] + 1, nick,
|
||||
serv->servername, NULL, 0,
|
||||
|
||||
text = STRIP_COLON(word, word_eol, 4);
|
||||
if (serv->p_cmp (word[3], serv->nick))
|
||||
EMIT_SIGNAL_TIMESTAMP (XP_TE_INVITEDOTHER, sess, text, nick,
|
||||
word[3], serv->servername, 0,
|
||||
tags_data->timestamp);
|
||||
else
|
||||
EMIT_SIGNAL_TIMESTAMP (XP_TE_INVITED, sess, word[4], nick,
|
||||
EMIT_SIGNAL_TIMESTAMP (XP_TE_INVITED, sess, text, nick,
|
||||
serv->servername, NULL, 0,
|
||||
tags_data->timestamp);
|
||||
|
||||
@ -1244,10 +1259,13 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
||||
text++;
|
||||
}
|
||||
len = strlen (text);
|
||||
if (text[0] == 1 && text[len - 1] == 1) /* ctcp */
|
||||
if (text[0] == 1) /* ctcp */
|
||||
{
|
||||
char *new_pdibuf = NULL;
|
||||
text[len - 1] = 0;
|
||||
if (text[len - 1] == 1)
|
||||
{
|
||||
text[len - 1] = 0;
|
||||
}
|
||||
text++;
|
||||
if (g_ascii_strncasecmp (text, "ACTION", 6) != 0)
|
||||
flood_check (nick, ip, serv, sess, 0);
|
||||
@ -1516,6 +1534,9 @@ handle_message_tags (server *serv, const char *tags_str,
|
||||
*value = '\0';
|
||||
value++;
|
||||
|
||||
if (serv->have_account_tag && !strcmp (key, "account"))
|
||||
tags_data->account = g_strdup (value);
|
||||
|
||||
if (serv->have_server_time && !strcmp (key, "time"))
|
||||
handle_message_tag_time (value, tags_data);
|
||||
}
|
||||
@ -1614,9 +1635,16 @@ irc_inline (server *serv, char *buf, int len)
|
||||
}
|
||||
|
||||
xit:
|
||||
message_tags_data_free (&tags_data);
|
||||
g_free (pdibuf);
|
||||
}
|
||||
|
||||
void
|
||||
message_tags_data_free (message_tags_data *tags_data)
|
||||
{
|
||||
g_clear_pointer (&tags_data->account, g_free);
|
||||
}
|
||||
|
||||
void
|
||||
proto_fill_her_up (server *serv)
|
||||
{
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#define MESSAGE_TAGS_DATA_INIT \
|
||||
{ \
|
||||
NULL, /* account name */ \
|
||||
(time_t)0, /* timestamp */ \
|
||||
}
|
||||
|
||||
@ -36,9 +37,12 @@
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
char *account;
|
||||
time_t timestamp;
|
||||
} message_tags_data;
|
||||
|
||||
void message_tags_data_free (message_tags_data *tags_data);
|
||||
|
||||
void proto_fill_her_up (server *serv);
|
||||
|
||||
#endif
|
||||
|
@ -1784,6 +1784,7 @@ server_set_defaults (server *serv)
|
||||
serv->have_idmsg = FALSE;
|
||||
serv->have_accnotify = FALSE;
|
||||
serv->have_extjoin = FALSE;
|
||||
serv->have_account_tag = FALSE;
|
||||
serv->have_server_time = FALSE;
|
||||
serv->have_sasl = FALSE;
|
||||
serv->have_except = FALSE;
|
||||
|
@ -198,6 +198,7 @@ static const struct defaultserver def[] =
|
||||
#ifdef USE_OPENSSL
|
||||
{"hackint", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.hackint.org"},
|
||||
{0, "irc.eu.hackint.org"},
|
||||
#endif
|
||||
|
||||
{"Hashmark", 0},
|
||||
@ -235,11 +236,16 @@ static const struct defaultserver def[] =
|
||||
{"Krstarica", 0},
|
||||
{0, "irc.krstarica.com"},
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
{"LibertaCasa", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.liberta.casa"},
|
||||
#endif
|
||||
|
||||
{"LibraIRC", 0},
|
||||
/* Self signed */
|
||||
{0, "irc.librairc.net"},
|
||||
|
||||
{"Libera Chat", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{"Libera.Chat", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.libera.chat"},
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
@ -277,9 +283,12 @@ static const struct defaultserver def[] =
|
||||
{0, "irc.ponychat.net"},
|
||||
|
||||
{"PTNet.org", 0},
|
||||
/* Note that the network suggests ISO-8859-1 but most users ignore this */
|
||||
{0, "irc.ptnet.org"},
|
||||
{0, "uevora.ptnet.org"},
|
||||
{0, "vianetworks.ptnet.org"},
|
||||
{0, "claranet.ptnet.org"},
|
||||
{0, "sonaquela.ptnet.org"},
|
||||
{0, "uc.ptnet.org"},
|
||||
{0, "ipg.ptnet.org"},
|
||||
|
||||
{"QuakeNet", 0, 0, 0, LOGIN_CHALLENGEAUTH},
|
||||
{0, "irc.quakenet.org"},
|
||||
@ -303,6 +312,9 @@ static const struct defaultserver def[] =
|
||||
{"Serenity-IRC", 0},
|
||||
{0, "irc.serenity-irc.net"},
|
||||
|
||||
{"SimosNap", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.simosnap.com"},
|
||||
|
||||
{"SlashNET", 0},
|
||||
/* Self signed */
|
||||
{0, "irc.slashnet.org"},
|
||||
@ -348,6 +360,14 @@ static const struct defaultserver def[] =
|
||||
{"tilde.chat", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.tilde.chat"},
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
{"TripSit", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.tripsit.me"},
|
||||
{0, "newirc.tripsit.me"},
|
||||
{0, "coconut.tripsit.me"},
|
||||
{0, "innsbruck.tripsit.me"},
|
||||
#endif
|
||||
|
||||
{"TURLINet", 0, 0, 0, 0, 0, TRUE},
|
||||
/* Other servers use CP1251 and invalid certs */
|
||||
{0, "irc.servx.ru"},
|
||||
@ -365,6 +385,9 @@ static const struct defaultserver def[] =
|
||||
|
||||
{"Xertion", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.xertion.org"},
|
||||
|
||||
{"DeltaPool", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
||||
{0, "irc.deltapool.net"},
|
||||
|
||||
{0,0}
|
||||
};
|
||||
@ -935,7 +958,7 @@ servlist_load_defaults (void)
|
||||
{
|
||||
int i = 0, j = 0;
|
||||
ircnet *net = NULL;
|
||||
guint def_hash = g_str_hash ("freenode");
|
||||
guint def_hash = g_str_hash ("Libera.Chat");
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
@ -1295,6 +1295,13 @@ static char * const pevt_invited_help[] = {
|
||||
N_("Server Name"),
|
||||
};
|
||||
|
||||
static char * const pevt_invitedother_help[] = {
|
||||
N_("Channel Name"),
|
||||
N_("Nick of person who sent the invite"),
|
||||
N_("Nick of person who was invited"),
|
||||
N_("Server Name"),
|
||||
};
|
||||
|
||||
static char * const pevt_usersonchan_help[] = {
|
||||
N_("Channel Name"),
|
||||
N_("Users"),
|
||||
|
@ -496,6 +496,12 @@ pevt_invited_help
|
||||
%C24*%O$tYou have been invited to %C22$1%O by %C18$2%O (%C29$3%O)
|
||||
3
|
||||
|
||||
Invited Other
|
||||
XP_TE_INVITEDOTHER
|
||||
pevt_invitedother_help
|
||||
%C24*%O$t%C26$3%C has been invited to %C22$1%O by %C18$2%O (%C29$4%O)
|
||||
4
|
||||
|
||||
Join
|
||||
XP_TE_JOIN
|
||||
pevt_join_help
|
||||
|
@ -101,13 +101,15 @@ userlist_set_account (struct session *sess, char *nick, char *account)
|
||||
user = userlist_find (sess, nick);
|
||||
if (user)
|
||||
{
|
||||
g_free (user->account);
|
||||
|
||||
if (strcmp (account, "*") == 0)
|
||||
user->account = NULL;
|
||||
else
|
||||
{
|
||||
g_clear_pointer (&user->account, g_free);
|
||||
} else if (g_strcmp0 (user->account, account))
|
||||
{
|
||||
g_free (user->account);
|
||||
user->account = g_strdup (account);
|
||||
|
||||
}
|
||||
|
||||
/* gui doesnt currently reflect login status, maybe later
|
||||
fe_userlist_rehash (sess, user); */
|
||||
}
|
||||
@ -130,8 +132,11 @@ userlist_add_hostname (struct session *sess, char *nick, char *hostname,
|
||||
g_free (user->hostname);
|
||||
user->hostname = g_strdup (hostname);
|
||||
}
|
||||
if (!user->realname && realname && *realname)
|
||||
if (realname && *realname && g_strcmp0 (user->realname, realname) != 0)
|
||||
{
|
||||
g_free (user->realname);
|
||||
user->realname = g_strdup (realname);
|
||||
}
|
||||
if (!user->servername && servername)
|
||||
user->servername = g_strdup (servername);
|
||||
if (!user->account && account && strcmp (account, "0") != 0)
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
@ -247,7 +247,7 @@ joind_show_dialog (server *serv)
|
||||
G_CALLBACK (joind_ok_cb), serv);
|
||||
|
||||
if (serv->network)
|
||||
if (g_ascii_strcasecmp(((ircnet*)serv->network)->name, "freenode") == 0)
|
||||
if (g_ascii_strcasecmp(((ircnet*)serv->network)->name, "Libera.Chat") == 0)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (entry1), "#hexchat");
|
||||
}
|
||||
|
@ -1520,14 +1520,32 @@ static void
|
||||
mg_create_alertmenu (session *sess, GtkWidget *menu)
|
||||
{
|
||||
GtkWidget *submenu;
|
||||
int hex_balloon, hex_beep, hex_tray, hex_flash;
|
||||
|
||||
submenu = menu_quick_sub (_("_Extra Alerts"), menu, NULL, XCMENU_MNEMONIC, -1);
|
||||
|
||||
mg_perchan_menu_item (_("Beep on _Message"), submenu, &sess->alert_beep, prefs.hex_input_beep_chans);
|
||||
switch (sess->type) {
|
||||
case SESS_DIALOG:
|
||||
hex_balloon = prefs.hex_input_balloon_priv;
|
||||
hex_beep = prefs.hex_input_beep_priv;
|
||||
hex_tray = prefs.hex_input_tray_priv;
|
||||
hex_flash = prefs.hex_input_flash_priv;
|
||||
break;
|
||||
default:
|
||||
hex_balloon = prefs.hex_input_balloon_chans;
|
||||
hex_beep = prefs.hex_input_beep_chans;
|
||||
hex_tray = prefs.hex_input_tray_chans;
|
||||
hex_flash = prefs.hex_input_flash_chans;
|
||||
}
|
||||
|
||||
mg_perchan_menu_item (_("Blink Tray _Icon"), submenu, &sess->alert_tray, prefs.hex_input_tray_chans);
|
||||
submenu = menu_quick_sub(_("_Extra Alerts"), menu, NULL, XCMENU_MNEMONIC, -1);
|
||||
|
||||
mg_perchan_menu_item (_("Blink Task _Bar"), submenu, &sess->alert_taskbar, prefs.hex_input_flash_chans);
|
||||
mg_perchan_menu_item(_("Show Notifications"), submenu, &sess->alert_balloon, hex_balloon);
|
||||
|
||||
mg_perchan_menu_item(_("Beep on _Message"), submenu, &sess->alert_beep, hex_beep);
|
||||
|
||||
mg_perchan_menu_item(_("Blink Tray _Icon"), submenu, &sess->alert_tray, hex_tray);
|
||||
|
||||
mg_perchan_menu_item(_("Blink Task _Bar"), submenu, &sess->alert_taskbar, hex_flash);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1,62 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="notification-winrt.cpp">
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C53145CC-D021-40C9-B97C-0249AB9A43C9}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>notifications-winrt</RootNamespace>
|
||||
<ProjectName>notifications-winrt</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\win32\hexchat.props" />
|
||||
<PropertyGroup>
|
||||
<TargetName>hcnotifications-winrt</TargetName>
|
||||
<OutDir>$(HexChatRel)plugins\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT;NDEBUG;_WINDOWS;_USRDLL;NOTIFICATIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalUsingDirectories>$(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(DepLibs);mincore.lib;runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<MinimumRequiredVersion>6.03</MinimumRequiredVersion>
|
||||
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT;NDEBUG;_WINDOWS;_USRDLL;NOTIFICATIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalUsingDirectories>$(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(DepLibs);mincore.lib;runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<MinimumRequiredVersion>6.03</MinimumRequiredVersion>
|
||||
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
</Project>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="notification-winrt.cpp">
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C53145CC-D021-40C9-B97C-0249AB9A43C9}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>notifications-winrt</RootNamespace>
|
||||
<ProjectName>notifications-winrt</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\..\win32\hexchat.props" />
|
||||
<PropertyGroup>
|
||||
<TargetName>hcnotifications-winrt</TargetName>
|
||||
<OutDir>$(HexChatRel)plugins\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT;NDEBUG;_WINDOWS;_USRDLL;NOTIFICATIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalUsingDirectories>$(VC_LibraryPath_VC_x86_Store)\references;$(WindowsSDK_UnionMetadataPath);$(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(DepLibs);mincore.lib;runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<MinimumRequiredVersion>6.03</MinimumRequiredVersion>
|
||||
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT;NDEBUG;_WINDOWS;_USRDLL;NOTIFICATIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalUsingDirectories>$(VC_LibraryPath_VC_x86_Store)\references;$(WindowsSDK_UnionMetadataPath);$(VCInstallDir)vcpackages;$(FrameworkSdkDir)References\CommonConfiguration\Neutral;%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<CompileAsWinRT>true</CompileAsWinRT>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(DepLibs);mincore.lib;runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<MinimumRequiredVersion>6.03</MinimumRequiredVersion>
|
||||
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
</Project>
|
||||
|
@ -89,7 +89,9 @@ pixmap_load_from_file (char *filename)
|
||||
static GdkPixbuf *
|
||||
load_pixmap (const char *filename)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
GdkPixbuf *pixbuf, *scaledpixbuf;
|
||||
const char *scale;
|
||||
int iscale;
|
||||
|
||||
gchar *path = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "icons" G_DIR_SEPARATOR_S "%s.png", get_xdir (), filename);
|
||||
pixbuf = gdk_pixbuf_new_from_file (path, 0);
|
||||
@ -102,6 +104,24 @@ load_pixmap (const char *filename)
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
// Hack to avoid unbearably tiny icons on HiDPI screens.
|
||||
scale = g_getenv ("GDK_SCALE");
|
||||
if (scale)
|
||||
{
|
||||
iscale = atoi (scale);
|
||||
if (iscale > 0)
|
||||
{
|
||||
scaledpixbuf = gdk_pixbuf_scale_simple (pixbuf, gdk_pixbuf_get_width (pixbuf) * iscale,
|
||||
gdk_pixbuf_get_height (pixbuf) * iscale, GDK_INTERP_BILINEAR);
|
||||
|
||||
if (scaledpixbuf)
|
||||
{
|
||||
g_object_unref (pixbuf);
|
||||
pixbuf = scaledpixbuf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_warn_if_fail (pixbuf != NULL);
|
||||
|
||||
return pixbuf;
|
||||
|
@ -25,6 +25,9 @@
|
||||
|
||||
static hexchat_plugin *ph;
|
||||
|
||||
const int CHANNEL_FLAG_BALLOON = 1 << 21;
|
||||
const int CHANNEL_FLAG_BALLOON_UNSET = 1 << 22;
|
||||
|
||||
static gboolean
|
||||
should_alert (void)
|
||||
{
|
||||
@ -117,10 +120,24 @@ static int
|
||||
incoming_message_cb (char *word[], gpointer userdata)
|
||||
{
|
||||
int message;
|
||||
int flags;
|
||||
int alert = 0;
|
||||
|
||||
if (hexchat_get_prefs (ph, "input_balloon_chans", NULL, &message) == 3 && message && should_alert ())
|
||||
{
|
||||
show_notificationf (word[2], _("Channel message from: %s (%s)"), word[1], hexchat_get_info (ph, "channel"));
|
||||
flags = hexchat_list_int(ph, NULL, "flags");
|
||||
|
||||
/* Let sure that can alert */
|
||||
if (should_alert()) {
|
||||
/* Follow the channel rules if set */
|
||||
if (!(flags & CHANNEL_FLAG_BALLOON_UNSET)) {
|
||||
alert = (flags & CHANNEL_FLAG_BALLOON);
|
||||
} else {
|
||||
/* Else follow global environment */
|
||||
alert = (hexchat_get_prefs(ph, "input_balloon_chans", NULL, &message) == 3 && message);
|
||||
}
|
||||
}
|
||||
|
||||
if (alert) {
|
||||
show_notificationf(word[2], _("Channel message from: %s (%s)"), word[1], hexchat_get_info(ph, "channel"));
|
||||
}
|
||||
return HEXCHAT_EAT_NONE;
|
||||
}
|
||||
@ -129,8 +146,23 @@ static int
|
||||
incoming_priv_cb (char *word[], gpointer userdata)
|
||||
{
|
||||
int priv;
|
||||
int flags;
|
||||
int alert = 0;
|
||||
|
||||
if (hexchat_get_prefs (ph, "input_balloon_priv", NULL, &priv) == 3 && priv && should_alert ())
|
||||
flags = hexchat_list_int(ph, NULL, "flags");
|
||||
|
||||
/* Let sure that can alert */
|
||||
if (should_alert()) {
|
||||
/* Follow the private rules if set */
|
||||
if (!(flags & CHANNEL_FLAG_BALLOON_UNSET)) {
|
||||
alert = (flags & CHANNEL_FLAG_BALLOON);
|
||||
} else {
|
||||
/* Else follow global environment */
|
||||
alert = (hexchat_get_prefs(ph, "input_balloon_priv", NULL, &priv) == 3 && priv);
|
||||
}
|
||||
}
|
||||
|
||||
if (alert)
|
||||
{
|
||||
const char *network = hexchat_get_info (ph, "network");
|
||||
if (!network)
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
2
src/htm/Properties/Resources.Designer.cs
generated
2
src/htm/Properties/Resources.Designer.cs
generated
@ -19,7 +19,7 @@ namespace thememan.Properties {
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
2
src/htm/Properties/Settings.Designer.cs
generated
2
src/htm/Properties/Settings.Designer.cs
generated
@ -12,7 +12,7 @@ namespace thememan.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<AssemblyName>thememan</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<Import Project="..\..\win32\hexchat.props" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
@ -41,7 +41,7 @@
|
||||
<HexChatLib>$(HexChatBuild)\$(PlatformName)\lib\</HexChatLib>
|
||||
<HexChatPdb>$(HexChatBuild)\$(PlatformName)\pdb\</HexChatPdb>
|
||||
<HexChatRel>$(HexChatBuild)\$(PlatformName)\rel\</HexChatRel>
|
||||
<IsccPath>"$(MSBuildExtensionsPath32)\..\Inno Setup 5\iscc.exe"</IsccPath>
|
||||
<IsccPath>"$(ProgramFiles)\Inno Setup 5\iscc.exe"</IsccPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -31,9 +31,9 @@ Compression=lzma2/ultra64
|
||||
SourceDir=..\rel
|
||||
OutputDir=..
|
||||
#if APPARCH == "x64"
|
||||
OutputBaseFilename={#APPNAM} {#APPVER} x64
|
||||
OutputBaseFilename={#APPNAM}-{#APPVER}_x64
|
||||
#else
|
||||
OutputBaseFilename={#APPNAM} {#APPVER} x86
|
||||
OutputBaseFilename={#APPNAM}-{#APPVER}_x86
|
||||
#endif
|
||||
FlatComponentsList=no
|
||||
PrivilegesRequired=none
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
|
Loading…
Reference in New Issue
Block a user