Compare commits

...

949 Commits

Author SHA1 Message Date
50e2c6b3c7 Bump version to 2.12.2 2016-10-08 17:51:22 -04:00
7db74ec205 Update translations 2016-10-08 15:10:52 -04:00
492c209d07 Don't update usercount if doing nameslist 2016-10-08 14:55:58 -04:00
29b5785bb4 Update usercount in inbound_nameslist_end 2016-10-08 14:55:58 -04:00
7329dbdc57 fishlim: Bump version 2016-10-08 14:48:49 -04:00
bfe0af69fa fishlim: Remove outdated INSTALL file 2016-10-08 14:48:49 -04:00
c81c89dc80 fishlim: Fix saving nicks containing [ or ]
Part of #1440
2016-10-08 14:48:49 -04:00
31dd020114 fishlim: Add support for the /me command
Part of #1440
2016-10-08 14:48:49 -04:00
321587c73b fishlim: Add commands /topic+ /msg+ and /notice+
Part of #1440
2016-10-08 14:48:49 -04:00
dba19a961b fishlim: Add /keyx for DH1080 key exchange
Losely based upon work from PR #1440

Fixes #653
2016-10-08 14:48:49 -04:00
65abf5c532 sysinfo: fixup 49758cafba. (#1827)
MAC_OS_X_VERSION_MAX_ALLOWED reflects the currently running OS X version
more closely than MAC_OS_X_VERSION_MIN_REQUIRED, given it's defined as
max(current_version, MAC_OS_X_VERSION_MIN_REQUIRED).

Additionally, we should check if MAC_OS_X_VERSION_10_9 is actually
defined, otherwise the whole macro logic breaks apart.
2016-09-30 01:23:59 -04:00
c79ce843f4 build: Reorder includes to avoid installed plugin header
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
2016-09-26 19:16:42 -04:00
49758cafba sysinfo: fix compilation on OS X 10.9 and lower. (#1821)
Use the (deprecated) Gestalt functionality for fetching the fine-grained
OS X version number on 10.9 and lower.

The newer NSOperatingSystemVersion structure is only available on
10.10+.
2016-09-25 23:49:56 -07:00
15600f405f Sanitize network name for scrollback files
This prevents using invalid chars on Windows or creating directories
2016-09-11 15:50:19 -04:00
910851e04d perl: Fixed Windows build with VS2015u3. 2016-09-07 04:00:10 -07:00
d1bd441a9a plugin: Add chanmodes to channels list 2016-09-03 15:47:37 -04:00
737f87fa16 sysinfo: Fix leak 2016-09-03 12:29:01 -04:00
4658c5d4e5 sysinfo: Don't print swap if 0 2016-09-03 12:24:15 -04:00
332f2e65b9 Add .mailmap file
This just cleans up the results of git logs
2016-09-01 23:10:35 -04:00
3131661f9e dbus: Remove dbus-python example in favor of GDBus 2016-08-27 23:11:29 -04:00
ec4d3de9d2 dbus-client: Rewrite with GDBus
This is just a direct port and should change no logic
2016-08-27 23:04:20 -04:00
439ff094ce Fix building against openssl 1.1.0
Fixes #1759
2016-08-27 22:57:09 -04:00
7281da8b2c build: Avoid installing uncessary files with features disabled 2016-08-27 22:43:07 -04:00
dc09f2c75d Remove unused preference
I can't really think of a reason this would be needed
and since it doesn't do anything, and didn't since xchat,
 might as well remove it.
2016-08-20 23:24:19 -04:00
97d4afc4fb Update appdata file 2016-08-10 12:43:03 -04:00
19187dbacd lua: Fix handling -1 value in pluginpref 2016-08-05 21:15:26 -04:00
9d74ceedfd python: Fix get_pluginpref()
This relied on undocumented behavior of hexchat_pluginpref_get_int()
that has been fixed recently. -1 is the correct failure value.
2016-08-05 21:08:52 -04:00
034624983b plugin: Fix return value of hexchat_pluginpref_get_int()
On failure it should always return -1, atoi() returns 0.

Fixes #1785
2016-08-05 20:56:16 -04:00
74f014bd8c build: Add flag to disable stack-protector
This is currently an issue when building in Flatpak
2016-07-28 13:52:33 -04:00
aabcf6f9f4 Fix crashes when plugins modify UI during Close Context
This probably doesn't catch them all but setting tab color
and printing text at least do not crash in the common case.
2016-07-24 21:14:11 -04:00
ac986bb3a4 Fix leak 2016-07-24 21:10:34 -04:00
03767ee0f9 Kill fe_set_hilight()
It just duplicates functionality and this fixes:

- alert_taskbar chanopt not being respected
- tab color being incorrect when highlight print events are eaten
2016-07-24 18:08:09 -04:00
ba87247781 dcc: Improve handling multiple resumable offers
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 #1764
Fixes #1763
2016-07-20 14:11:01 -04:00
f845af0370 dbus-client: Fix missing include
Fix "Implicit declaration of function exit" compile error

Closes #1770
2016-07-20 14:04:30 -04:00
9ca1606e2a lua: Force 'return' when = is present 2016-07-14 17:04:58 +03:00
9c049271e7 lua: Add automatic return and = handling in console. 2016-07-14 01:43:26 +03:00
e647cd00c6 setup: Disabling input styling requires restarting 2016-07-05 15:40:42 -04:00
91df075d62 Fix input styling with Adwaita 3.20 theme 2016-07-05 15:26:05 -04:00
6168507272 win32: Update Python to 2.7.12 and 3.5.2 2016-07-02 19:39:30 +02:00
9fbd23b06f win32: Download redist for Perl if needed 2016-07-02 19:39:25 +02:00
9e11280e52 dcc: Introduce dcc_type and dcc_state enums
Closes #1705
2016-06-30 15:51:10 -04:00
77dccacd02 dcc: Fix resuming with DCC GET
Fixes #1746
Closes #1747
2016-06-30 08:45:01 -04:00
0667519d17 fkeys: Change unprintable characters to octal notation
- ^O is \017
- ^B is \002
- ^C is \003
- ^] is \035
- ^_ is \037
- ^V is \026

See ASCII(7) for an octal and hexadecimal table.
2016-06-29 15:51:53 -04:00
fbacb82191 Add keybinding for reverse video text
This adds the Ctrl+R keybinding by default to insert \026, the
character used for the reverse video text attribute.
2016-06-29 15:50:53 -04:00
6b2cc1d28b cfgfiles: Reinitialize timers on net_ping_timeout change
This ensures that changes will take effect without a restart.
2016-06-29 15:42:11 -04:00
a970c1ae2e cfgfiles: Introduce an after_update callback
This allows individual preferences to take action when their value is
changed.

Signed-off-by: Ben Gamari <ben@smart-cactus.org>
2016-06-29 15:42:11 -04:00
6a0e131b88 menu: Ensure that toggling lag-o-meter changes timer state 2016-06-29 15:42:11 -04:00
215a164e57 Ensure that timers are freed and activated when necessary 2016-06-29 15:42:11 -04:00
9e4c2ddc47 Apply timeout changes made in preferences dialog
Just involves a bit of refactoring.
2016-06-29 15:42:11 -04:00
bcbe42dd7a Introduce and use fe_timeout_add_seconds
This should allow the operating system to be a bit more lax about
timeouts, allowing more efficient power management.
2016-06-29 15:42:11 -04:00
25e197a6c8 dcc: Disable timeout timer when not in use
This should mean that hexchat never *needs* to wake-up unless prompted
by socket activity (assuming that the lag-o-meter is not enabled).
2016-06-29 15:42:11 -04:00
7dca220486 Refactor timer handling
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.
2016-06-29 15:24:03 -04:00
111ba3750f Mask nickserv ghost password
Closes #1750
2016-06-29 15:19:28 -04:00
16ba39d9fa Forcibly reset iconv converter after every conversion.
Despite what g_convert_with_iconv's docs say, it does not reset the converter on a failed conversion (iconv returns -1).

Fixes #1758
2016-06-24 12:09:35 -07:00
4ed1acfd52 Use constant instead of literal. 2016-06-24 12:05:37 -07:00
a1d2272dc0 notifications-winrt: Fix all uses of "" to L"".
The API uses Platform::String^. String's constructor takes in char16*.

Fixes #1755
2016-06-21 07:39:50 -07:00
c12f33aa4c servlistgui: Error if nicks left empty 2016-06-12 15:01:39 -04:00
a031a24cfd Bump version to 2.12.1-2 2016-06-05 11:22:24 +02:00
c698e13c0d Couple of minor const correctness fixes 2016-05-28 16:52:26 +10:00
10e429b85d Remove two un-needed type casts 2016-05-28 16:35:45 +10:00
6554a8d63c servlistgui: Show invalid nick/user on open
It is possible to have an invalid config from a previous upgrade

Fixes #1715
2016-05-16 08:51:18 -04:00
d32aa65bc7 Ignore VS2015 crap. 2016-05-12 22:21:26 -07:00
3c329727c7 servlist: Default to UTF-8 on PTNet
Fixes #1697
2016-05-03 20:16:49 -04:00
e223840fa6 Bump version to 2.12.1 2016-05-01 20:52:05 +02:00
ca6411c591 Bump version to 2.12.1 2016-05-01 14:34:46 -04:00
823ef320a5 lua: Use luaL_checkinteger 2016-04-27 14:55:04 -04:00
fe9da9314c Fixed warning from MSVC that not all branches return a value. 2016-04-27 11:39:29 -07:00
1c73f84f3a installer project needs to depend on lua plugin project. 2016-04-27 11:34:48 -07:00
d995272922 win32: Install doat by default 2016-04-26 12:08:11 -04:00
5b097f560d More minor scrollback loading improvements 2016-04-26 12:06:28 -04:00
f06a38c384 configure: Bundle ax_python_devel.m4
Upstream broke API so older distributions have broken system versions

Fixes #1632
2016-04-19 14:07:27 -04:00
44aa999598 Fix challengeauth lower casing username 2016-04-13 18:47:51 -04:00
54c6418d61 Support for older libnotify versions 2016-04-10 21:22:12 -04:00
bd358dd570 win32: Reflect lua path changes in gtk-win32 2016-04-09 12:18:02 -07:00
529ae4cc89 lua: Fix explicit braces warning 2016-04-07 19:02:38 -04:00
5b05271e4c win32: Install lgi with lua plugin 2016-04-07 18:27:43 -07:00
d11b7f258c lua: Minor formating cleanup 2016-04-07 18:27:40 -07:00
0694cb9045 lua: More consistency with Python plugin 2016-04-07 18:27:39 -07:00
8099f23bdf travis: Build on Ubuntu 14.04 2016-04-07 18:27:38 -07:00
a3e1a287ac Bump glib requirement to 2.34
This is still rather old but does drop Ubuntu 12.04 support.
2016-04-07 18:27:37 -07:00
f501e948ae lua: Some more refactoring. Fix unload hook in the interpreter. 2016-04-07 18:27:30 -07:00
ba6a1190cd lua: More missing statics 2016-04-07 18:27:30 -07:00
4abcd53044 lua: Make better use of GLib
- Use GPtrArray everywhere
- Remove unessary NULL checks
- Make use of g_clear macros
- Use g_str_has_suffix
2016-04-07 18:27:29 -07:00
2fe52bbf58 lua: Bump version and update copyright year. 2016-04-07 18:27:21 -07:00
5998696c2a lua: Use glib allocators 2016-04-07 18:27:13 -07:00
bc9a59d264 lua: Replace some pushnumbers with pushintegers 2016-04-07 18:27:07 -07:00
5699bf9e65 lua: Error if luaL_newstate returns NULL 2016-04-07 18:26:58 -07:00
c4c1c64f00 travis: Build with Lua 2016-04-07 18:26:47 -07:00
fb7f27fcdd lua: Build on win32 2016-04-03 12:02:04 -07:00
2e2b895ebe lua: Don't used mixed declarations
This requires a lot more cleanup
2016-04-03 11:04:48 -04:00
2e478f1b5a Import lua plugin
Written by @mniip
2016-04-03 10:30:01 -04:00
a77c6df7e2 configure: Place auxiliary files in own dir 2016-03-31 08:01:06 -04:00
19c4adf8ba autogen: Don't copy all files by default 2016-03-31 07:51:08 -04:00
1f48f9dd6f Increase default size of some util windows 2016-03-31 07:21:02 -04:00
b7373f4ddc unix: Open urls in existing instance if supported 2016-03-31 07:02:23 -04:00
9402a31111 Improve help message for /close
Closes #1397
2016-03-30 08:58:25 -04:00
58fb36ee34 Fix warning
Fixes #1533
2016-03-30 08:48:23 -04:00
f656569eb9 plugin: Fix padding for chanopts in channel flags
This is an API break but it didn't really work
properly before anyway.

Fixes #1666
2016-03-30 08:28:51 -04:00
0635e91dd6 Don't flush the chanopt_list when saving it
Closes #1665
Fixes #1134
2016-03-30 08:11:07 -04:00
5f2d6a3c11 servlistgui: Removes leading and trailing whitespace from hostnames
Closes #1651
2016-03-30 08:07:42 -04:00
356241bdfb url: Add support for ts3server:// uris
Closes #1659
2016-03-30 08:05:32 -04:00
dce6a7612a plugingui: Use full path when unloading/reloading plugins
Mentioned in mniip/hexchat-lua#5
2016-03-29 12:19:19 -04:00
60b3b43f3e Translate chanopt output 2016-03-28 21:31:35 -04:00
6cbcc73a79 chanopt: Ensure values are 0-2
If chanopt was set to any other value it would overwrite
other values in the plugin API for channel flags.
2016-03-28 21:19:39 -04:00
edcd9af47f installer: Use https for Python downloads 2016-03-28 05:10:08 -04:00
dd080fa6f3 Fix building on old glib 2016-03-28 01:36:02 -04:00
bcb4eec754 identd: Fix ipv6 support on Windows 2016-03-28 01:28:56 -04:00
795e97f428 identd: Fix respecting USE_GLOBAL network flag 2016-03-28 00:31:00 -04:00
77ac0863f8 identd: Respond for INVALID-PORT and NO-USER errors 2016-03-27 23:44:05 -04:00
963ba2bf2d identd: Ensure connection is closed 2016-03-27 23:18:24 -04:00
c280029436 servlist: Update DALnet default login type 2016-03-25 18:44:16 -04:00
47b357b2e1 Only intercept QuakeNet challengeauth when enabled 2016-03-24 15:42:49 -04:00
c1a94e2879 servlist: Add GlobalGamers
Closes #1334
2016-03-20 20:47:52 -04:00
c874a9525c Bump version to 2.12.0 2016-03-12 16:21:52 +01:00
fc20786a5e Bump version to 2.12.0 2016-03-12 03:04:42 -05:00
d48f31191f Updated location of GTK theme engines in 2.24.30. 2016-03-11 21:00:06 -08:00
7c078db879 Fix loading encoding from network list on connect
- 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
2016-03-11 02:15:42 -05:00
ebb0fd6905 identd: Fix leak 2016-03-09 00:38:56 -05:00
ed029357d1 sysinfo: Clean up ifdefs and handle unsupported CPU
Mentioned in #1624
2016-03-06 23:10:04 -05:00
10fa3b1878 build: Keep macros newer than Ubuntu...
Mostly for travis
2016-03-06 19:09:23 -05:00
98b0186feb build: Don't store autoconf-archive macros in repo
The release tarballs will still have them
2016-03-06 18:54:07 -05:00
35254fa6eb win32: Update Python to 3.5 2016-03-06 18:27:59 -05:00
6706b23a0b build: Use more secure flags 2016-03-06 18:27:59 -05:00
df36f88e88 Update translations 2016-02-19 09:54:19 -05:00
94a7fbae02 Fix possible overflow 2016-02-19 09:41:24 -05:00
bae1ebce2f Update network list
- Remove dead ones
- Use SASL and TLS when possible
- Make note of self-signed ones
- Add LibraIRC

Closes #1039
Closes #1512
Closes #1473
2016-02-19 09:39:16 -05:00
50463ca832 Properly handle missing SSL certificate
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
2016-02-19 07:26:50 -05:00
0826e7d353 python: Handle get_info('win_ptr') 2016-02-18 12:59:02 -05:00
aab881fda2 Fix strict prototype warnings 2016-02-18 08:57:22 -05:00
05385f2479 build: Enable more warnings/errors 2016-02-18 08:54:19 -05:00
650bddcfd1 Improve scrollback file handling
- 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
2016-01-31 15:31:15 -05:00
089fe95a42 perl: Fixed warning about duplicate definition of bool. 2016-01-30 19:57:12 -08:00
4362085847 Remove DH-AES/DH-BLOWFISH mechanisms and misc cleanup
- 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
2016-01-29 17:41:08 -05:00
6b62c4738d Add support for twitch.tv/membership 2016-01-29 15:28:34 -05:00
8da205b0a8 Add support for chghost 2016-01-29 15:28:33 -05:00
981d55e84c Add support for CAP 3.2 2016-01-29 15:28:33 -05:00
35d238ad3a Properly handle a few args optionally starting with :
This is a pervasive problem that will likely show up in
other events also.

Closes #1460
2016-01-28 22:49:23 -05:00
2c8729becd Handle PING and AUTHENTICATE with a prefix
Not the ideal solution..

Closes #1566
2016-01-28 22:38:36 -05:00
35f97b65c1 Sanitize server name for log files
It could contain invalid chars or log to an arbitrary directory
2016-01-28 16:22:04 -05:00
a2c2abd60a Fix missed comma 2016-01-28 16:17:30 -05:00
7a85c9160d Add support for cap-notify 2016-01-28 16:02:04 -05:00
4e061a43b3 Clean up handling CAP LS 2016-01-28 15:18:15 -05:00
5c534ac344 Fix leaks 2016-01-25 23:36:06 -05:00
ea9e8d353b identd: Use GDataInputStream 2016-01-25 22:53:42 -05:00
f14ad5e9dd Add identd to preferences 2016-01-25 22:51:11 -05:00
2226363fd0 Add ctags files to gitignore 2016-01-25 20:39:36 -05:00
5dafa60433 Rename identd variable name 2016-01-25 20:37:53 -05:00
971e5cf4fe Emit word_click even as long as user is not selecting any text when releasing button
This fixes the need to do pixel-perfect clicks to open links in chat
2016-01-10 12:37:30 -08:00
edd57fdc86 .travis.yml: use container-based infrastructure 2015-12-07 18:24:58 -05:00
eab580408c installer: Fixed VS2015 CRT DLL name. 2015-11-26 00:05:38 -08:00
26d3461f46 Make tab completion prefer other people
If you are talking with someone else with the same prefix as your
own nickname, and attempt to tab complete theirs. It will complete
your own nickname before theirs if you talked more recently. Since
people rarely intend to highlight themselves, this improves the
logic to complete your own name only as a last resort.
2015-11-14 23:22:57 -05:00
295061f461 Fix incorrect const usage 2015-11-09 14:51:48 -05:00
0bd15d435a Fix freeing string from g_get_user_name()
Fixes #1540
2015-11-09 14:41:42 -05:00
c8539b93fe xtext: Fix overflow on long lines
xtext keeps a static buffer and uses it for various things
and asserts that every text entry is < 4096. It does
this check on gtk_xtext_append*() except it does the check only on
the right half of text when indent is enabled.

This overflow caused corruption in the xtext struct
changing the url check functions making hovering
with the mouse do 'undefined' things.

In the long term this should be removed for a dynamically
allocated buffer so no arbitrary size limit exists and
text gets cut off.

Fixes #1465
Fixes #1186
Fixes #1206
2015-10-30 01:22:13 -04:00
1e914347d7 configure: Default to generating xz-tarballs only 2015-10-17 09:43:49 +02:00
66eebea2c3 build: Don't dist resources.h resources.c 2015-10-17 09:26:23 +02:00
9e2d5dae5e build: Determine resources-files once instead of three times 2015-10-17 09:13:29 +02:00
b8e7dfa4ba build: Let 'make dist' do a better job 2015-10-16 17:25:01 +02:00
1d8dd50455 win32: Fix installer 2015-10-12 19:26:28 +02:00
7f1ee9dad0 common: Moved some functions over from plugins/sysinfo that are useful for the rest of HC.
OS name, CPU, GPU, HDD info and build arch are now all available within core HC. OS name and build arch are used in the About dialog.
2015-10-12 19:20:53 +02:00
be5e2b9566 win32: Update Visual Studio 2015 redist links in installer 2015-10-11 16:14:23 +02:00
e40fbee772 win32: Add Windows 10 ID to manifest 2015-10-11 16:13:15 +02:00
7247c24e98 readme.md: Update jenkins links 2015-10-11 16:12:37 +02:00
f7e3d3f32c Use VS 2015 2015-10-10 16:14:12 -07:00
671a838b52 fe-gtk: Use manual registration for resources. 2015-10-10 16:14:07 -07:00
6ca29b2eb4 Update logo .ico with new shadow and standard sizes
hexchat.ico now contains all the sizes Windows uses.
2015-10-09 12:52:15 +02:00
15efdd5f2b Update logo SVG to smaller, solid shadow 2015-10-09 12:51:33 +02:00
599f5c7b29 win32: Don't rely on CWD for portable-mode check
Also cache the result...

Fixes #1500
2015-10-05 15:06:57 -04:00
fad8f93ad8 configure: Clean up Python checking
This fixes requiring to add a version every time
a new release comes out...
2015-09-30 03:55:42 -04:00
78486b49d5 Merge pull request #1162 from obskyr/master
Optimized and improved logo SVGs and PNGs.
2015-09-21 12:50:06 -04:00
9c5f577002 Don't use SASL on an unknown network
https://bugzilla.redhat.com/show_bug.cgi?id=1262763
2015-09-14 09:33:06 -04:00
dbad9285b8 TLS: Set SNI hostname before connect 2015-09-11 01:48:29 -04:00
73636a00b5 Removed SeionIRC from the serverlist
I'm removing Seion from the serverlist because it's now mostly a defunct network. One of the servers is completely broken in regards to ipv6 connectivity and SSL, the webchat server hasn't worked for months, and I shut down my server (fox.seion.us) a few days ago.
2015-09-05 13:58:34 +01:00
e7003ef9c6 Improve /mode behavior
This fixes /mode using the name of invalid contexts
and also adds some documentation to what is happening.

In the end though it still must guess between modes
and nicks if ran in a valid context.

Fixes #1470
2015-09-03 02:35:13 -04:00
9664b1b7e3 Fix select regression.
Fix selection when part of the selected text is above/below a border.
Also, fix problems uncovered by static analysis.

Fixes #1261.
2015-08-20 00:23:17 +02:00
422cce6f70 Fix crash in DBus plugin
Closes #1438
2015-08-02 08:06:21 -04:00
afd2135393 Fix possible overflow
gtk_entry_get_text_length() returns len in utf8
chars not in bytes
2015-06-04 04:02:33 -04:00
94ef0fd294 Fix warning 2015-05-28 14:13:34 -04:00
ebe1f824a7 Fix mnemonic collision
Alt+a is used for mark away in the menus and also
highlight all in the search box, change the latter to
alt+h.

Fixes #1008
https://bugzilla.redhat.com/show_bug.cgi?id=1173082
2015-05-27 13:42:59 -04:00
f7bea16e37 xtext: Fix poor performance with nick indent enabled
This fixes xtext re-rendering multiple times when the
indent width is not sufficient

Fixes #1364
Closes #1367
2015-05-18 06:31:00 -04:00
ff9c0dbd5e Update alternative font list 2015-05-08 00:02:09 +02:00
29321c8660 Fixed pango attributes not being applied in some cases.
gtk_entry_get_text_length returns the number of utf-8 characters in the GtkEntry, not the number of bytes in its text.
2015-04-25 16:51:29 -07:00
0b40146b85 Disable pango attributes on sexy entry while it contains preedit text.
Fixes #1360
2015-04-24 19:20:48 -07:00
9b2c560519 Remove unused file 2015-04-23 01:07:31 -04:00
3675302930 travis: But it needs intltool 2015-04-22 23:28:51 -04:00
925570aab1 travis: No longer need gnome-common 2015-04-22 23:24:19 -04:00
498f53b96a travis: No longer need to run ./configure 2015-04-22 23:22:06 -04:00
5263887ac3 configure: Simplify perl tests 2015-04-22 23:14:42 -04:00
73d865b243 configure: Better handling of missing pkgconfig 2015-04-22 22:54:30 -04:00
a3c257bdb4 configure: Consistently use autoconf macros for conditionals 2015-04-22 22:10:52 -04:00
6ad9419693 configure: Target versions of Ubuntu 10.04
travis-ci uses it still...
2015-04-21 23:07:28 -04:00
c5aa91a836 configure: Replace --enable-minimial-flags with standard --disable-debug 2015-04-21 19:16:41 -04:00
b10f94d5f6 configure: Some modernization 2015-04-21 19:16:11 -04:00
9a98de1f65 Remove requirement on gnome-common
I'm sure that will make a few users happy..
2015-04-21 18:44:30 -04:00
7363bc03f2 Remove r from mode buttons
No network can agree on what mode r actually
means so we can't have nice things.

Closes #1287
2015-04-21 16:07:12 -04:00
78e51a4f3f Fix mode button text being cut off
This no longer restricts their width and uses
monospace fonts so they are still the same
width.

Closes #1356
Fixes #1354
2015-04-21 15:35:15 -04:00
174db0eb7f winamp: More code cleanup 2015-04-14 10:02:27 -04:00
f64b61a1b9 winamp: Fix project file
Broken by 72d7f64f8b
2015-04-14 05:41:02 -04:00
a8392c7f95 winamp: Clean up formatting 2015-04-13 16:25:37 -04:00
72d7f64f8b winamp: Fix utf8 song titles
Fixes #1350
2015-04-13 16:25:36 -04:00
c86389f99b Fix possible overflow in pluginpref
Closes #1265
2015-04-07 06:38:59 -04:00
66f2f3a84a Improve /AWAY help message
Closes #1343
2015-04-05 00:54:52 -04:00
f8c7ea3672 Fix some text event descriptions 2015-04-04 04:29:39 -04:00
e313a82ab4 sysinfo: Strip trailing space on video card 2015-03-20 05:38:22 -04:00
9024a5c71b Fix typo 2015-03-20 05:37:27 -04:00
f03b6314b4 Remove unused files 2015-03-20 05:36:51 -04:00
ae2e5ab092 Fix conflicting type in header
gsize and size_t are not the same thing
2015-03-20 04:58:00 -04:00
167eb11ea7 Fixup 455fa24d
-Wformat=2 includes format-nonliteral
2015-03-19 17:21:41 -04:00
1cc06f9301 Fixup dc69f24ae
It still has to be in hex...
2015-03-19 16:47:37 -04:00
455fa24d63 configure: Remove a warning
Used everywhere needs to be fixed
2015-03-19 16:36:43 -04:00
dc69f24ae5 Use correct type for colors 2015-03-19 16:30:03 -04:00
b4906f3d23 Fix warnings 2015-03-19 16:06:49 -04:00
4e338a2b70 configure: Clean up testing warnings and add more 2015-03-19 16:04:04 -04:00
98fefcd162 Switch from mozilla-build to msys2. 2015-03-15 19:06:29 -07:00
fb422732f2 libenchant_win8 needs to depend on common to be able to use config.h 2015-03-08 12:47:03 -07:00
36a8ba126c Fix incorrect timestamp in scrollback with server-time
Fixes #1148
2015-03-02 19:58:27 +01:00
658f30ec43 configure: Don't depend on gtk-2.0.m4
It doesn't really add much value and it
is possible to build fetext without gtk installed
2015-03-01 08:47:35 -05:00
749e5b20da Make use of g_path_is_absolute()
No reason to roll our own.. in multiple places
2015-02-28 07:24:49 -05:00
d78db5070a Consistently use g_fopen()
It handles the correct encoding on win32
2015-02-28 06:47:40 -05:00
a5584c6b57 Clean up some ifdefs
Thankfully somebody already made a define for this, they
just never used it...
2015-02-28 06:43:33 -05:00
97bf0de016 Make Preferences option in plugin tray menu available on all platforms. 2015-02-27 17:33:33 -08:00
b6c4cfa2a3 Fixed undefined behavior causing hover highlights on the plugin tray menu not working.
Fixes #602
2015-02-27 17:24:57 -08:00
ec12871e60 Write scrollback as binary on win32
Proper fix for b66edd3
This issue likely applies elsewhere in HexChat
2015-02-27 16:20:09 -05:00
0a29313fff Remove unused win32 files 2015-02-27 15:06:45 -05:00
b009084a52 Don't install spelling dicts if win8+ 2015-02-22 00:20:26 -05:00
7e7e87600e More type issues/warnings 2015-02-21 21:01:14 -05:00
c36d4859d7 Fix type mismatch 2015-02-21 20:52:43 -05:00
c1d06c7d63 Fixed cast warning, use of uninitialized buffer and whitespace. 2015-02-21 17:28:56 -08:00
5e3355a6c3 Unify sysinfo plugins and add osx support
This does remove the net* commands from the
Unix version that may return at a later date
with OSX and Windows support.

This commit also makes numerious other changes
such as code cleanup, reformatting, etc.

Closes #829
2015-02-21 20:09:15 -05:00
363321dc33 Fixed installer not actually bundling libenchant_win8.dll because it wasn't made to depend on the project. 2015-02-21 03:17:44 -08:00
4d44c17939 Removed unused variables left behind from bbb81af 2015-02-21 03:14:32 -08:00
5b24c60def Win8+ native spell checking requires compiling with Win8 target.
Win8-specific features are still loaded dynamically, so HC still works the same on W7.
2015-02-21 03:12:27 -08:00
96026b82c7 Add support for native win8+ spell checking 2015-02-21 05:54:58 -05:00
e42da22716 Revert "xtext: Unselect old selection on button press" - breaks clicking URLs to open them.
This reverts commit 8ca96d7ea3.
2015-02-20 02:54:41 -08:00
0a8248578f Remove compiled date from about
Distros like Debian depend on repeated builds
having the same results which this breaks.

Since this provides no real value just
remove it.
2015-02-19 21:00:24 -05:00
c87f559334 Fix distfiles 2015-02-15 15:20:38 -05:00
8ca96d7ea3 xtext: Unselect old selection on button press
Fixes #943
Closes #1293
2015-02-15 13:17:55 -05:00
bbb81af550 Removed unnecessary Windows-only code for seeding openssl's RNG.
openssl seeds itself with CryptGenRandom on Windows in the same manner as /dev/(u)random on other OSes.
2015-02-14 00:31:41 -08:00
a22816fbbd Don't try to disable compression if openssl hasn't been compiled with compression support.
The function is still defined in openssl/ssl.h but not in the actual library, so it cannot be linked to.
2015-02-14 00:30:00 -08:00
b6877ccf5c win32: Use WinSparkle for handling updates
Fixes #1282
2015-02-12 19:11:46 -05:00
7063406d6c Remove input_balloon_time setting
This setting doesn't work on most platforms
including some notification daemons on linux.

Where it does work I think it is bad behavior
to default overriding their defaults anyway.

It's most valuable use was likely win32
tray balloons which no longer exist.
2015-02-11 17:58:44 -05:00
9858784eb6 Better project files.
- Output directly to rel\ instead of to bin\ and then copying files over.
- Deduped Win32 vs x64 configs
- Moved some common properties to hexchat.props
- All build intermediates (except htm's intermediates) are no longer emitted in the source directory
2015-02-11 10:01:29 -08:00
7e4a585611 win32: Use https for installer downloads
Fixes #1268
2015-02-11 07:59:48 -05:00
5a87d814cf Call CoInitialize, CoInitializeSecurity and CoUninitialize from the main process, not from a DLL.
They're process-level functions and aren't meant to be called from DLLs. CoInitSecurity in particular fails with RPC_E_TOO_LATE even if no other call to CoCreateInstance has been made yet.

Fixes sysinfo's WMI calls on Windows 8.1 and above.
2015-02-10 22:14:22 -08:00
ac54a2ed45 Allow reordering some dialogs with dnd
This sadly can't work everywhere since they all
have entirely different ways of saving the data..

Related to #1288
2015-02-08 01:51:22 -05:00
296fbaf94f Fix automake error 2015-02-04 21:49:58 -05:00
75c022c49f Implement OSX notification backend 2015-02-04 21:41:10 -05:00
f4f27e438b Implement windows 8.1+ notifications
This splits notifications up into multiple backends
currently only libnotify on unix and win8 toasts.

The win8 backend was originally written by @leeter
though heavily modified.
2015-02-04 20:24:53 -05:00
a216ed1df9 Partial fix for Windows 10 detection 2015-02-04 04:48:44 -08:00
afee9fd42b Only send utf8 string in Key Press event
Fixes #869
2015-02-02 02:56:08 -05:00
60fa7efbc8 Fix logging hostname of queries
- Move query topic setting from frontend (where its too late)
- Respect chanopts for logging hostname
- Open query logfile *after* chanopts loaded
2015-02-01 01:47:50 -05:00
dc9a7d3a59 sysinfo: Fix braindead logic for stripping spaces from the end of the OS name. 2015-01-31 21:29:10 -08:00
1d83610341 Save iconv converters for input and output in the server.
These are then used with g_convert_with_iconv instead of making it create a new iconv converter every time for the given from-to-encoding pairs.
2015-01-31 00:52:31 -08:00
5dde0d7c6d Also verify encoding read from servlist.conf 2015-01-31 00:52:30 -08:00
9968bb31a4 sysinfo: Strip spaces from the end of the OS name, if any, and ensure a space between name and arch. 2015-01-31 00:52:30 -08:00
5fe2dda146 ssl: Remove unused server code 2015-01-30 21:25:41 -05:00
85fd6f525e Add default keybinding for shift+tab (Previous tab complete) 2015-01-26 17:53:33 -05:00
e5b65bbd69 servlist: Clean up specifying ssl for network 2015-01-20 03:03:45 -05:00
a838cd9c07 servlist: Various changes
- Remove IRCNode
- Replace Techmans with Techtronix
- Remove unecessary ports
- Consistently use round-robin over specific servers
- Don't use mixed-case hostnames

Closes #1244
2015-01-20 02:43:16 -05:00
02470dffa5 servlist: Add AthemeNet and remove its old networks
Closes #1272
2015-01-19 11:31:42 -05:00
c5bbf75f5e Removed one leftover check for server->encoding against NULL. 2015-01-18 02:55:32 -08:00
b783c827c8 Fixed incorrect comment on server->encoding. 2015-01-18 02:27:38 -08:00
d1897c1602 Remove "System default" encoding. The default for new servers is UTF-8. 2015-01-18 02:10:05 -08:00
6f8a6e66cc Detect unknown server encodings and set to UTF-8. 2015-01-18 02:10:05 -08:00
5749c53484 Server line text-encoding-related fixes.
- Handle server lines that contain sequences which are invalid in the server encoding. Previously, these would cause the whole line to be interpreted in ISO-8859-1, but now they're simply replaced with an appropriate replacement character.

- Removed prefs.utf8_locale.

- Change default server encoding from system locale to UTF-8.

- Always populate server->encoding with a non-null value - UTF-8.

Fixes #1198
2015-01-18 02:10:04 -08:00
5569205d15 Add CP1252 as an available server encoding for Windows-1252 and ISO-8859-1 networks. 2015-01-18 02:10:04 -08:00
2e76a4e477 Removed CP1255-specific handling of server lines.
GLib's API is good enough now.
2015-01-18 02:10:03 -08:00
ee17ec6b4f Removed legacy "IRC" encoding. 2015-01-18 02:10:03 -08:00
5a56f9ea01 Removed unimplemented, unused function. 2015-01-14 23:42:21 -08:00
e400ed2855 Fixed bad const-cast. 2015-01-14 21:38:19 -08:00
1d316710ed Don't crash if the log file can't be opened.
Found in #1269
2015-01-14 16:29:03 -08:00
aab243592f Workaround crash when timestamp format is blank
Somebody else can fix the numerous assumptions elsewhere
2015-01-13 04:14:32 -05:00
13db2011e3 Fix leak
From libressl-portable/openbsd@20de8a4923
2015-01-09 17:25:45 -05:00
7739c99f3f Update alternative font list 2015-01-07 22:46:37 +01:00
99f74e8d94 Also print the command that wasn't recognized. 2015-01-07 13:42:42 -08:00
5ca87b3c8d identd: Fix unknown command when service fails to start 2015-01-07 16:21:46 -05:00
62df565190 sysinfo: Also show HDD information. 2015-01-05 03:57:59 -08:00
4f08b0b386 sysinfo: Don't confuse build architecture with CPU architecture. 2015-01-04 16:54:15 -08:00
5b8cc683f3 sysinfo: Refactored out individual WMI parsing methods. 2015-01-04 15:08:45 -08:00
e758da5d28 Bring the sysinfo plugin to the 21st century.
- Support multiple CPUs and graphics adapters in the WMI responses.
- Query max CPU frequency from WMI instead of registry.
- Support uptimes longer than 50 days.
- Don't report using /ME in notice and server notice tabs.
- Convert to C
2015-01-03 15:26:05 -08:00
16d1fccf61 Fix disabling identd server 2015-01-03 18:00:37 -05:00
086d4e3962 python: Use Py_RETURN_NONE macro 2014-12-31 15:11:47 -05:00
9bd7405502 Remove last remnants of GtkClists
These were removed a while ago
2014-12-31 11:57:27 -05:00
2a28289314 Don't return 0 in place of NULL 2014-12-31 11:31:17 -05:00
112632bb4e Fix some possible null-deref warnings 2014-12-31 11:12:43 -05:00
c5016e390f Show correct number of channels/dialogs when closing server tab 2014-12-31 10:50:13 -05:00
63bb87fc93 Don't select join #hexchat by default in join dialog
Have to go even one step further removed so users don't
accidentally join
2014-12-31 10:44:36 -05:00
1fa4a000e7 Fix some unused warnings 2014-12-31 10:24:51 -05:00
448cc962cd Python: Fix overflow and code-cleanup 2014-12-31 09:50:03 -05:00
6ef7298870 Remove unnecessary use of void* 2014-12-31 03:56:36 -05:00
9f7444baa2 Move userlist sorting to frontend
This Fixes possible crashes when the two
usertrees get out of sync and a double free occurs.

Also now requires restart to change sort orders.

Fixes #1252
Fixes #818 (probably)
2014-12-31 03:56:36 -05:00
fef580ed7f Rewrite identd
- Use gio (which is cross platform)
- Properly support multiple users
- Allow configuring port
- Allow other plugins overriding
2014-12-30 06:35:42 -05:00
3bb717a3b5 Fix windows build
Introduced 1b2bee37e
2014-12-29 02:08:42 -05:00
5beaf15f21 Remove option to use socks5 library
This was always disabled by default and is not required
for the current socks support. I am not even sure this
library is packaged by any distro?
2014-12-28 22:29:06 -05:00
1b2bee37e4 Remove option to disable ipv6
It has been default for a while, is the only tested option,
and will only get more common.
2014-12-28 22:29:06 -05:00
9cb73f839f Remove MSProxy support
It's not enabled anywhere, certainly not maintained
2014-12-28 13:28:19 -05:00
330e31c70f Fix overflow 2014-12-28 12:43:53 -05:00
cbaa04905f Fix warning 2014-12-28 12:38:19 -05:00
14d3a03f41 Fix leak in make-te
This doesn't really matter but it shuts up AddressSanitizer
2014-12-28 08:14:05 -05:00
95febd978c Fix building as c89 2014-12-28 06:47:23 -05:00
3f855f07f5 Use glib for allocations in all plugins
Continuation of 83032b1aa
2014-12-28 06:47:07 -05:00
83032b1aa3 Use glib for all allocations
- Removes need to check for malloc failure
- Removes need for NULL checks on free
- Adds checks for integer overflows
- Removes some extra memset calls
- Removes chance of mixing libc and glib malloc/free
2014-12-28 06:44:44 -05:00
c4cb1b25ec Fixup: Detect urls with unicode symbols
missed one in 77ecaa6093
2014-12-28 00:40:51 -05:00
77ecaa6093 Detect urls with unicode symbols
Fixes #1250
2014-12-28 00:29:58 -05:00
664f6bf1e7 configure: Set glib min requirement to 2.32
and warn when using newer APIs
2014-12-17 18:21:10 -05:00
aeb5d15871 More consistently include config.h 2014-12-17 18:21:10 -05:00
76c2cfebc3 Don't require glib 2.40 2014-12-15 15:34:12 -05:00
addefa9ef1 fishlim: Handle server-time 2014-12-15 15:08:00 -05:00
7769bc99fe fishlim: Use proper filesystem encoding for files 2014-12-15 15:08:00 -05:00
ce396b3ddb fishlim: Use standard keyfile save function 2014-12-15 15:08:00 -05:00
ebe0ad4cd5 fishlim: Strip whitespace when deleting keys
This fixes a personal annoyance when you tab complete
a channel to delete
2014-12-15 15:07:43 -05:00
bdb5c3eb9d fishlim: Use hexchat_nickcmp() 2014-12-15 15:06:48 -05:00
c54a0c6db9 fishlim: Improve string handling 2014-12-15 15:06:48 -05:00
46061f4f3c Remove some unnecessary if statements 2014-12-15 14:51:07 -05:00
ec7a0d6e13 Fixed some more signed-unsigned-comparison warnings. 2014-12-15 10:25:28 -08:00
a86b03e939 Remove unused header 2014-12-15 11:07:47 -05:00
35fd47da55 Add patch from cygwin 2014-12-15 11:07:47 -05:00
2b1396add3 Update .gitignore 2014-12-15 11:07:47 -05:00
0e4164ad0c configure: Improve various build flags
- Store openssl flags in own vars
- Share some common flags for plugins
- Fix building plugins on win32
- Store all glib flags in one var
- Don't link against every lib for each plugin
- Don't hardcode ldflags for sysinfo
2014-12-15 11:07:46 -05:00
94568bc517 checksum: Use glib for io/checksum and misc fixes
- Fixes support for large files.
- Fixes filenames not being passed in the filename encoding.
- Drops openssl dependency.
- Code cleanup.
- Fix 'unknown command' warning.
2014-12-15 10:40:15 -05:00
226d54c90d Fix use after free 2014-12-14 19:35:27 -05:00
7e4c482737 travis: Build with static analysis 2014-12-14 18:20:50 -05:00
ac01ba9cb0 perl: Fixed warning about implicitly casting the time_t returned from hexchat_list_time() to an NV. 2014-12-14 13:31:19 -08:00
a537fa3ca7 sysinfo: Simplify remove_leading_whitespace()
Also fixes a possible overflow
2014-12-11 14:17:12 -05:00
f614a3c311 Fix possible overflow when using /menu 2014-12-11 13:49:37 -05:00
d6e3f740bc Fix some leaks 2014-12-11 12:13:57 -05:00
72f82d096c Fix some warnings in xsys
- Remove unused code
- Fix leak
2014-12-11 10:05:05 -05:00
74ff67acd3 Create configuration option to control middle click tab close.
Some might argue that this shouldn't be able to be configured as it is "common" behaviour
in other programs such as web browsers, but for me it is an annoyance because for 15
years this has not been the behaviour of X-Chat.
Quite simply, this creates a configuration option for 537fb856, as unobtrusively as
possible, under the channel switcher preferences tab.

Closes #1232
2014-12-10 15:09:04 -05:00
6aafc8e51d Fix chanopts not saving if /quit before exit
This is the C fix, unfortunately a proper fix, e.g.
 removing the dependency on session_name all together is a much vaster
 refactor outside the scope of this bugfix.

Closes #1111
2014-12-10 14:40:42 -05:00
10246f121a Fix unsafe string handling in configs
Also fixes 2 leaks
2014-12-10 09:32:16 -05:00
025152ee53 Fix unused warning 2014-12-10 09:00:29 -05:00
58e871696b Fix typo 2014-12-10 09:00:04 -05:00
0ba8b922a2 Fix tab completing with no completion char 2014-12-09 23:03:44 -05:00
b296839538 Respect servers chantypes and nickprefixes when tab completing
Closes #441
2014-12-09 05:45:50 -05:00
5fb21a04ad Use gboolean for bools 2014-12-09 05:45:01 -05:00
fda692d250 Fix various unsafe string handling in fkeys
Also removes the 2048 input byte limit
And fixes utf8 completion chars in some cases
2014-12-09 05:30:35 -05:00
99a1fff590 Removed unused hexchat_filename_*_utf8 macros. 2014-12-08 21:30:02 -08:00
65c8494698 Removed some unnecessary casts. 2014-12-08 21:25:00 -08:00
2b94011fdc Removed some commented-out code. 2014-12-08 21:25:00 -08:00
2da5308fd2 Fixed leak of filename string. 2014-12-08 21:25:00 -08:00
c1831cb19d Minor tidying up 2014-12-08 21:24:59 -08:00
65da34f19e Removed some unnecessary null-checks for calls to g_free and g_strfreev 2014-12-08 21:24:59 -08:00
b7afcc3632 Don't leak filename_fs on errors. 2014-12-08 21:24:58 -08:00
73cd6487d0 Update travis notification format 2014-12-06 17:28:41 -05:00
5152040c17 Always use 64-bit filesize and file offsets in DCC.
Based on LRN's commit for replacing stat with GFileInfo https://github.com/hexchat/hexchat/commit/32008bb

Fixes #382
2014-12-06 14:02:45 -08:00
985ea610e6 Store timer hook's timeout as milliseconds. 2014-12-04 04:06:38 -08:00
8062bce835 Fix some obvious type warnings. 2014-12-04 04:06:38 -08:00
3fbe5b876e Add missing dependencies for glib's g_spawn on windows 2014-12-02 22:12:48 +01:00
e38f00775f configure: Add option to run clang static analysis 2014-12-02 01:06:25 -05:00
05a6097dc6 Fix copying timestamp with server-time and indent nicks off 2014-11-30 22:33:30 -05:00
85557f2416 Fix duplicate timestamps on selection
Fixes #1226
2014-11-30 22:27:00 -05:00
0019af675a Fix compilation on Windows 2014-11-30 20:41:13 +01:00
f03023297b Fix handling --cfgdir
Fixes #1225
2014-11-29 08:31:35 -05:00
c92b247878 Fix building against openssl 0.9.8
Closes #1221
2014-11-26 08:15:34 -05:00
232096801b Bump updater version to 2.10.2 2014-11-25 10:37:00 -08:00
c0769397d5 Fix possible crash in SASL Blowfish mech 2014-11-22 20:56:15 -05:00
c9b63f7f9b ssl: Validate hostnames
Closes #524
2014-11-21 23:19:30 -05:00
ebaaf466bf ssl: Use more secure options
This disables ssl 2/3
2014-11-05 02:17:34 -05:00
4b6215051f ssl: Don't use global openssl context
Fixes #789
2014-11-05 01:27:39 -05:00
f83d78dd28 Warning cleanup
- ignoring const
- declarations after statements
- some C files didnt include own headers (risking them getting out of sync)

Closes #1064
2014-11-02 14:41:20 -05:00
9fb4eb5107 configure: Fix checking for perl
Closes #1196
Fixes #1197
2014-10-29 17:28:04 -04:00
3c89de48a8 Remove old config migration
Fixes #1194
2014-10-25 06:50:02 -04:00
6653582f0a Fix textbox not scrolling to to bottom on resize
Set buf->scrollbar_down conditionally when vertically resizing text window
If resize to enlarge appears to go to last line, set buf->scrollbar_down to be sure.

Fixes #1151
Closes #1171
2014-10-10 13:35:00 -04:00
9e9ed54bfa Transparent tray icon background. 2014-10-01 12:26:11 +02:00
aece18dfd5 Optimized and improved logo SVGs and PNGs.
Optimized SVGs by hand, ~80% size reduction.
Optimized SVGs for browsers, can now be rendered properly by Gecko- and
Webkit-based browsers.
Resized SVG page, shadow is no longer cut off to the right.
Switched tray icons for ones without the cut-off shadow.
Optimized and switched icons for the new ones.
2014-09-30 15:24:05 +02:00
abaed2bda4 Fix parsing of MONITOR responses
Fixes #1157
2014-09-27 13:11:21 -04:00
e8fb2dde56 Fixed instances of hexchat_printf that unsafely used a string parameter as a format string.
Fixes #1153
2014-09-25 00:54:38 -07:00
25c6638ce4 travis: Add clang & CPUs & fast_finish
HexChat seems to compile fine with clang so why to not test it too.
-j$(nproc) seems to work with HexChat and fast-finish marks build as
failed if one job fails.

Fast finish won't stop jobs that aren't finished at the time of failure.

Closes #1147
2014-09-21 04:31:16 -04:00
ce4e129849 Take two at fixing out of source builds 2014-09-21 03:53:30 -04:00
ecd1aa226a Fix attempting to toggle visibility when tray disabled 2014-09-21 03:37:03 -04:00
760d18b6e7 Fix missing header
And just use g_snprintf() while at it..
2014-09-20 14:09:38 -04:00
f389257403 Increase max len of chiper names
For example ECDHE-ECRSA-AES256-GCM-SHA384
2014-09-20 13:56:09 -04:00
84df81f336 Replace some unsafe usage of strncpy
Ensure everything is null terminated
2014-09-20 13:52:31 -04:00
a9a6cbda4e win32: Fixed build break due to 7a4a024 2014-09-17 13:00:11 -07:00
7a4a0243bd Fix out of source builds
Fixes #1018
2014-09-14 17:43:44 -04:00
e209e55e59 Use PlaySoundW to play sounds on Windows.
Fixes #1133
2014-09-13 00:23:44 -07:00
ad2300f236 Correctly open URLs with non-ASCII characters on Windows.
Fixes #1023
2014-09-13 00:22:48 -07:00
80bdd9ce11 Detect utf8 urls
They might not be valid, but like many things they are still used
2014-09-07 19:51:59 -04:00
5f99d34c3b Fix opening utf8 urls on OSX
- Escape hostnames with punycode
- Use proper encoding when launching open
2014-09-07 19:45:44 -04:00
2aa3eb8cfb Escape values set via pluginpref
Fixes #790
2014-09-01 18:17:26 -04:00
d1b9118056 Fix DOMAIN and EMAIL patterns.
Closes #1107
2014-09-01 17:55:22 -04:00
fd95c729d5 xtext: Add word and line selection modes
Similar to a GtkTextView if you double click you enter word selection mode
and if you triple click you enter line selection mode.
Allowing you to drag and select more than a single character.

Closes #1108
2014-09-01 17:53:03 -04:00
d1c40196e3 Fix using negative index 2014-08-23 14:13:34 -04:00
9716185edf Use glib to get portable mode dir
This should fix any non-ascii paths
2014-08-23 12:45:02 -04:00
a38892ff3b Use GFile API in gtkutil_check_file instead of stat/access.
The latter functions expect codepage-encoded filenames on Windows but GLib's API returns filesystem-encoded paths, which on Windows are UTF-8. GLib API should be used to deal with GLib API results.

Also fixed leaks in two of the callers of gtkutil_check_file()

Fixes #968
2014-08-20 12:50:08 -07:00
dc18e3da07 Update badges in readme 2014-08-20 15:19:57 -04:00
9127b510f2 Update readme.md 2014-08-15 19:55:40 -04:00
8f9ed6d942 Bump master to development release 2.11.0
To anybody confused this is not the next stable release, it is just a way to differentiate master
from the 2.10 branch and next stable will be 2.12.0 similar to Gnome's versioning scheme.
2014-08-07 16:30:28 -04:00
422edd8812 osx: Create bundles using homebrew
Just easier to maintain than jhbuild.

See https://github.com/TingPing/homebrew-gnome for deps.
2014-08-01 04:03:54 -04:00
345c8a29ad Stupid github editor adding newlines 2014-07-28 16:24:43 -04:00
a854234c1f Fix warning 2014-07-28 16:18:27 -04:00
4b549eeac8 Bump updater version on Windows 2014-07-28 16:14:10 -04:00
7c2c8b1403 Fixed expand_homedir to handle paths like "~user" correctly. 2014-07-28 14:49:14 -04:00
c2ecb4c68c Fix various crashes with pluginpref 2014-07-28 14:47:19 -04:00
ea9dafcd43 Add GeeksIRC and IRC4Fun to network list
Closes #1057
Closes #1058
2014-07-21 15:37:03 -04:00
7a7b9c682d Fix apostrophe related spell check issues 2014-07-21 15:10:21 -04:00
0d3706e2ee Fix possible crash in spell check
Closes #1048
2014-07-19 15:51:06 -04:00
3c584e2cd5 win32: Update Python links 2014-07-19 10:08:12 -04:00
9372972ad4 win32: Don't allow installing on Vista
It does not run on Vista
2014-07-19 10:06:29 -04:00
121cb8b88d Fix formatting warnings
Found by #1059
2014-07-18 07:16:43 -04:00
93caf4c7b4 Use GNUC format attribute on print functions
Closes #1059
2014-07-18 07:09:07 -04:00
21c0e47869 travis: update before installing deps 2014-07-17 07:33:57 -04:00
f1e853c1cb Disable tray support on Elementary
They followed Ubuntu in breaking any gtk trays..
2014-07-05 13:08:48 -04:00
aa7291fc9c configure: Improve python logic
- add checks for python3.4
- only warn once for failure to find a version
- only run pkg-config call if the .pc file was actually found
- make unsupported python version non-fatal

Closes #1006
Closes #989
2014-06-27 19:23:11 -04:00
3de79bca10 Update server list
Closes #1013
2014-06-27 19:19:13 -04:00
466646f84a win32: Silent installer improvements
- Launch uninstaller as VERYSILENT
- Don't launch Python/Perl installers when silent
2014-06-27 19:10:55 -04:00
e0f80e41bf win32: Use theme shipped with gtk
No reason for us to maintain own copy. This also
makes custom theme installing easier.
2014-06-25 20:38:53 -04:00
9a5977a9c9 Fix autotools warning 2014-06-21 23:13:05 -04:00
c3c6b46230 Clean up includes for gettext
It is always enabled.
2014-06-21 23:10:18 -04:00
47b4b0da8a Remove unused defines 2014-06-21 22:45:21 -04:00
45526205ab Remove broken debug code 2014-06-21 22:21:12 -04:00
3342af4185 Make plugin-timer translatable 2014-06-21 22:11:37 -04:00
7374637d34 Some problems in banlist.c are fixed 2014-06-17 17:16:45 -07:00
62209618e1 We don't ship DNS as a plugin anymore 2014-06-13 22:31:08 -04:00
7bfa2ee8a7 Fix GTK+ bundle licenses missing from installer 2014-06-13 22:31:00 -04:00
73c914cca9 Enable logging by default 2014-06-13 18:21:41 +02:00
77d9d421fb Partial fix for out of source builds
Patch from LRN

Perl's makefile needs fixed and the relative include
of config.h needs removed from hexchat.h

Mentioned in #1018
2014-06-09 13:54:16 -04:00
59f3a65911 Fix sending notify list to correct networks
Fixes #1015
2014-06-08 01:41:50 -04:00
9181ea068a Fix dcc dir warning showing when not auto-accept 2014-06-04 20:55:34 -04:00
c1d9aad546 win32: Fix path in installer project 2014-06-04 14:07:43 -04:00
3cd8556c54 Use GDir instead of dirent 2014-06-04 13:56:33 -04:00
9c981cfc6b Fix warning 2014-06-04 13:47:09 -04:00
11e3ecc739 Stop hardcoding plugin extensions everywhere 2014-06-04 11:15:35 -04:00
5849a0588e Use glib to parse and launch commands for util_exec
Fixes #958
2014-06-04 10:38:23 -04:00
b8c02f71d9 win32: Use config.h instead of config-win32.h 2014-06-04 10:30:18 -04:00
806b98dfc2 Update server list
Removed any server that could not be connected to atm

Closes #666
2014-06-03 17:20:01 -04:00
518669de80 Remove random ifndef WIN32
I never found a reason for it existing, but it also never affected much anyway.
2014-06-03 10:02:19 -04:00
8538dd1a49 win32: Don't auto-generate version.txt 2014-06-03 09:43:14 -04:00
a918ec2236 Fix scrolling the chanview on Unix
Fixes #948
2014-06-03 08:39:37 -04:00
af7e6d3e20 fishlim: Fix filename in error messages 2014-06-02 18:28:35 -04:00
7c52e29e6e Handle a special character before "+OK", e.g. identify-msg + or - 2014-06-02 23:52:34 +02:00
d59acc2789 Use path to HexChat instead of XChat in the test program
Note that this affects the test program only. It doesn't affect users
of FiSHLiM. The reason for this change is that XChat doesn't seem to be
maintained any longer.
2014-06-02 23:51:58 +02:00
33b01b720c Add missing include in the test program 2014-06-02 23:51:04 +02:00
d190773d09 Fix memory leak in the test program 2014-06-02 23:49:42 +02:00
d8c80cd277 Fix undefined behaviour in left shift
This is not a problem with a usual compiler configuration, but LLVM/clang
detects it when compiled with:

-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -ftrapv
2014-06-02 23:47:27 +02:00
3fb04bee85 Update translations 2014-06-02 22:18:25 +02:00
8578a9d52d Always use GModule for plugin support
Also cleans up some dead code
2014-06-02 05:38:13 -04:00
0b492d32b3 Add missing files to POTFILES.in 2014-06-01 17:19:09 -04:00
9b9ca27987 Bump version to 2.10.0 2014-06-01 13:07:12 -04:00
6187b35fa6 Remove dead network 2014-06-01 11:52:09 -04:00
6cf54d6515 Remove some hardcoded version numbers
- man page
- makebundle.sh
2014-06-01 11:40:48 -04:00
9344373e0b Sensitize open dialog button in friends list when selected
Fixes #1001
2014-05-31 14:18:48 -04:00
3d1d9e1716 Add SeionIRC to serverlist
Closes #982
2014-05-31 13:29:45 -04:00
e18a086ccf Add StormBit to network list
Closes #873
2014-05-31 13:29:19 -04:00
0838f8f688 Cosmetics 2014-05-31 17:15:45 +02:00
b3bcf71981 osx: Fix loading system's openssl config 2014-05-31 10:04:05 -04:00
6d03ddc4f4 osx: More theme tweaks 2014-05-31 08:22:01 -04:00
5706550cc1 Rework gtk_xtext_selection_draw(), simplify calls to _selection_render()
Fixes #992.
2014-05-31 02:40:28 -07:00
af7463e2bc osx: Use key theme shipped with gtk 2014-05-30 08:22:08 -04:00
e13e0f4314 win32: Fix exiting fullscreen to a maximized window 2014-05-30 04:26:34 -04:00
31843017d4 Make lawyers happy 2014-05-29 18:04:28 +02:00
0e0efbdb9a Replace Inno Perl with MSI Perl 2014-05-29 15:33:03 +02:00
a93e152912 ... and update perl description in installer 2014-05-28 19:14:17 -04:00
fdd922433b win32: Update perl urls in installer 2014-05-28 19:06:16 -04:00
8c00a4ff40 perl: Update Perl to 5.20 2014-05-28 18:22:19 +02:00
5f5c44620b Update translations 2014-05-28 05:31:51 -04:00
637c153de3 Use newer format for default keybindings
This uses the proper bindings on OS X
2014-05-28 01:39:45 -04:00
a800765b70 osx: Use applespell enchant backend
And fix enchant loading backends in the bundle
2014-05-27 23:50:46 -04:00
f92e72a92c osx: makebundle.sh improvements 2014-05-27 20:35:43 -04:00
0f6434986f osx: Properly handle quitting 2014-05-27 03:07:03 -04:00
f43b7524e0 osx: Properly use app menu
Mentioned in #994
2014-05-27 02:58:44 -04:00
cd1b9f42be osx: Use osx friendly bindings for GtkEntry
Fixes #995
2014-05-26 23:48:52 -04:00
4320d88b90 Fix crash with invalid dnd to userlist 2014-05-26 05:11:47 -04:00
cba4462458 osx: Improve gtk theme 2014-05-26 02:33:42 -04:00
30de7a1377 Update default settings
- Enable server-time
- Disable tree dots
2014-05-23 18:57:44 -04:00
011514e1ad Enable drag and drop on Windows
The issues around it no longer seem to exist in current GTK
2014-05-23 18:47:27 -04:00
6fb8cf40e1 Fixes #959. In xtext.c:find_x() return offset to hidden text if appropriate. 2014-05-22 07:06:51 -07:00
015cecf724 Fix drag and drop 2014-05-21 10:18:37 -04:00
904493b24f Show notifications for private actions
Fixes #990
2014-05-20 22:03:45 -04:00
95f9ca917e Default completion to last spoke 2014-05-12 05:10:26 -04:00
0dccf692d4 Add global option to suppress nick change events
Might as well add a per-channel option, too but for me that seems a bit unnecessary.
Closes #971
2014-05-12 05:01:24 -04:00
7435572282 Properly support notices to prefix'd users on a channel
Instead of hardcoding this behavior for @, +, and %, fetch the list of
mode prefixes from the server's state and look for one of those instead.

Closes #977
2014-05-12 04:55:45 -04:00
17671ec694 Fixed truncation of the reason when receiving a KILL message.
The KILL handler thought the message started one word later than it did, and
would cut off the first word.  This change starts the reason in the correct
place, and shaves off a leading : if one is present.

Closes #977
Closes #774
2014-05-12 04:52:42 -04:00
187c04f7e2 Add missing NULL check in cmd_lastlog
Closes #961
2014-05-12 02:33:02 -04:00
5af678d2b9 Default Techman's World IRC to SASL
Closes #963
2014-05-12 02:30:27 -04:00
1265eee9e5 Fix spell check on OSX 2014-05-11 06:46:12 -04:00
e5f7441bae Fix sorting problem when using tabs
Fixes #949
2014-05-11 05:02:20 -04:00
6ef41f7d4f Fix logging incorrect timestamp with server-time
Fixes #972
2014-05-11 05:02:19 -04:00
fea144dd19 Add option to bounce dock icon on OSX 2014-05-11 04:50:35 -04:00
fea528c39d Don't ignore command key in keybindings on OSX 2014-05-11 04:48:44 -04:00
9599c29c46 Use filesize format based on OS
Adds gui_filesize_iec option on Unix

Closes #966
2014-05-03 23:57:45 -04:00
fe71af15a7 Fix warning 2014-04-29 22:59:04 -04:00
b049757302 Replace deprecated GetVersionEx calls with version helpers
Only compiles with 8.1 SDK but runs everywhere

Closes #957
2014-04-24 06:55:16 -04:00
5fee31b1f0 Use the right API to get the path to Roaming AppData and Downloads directories, and actually convert it to utf-8 instead of using it directly. 2014-04-21 09:58:04 -07:00
e4413e0178 Don't convert the result of g_get_user_name / g_get_real_name from locale to utf-8 on Windows. They return utf-8 already. 2014-04-21 09:16:13 -07:00
dc27640265 Use utf-8 variant of strftime to format log file paths.
strftime assumes the format string is in locale encoding, which mangles log file paths that are in utf-8.

Fixes #767
Fixes #945
2014-04-21 01:39:28 -07:00
41c209bf45 Reset all nick entry errors in servlist when fixed 2014-04-19 22:52:30 -04:00
231590f71e sysinfo: Use less ambiguous IEC prefixes in storage measurements
Closes #922
2014-04-19 22:49:45 -04:00
7e55e4ee73 python: Scan for non-NULLs in print events
Closes #916
Closes #915
2014-04-19 22:30:31 -04:00
8bdde3a2df Fix warnings like usual 2014-04-18 23:50:27 -04:00
c8b3eef351 Improve displaying errors in servlist 2014-04-18 23:45:27 -04:00
5f297950a2 Fix issues removing autojoin channels
- Makes remove case insensitive
- Fixes crashing when channel not found
2014-04-18 20:40:33 -04:00
ccf49aa48d Fix #928. Fix memory leak, mea culpa. 2014-04-17 15:07:50 -07:00
b66edd372e Fixes #928 again. In scrollback replay, skip every line that starts 0x0d. 2014-04-17 09:53:09 -07:00
2a2eafcf1d win32: Update gtk theme description in installer 2014-04-17 02:43:22 -04:00
8a0f2b1d21 Use glib to format filesize in dccgui 2014-04-15 04:05:18 -04:00
660b860ddd Fix whitespace... 2014-04-10 23:05:04 -04:00
f27b2e82fa Add Xertion to network list
Closes #939
2014-04-10 22:59:04 -04:00
f994ef3f92 win32: Fix python 3.4 check in installer 2014-04-08 20:17:04 -04:00
b41bd594b0 Add account to Join event
Also reorganizes some logic. The account will usually be NULL unless
extended-join capability enabled.

Closes #934
2014-04-06 15:33:22 -04:00
0f828dd74f Add marker-line functionality for scrollback, instant seek.
Fixes #662.
2014-04-02 16:14:45 -07:00
5e8bc980e1 Merge pull request #929 from hexchat/928
Fix scrollback_load to deal with e.g. the output of /HELP
2014-03-30 20:09:37 -07:00
4ca9672a92 Fix scrollback_load to deal with e.g. the output of /HELP
Fixes #928.
2014-03-29 14:31:19 -07:00
1a3bfdce75 Improve handling scrollback when gui_tab_server==FALSE
Fixes #925.
2014-03-24 21:22:04 -04:00
46e449f110 Correctly scroll down autojoined channels
Fixes #58
2014-03-19 10:31:52 -04:00
0487daf865 Fix three miscellaneous bugs in gtk_xtext_get_word()
* Use utf8 functions for moving within string
	* Fix memory leak
	* Fix non-indent select problem
2014-03-19 10:31:26 -04:00
99ee7b6ef8 win32: Quote paths when invoking glib-compile-resources.exe
Also escape the trailing backslash in DataDir since otherwise it escapes the double-quote after it.
2014-03-18 11:05:54 -07:00
4cc764256c win32: Powershell.exe absolutely needs "-File" when running scripts or else it parses arguments with spaces as separate parameters. 2014-03-18 10:44:53 -07:00
36950c0d46 win32: Bump python to 3.4.0 2014-03-17 09:05:58 -04:00
caddb25711 Disable compression on tree_channel.png
This causes some artifacts in the icon, none of the others seem to have
the problem
2014-03-15 12:12:39 -04:00
d374f3ffe6 Disable hiding characters in the input 2014-03-15 12:12:38 -04:00
664da30ee4 Partial revert of 5f732128
Still some scrolling issues remain, much work is to be
done to properly fix it.
2014-03-15 12:12:38 -04:00
e36855a21e Fix miscapitalization 2014-03-11 17:55:01 +01:00
fd0eeddcc9 Add ElectroCode
Closes #910
2014-03-08 01:16:42 +01:00
b52650de5d Added Anthrochat and Furnet to server list
Closes #900
2014-03-08 01:14:20 +01:00
71e54854ec win32: Updated Python dependencies to 2.7.6 and 3.3.4 2014-02-28 01:11:18 -08:00
e6e5659b11 Minor redesign to text events window
This makes it more consistent with the other settings windows

- Use editable cell for entry
- Use pane to resize both treeviews
- Make preview fixed size and on bottom
- Enable search for event name
2014-02-18 17:02:19 -05:00
dd128ce534 Remove migration code for xchat 1 colors 2014-02-16 19:47:22 -05:00
8f6a596057 Properly handle shift tab in keyboard shortcuts 2014-02-16 14:48:17 -05:00
85aff53a88 Use more user friendly label for keys in keyboard shortcuts 2014-02-16 11:08:32 -05:00
bed5a21700 Add safemode action to desktop file 2014-02-16 01:05:07 -05:00
12cd5cb64a Translate desktop files 2014-02-16 00:56:48 -05:00
0d4cde2ba8 Tweak readme formatting 2014-02-15 18:08:01 -05:00
45cfb71c3e Add Jenkins badge 2014-02-15 23:31:49 +01:00
40e8ca9f6e Hide tray balloon option on OSX 2014-02-15 12:34:46 -05:00
d3b4771103 Fix warning.. 2014-02-15 11:55:29 -05:00
22b5affbe6 Use GRegex for channel list search
This adds support for Windows
2014-02-15 11:50:22 -05:00
b245f2f79e Tweak column sizing in channel list 2014-02-14 21:24:12 -05:00
f35ae03a66 Build with GTK_DISABLE_DEPRECATED 2014-02-14 16:31:08 -05:00
725aed43ff Redesign keyboard shortcuts window
- Convert GtkCLists to GtkTreeViews
- Save keybindings in GtkAccelerator format
- Store keybindings in a GSList
2014-02-14 16:29:44 -05:00
655b524ee6 Cleanup the preferences window
Simplifies some code and removes many widgets
2014-02-14 16:17:08 -05:00
b17c0276de Fix some leaks 2014-02-12 10:31:11 -05:00
ba399eb7f9 Remove unused function 2014-02-12 10:20:23 -05:00
6d815ac688 Fix warning 2014-02-12 09:27:28 -05:00
93d0341f9c Show help as tooltips in editlists 2014-02-09 02:42:40 -05:00
2f847428aa Fix hiding unsupported channel modes in topicbar 2014-02-07 04:04:59 -05:00
02275dff51 Fix some warnings in editlist 2014-02-07 02:27:44 -05:00
34cf164aa2 Use a single marshal file for entire project 2014-02-06 20:17:08 -05:00
5f7321280e Use a standard GtkScrolledWindow with xtext
Used in maingui, fkeys, text events, rawlog

This also implements the set_scroll_adjustments signal in xtext
2014-02-06 20:17:07 -05:00
8d77fd6a57 win32: Update installer for new Perl 2014-02-06 16:47:34 -05:00
b1b6255f38 Revert e64aa93f8 2014-02-05 01:27:36 -05:00
e64aa93f85 Use persitance with libnotify
This will keep notifications in gnomes tray
similar to a tray icon.
2014-02-05 01:00:06 -05:00
4c1fd3ee67 Fix many many problems in xtext.c related to character width.
* Rework multiline logic to use a GSList, not an array
* Remove all multibyte booleans; everything is potentially multibyte
  - Except for gtk_xtext_get_word(), which needs special attention
* Enhance pango work for bold and italics (attr_list -> attr_lists[4])
* Enhance gtk_xtext_strip_color () to save bold, italics info
* Involve emphasis information in all pixel-width calculations
* Rework find_x () to account for emphasis info in widths

Closes #891
Fixes #872
2014-02-04 21:26:58 -05:00
10d3c15143 Add /getbool command 2014-02-04 20:46:43 -05:00
3a7fb4d8e1 osx: Set Menlo as default font
This moves the find_font function to the front ends since it depends on
pango and cairo
2014-02-04 20:45:29 -05:00
8e55157e6a Print help messages for user commands 2014-02-04 20:32:10 -05:00
29e01daeae Merge pull request #890 from orium/lagmeter-fixes
Lagmeter fixes
2014-02-04 17:29:27 -08:00
9f01950bcb Fix warning 2014-02-02 19:07:52 -05:00
ed5ead6a07 Merge pull request #892 from ShutterQuick/patch-1
servlist: Add Canternet
2014-02-02 15:42:31 -08:00
1b936965ee servlist: Add Canternet 2014-02-02 23:08:32 +01:00
0cb025ff06 Prevent users from having the same alternate nicks
For some reason users do this and then complain when they cannot connect
when nick is in use. There are other ways for them to break it but at
least it shouldn't be on accident.
2014-02-01 13:31:42 -05:00
604337ccc7 Make all parent directories when creating configdir 2014-01-30 21:42:03 -05:00
b1a3c6135c Add synIRC to network list
Closes #888
2014-01-30 17:24:03 -05:00
9969282c72 Now make_ping_time() in common/util.c returns the time in milliseconds instead
of microseconds.
In fe_set_lag(serv, lag) the lag argument is now in milliseconds as well.

Fixes #758.
2014-01-30 19:23:35 +00:00
a1f01aca0f osx: generate plist file 2014-01-30 02:13:42 -05:00
83bf77f4d0 More autotools cleanup
- Don't build msproxy if unused
- Add resources to cleanfiles
- Remove old extra_dist from plugins
2014-01-30 02:01:42 -05:00
9ec4aa897a Use verbose builds with travis 2014-01-29 16:27:45 -05:00
a466369356 Respect verbosity setting when building htm 2014-01-29 16:25:57 -05:00
007f49c39f Fixes #881 Fix two bugs --
gtk_xtext_find_char() adjust negative y for int typecast
	gtk_xtext_find_x() return out_of_bounds TRUE if line outside windodw
	gtk_xtext_selection_draw() recognize TRUE out_of_bounds
2014-01-29 11:56:23 -08:00
6487e1b391 osx: Silence openssl deprecated warnings 2014-01-29 12:16:36 -05:00
e962039f83 configure: Don't error when python not found 2014-01-28 16:19:06 -05:00
6964079673 osx: Fix bundled Python 2014-01-28 16:19:06 -05:00
c9818adfb1 osx: Fix loading plugins from bundle 2014-01-27 19:59:23 -05:00
eb1d3a063a Allow overriding libdir 2014-01-27 18:39:26 -05:00
1d6d737927 Fixed lag meter getting stuck.
Also lag_sent in struct server should have always been an unsigned long.

Fixes #749.
2014-01-27 19:57:41 +00:00
efcb850956 win32: Include gtk theme in minimal install 2014-01-26 06:55:39 -05:00
35e84f6edc Show error when you lack write permissions to configdir 2014-01-26 06:55:38 -05:00
7fcf70c539 Fix loading default keybindings w/o write permissions
Closes #615
2014-01-26 06:30:33 -05:00
4510e8e2a2 Enable --command on win32
and make existing depend on
2014-01-20 20:42:48 -05:00
92a3a34785 Actually call commands sent with --command
Closes #884
2014-01-20 16:42:33 -05:00
4d1dc12a31 Remove unused xdcc server plugin 2014-01-20 04:44:44 -05:00
63edd4555b Translate appdata file 2014-01-20 03:04:52 -05:00
10a03f2216 configure: Clean up EXTRA_DIST 2014-01-20 02:38:32 -05:00
f7e3be4849 Don't store the potfile in git 2014-01-20 01:45:41 -05:00
58a3980372 Remove unused plugins 2014-01-20 01:31:41 -05:00
093bdd8b1c Fix warning
Leftovers from 38cbabea
2014-01-20 01:25:35 -05:00
681e14b3b8 Remove unused perl files
- old example scripts
- outdated docs
- mingw build script
2014-01-20 01:14:10 -05:00
38cbabea02 Revert GtkObject removal until Gtk3 2014-01-18 21:48:41 -05:00
ce09cb4a91 Update most deprecated gtk functions 2014-01-18 14:47:17 -05:00
fa1eb92a7b Update most deprecated gdk functions 2014-01-18 14:47:17 -05:00
eb29de1c7c Show a popup when opening plugin window when built without support 2014-01-16 00:58:04 -05:00
0297da4d6e Fix warning when built without plugins 2014-01-16 00:46:49 -05:00
eb90f076bb configiure: Fix testing compiler flags on anything other than gcc 2014-01-16 00:32:52 -05:00
c2c705a945 configure: add missing result message 2014-01-16 00:20:44 -05:00
6f6070b8c8 configure: Don't build python or perl plugin when plugins are disabled 2014-01-16 00:12:06 -05:00
37d92dd69c Check for gio during configure 2014-01-15 13:20:15 -05:00
8af9727937 Add gtk-mac-bundler files 2014-01-14 22:38:44 -05:00
7b0acb2b44 Build with gtk-mac-integration
- Use HexChat logo for dock icon
- Use appmenu (not finished)
2014-01-14 22:14:27 -05:00
4319f8009c Don't use SCROLL_HACK on osx 2014-01-14 22:14:27 -05:00
b2e3214d61 Clean up formatting during build 2014-01-14 01:18:15 -05:00
0b52ec3676 Move acinclude.m4 into m4 dir 2014-01-14 00:51:48 -05:00
599b9b0379 configure.ac: Actually check the CFLAGS and LDFLAGS returned by ExtUtils::Embed before deciding to compile the Perl plugin.
- openSUSE has ExtUtils::Embed, EXTERN.h and perl.so in the base perl package.
- Fedora has ExtUtils::Embed in a separate perl-devel package.
- Mageia has ExtUtils::Embed in the base perl package but EXTERN.h in a separate perl-devel package. Without this package, the compiler complains about the missing header.
- Debian has ExtUtils::Embed and EXTERN.h in the base perl package but perl.so in a separate libperl-dev package. Without this package, gcc compiles successfully but complains at link-time about -lperl (ExtUtils::Embed returns '-lperl' in ldopts but it's not actually installed).

configure.ac already requires ExtUtil::Embed to enable perl. To handle the case of Mageia and Debian, this change uses AC_TRY_LINK to verify that the flags returned by ExtUtils::Embed can actually be used to compile before deciding to enable the perl plugin.
2014-01-13 18:27:32 -08:00
a87b61c73f Build system improvements
- Use AM_GLIB_GNU_GLIB and IT_PROG_INTLTOOL
- Use gnome-autogen.sh
- Move language list to own file
- Delete generated config.rpath file
2014-01-13 14:27:36 -05:00
c804179a99 Tweak 908 syntax 2014-01-12 13:00:27 -05:00
baa5f9710a Add another badge to readme 2014-01-12 10:05:42 -05:00
37135cd682 ... Add inbound_sasl_supportedmechs to inbound.h 2014-01-12 07:13:51 -05:00
0f0dabdcf4 Support numeric 908 2014-01-12 07:10:26 -05:00
a817072e6f Add Turkish language to preferences
Users of uk, vi, and wa languages will have to manually change their
lang on Windows after this.
2014-01-11 18:34:30 -05:00
2ea1a992b1 Fix Turkish translation & update language list 2014-01-11 23:54:16 +01:00
649e962e6d Update Translations 2014-01-11 23:09:40 +01:00
7337007fe2 ... and ignore blank network passwords 2014-01-11 16:27:34 -05:00
6e049d5975 Login when /server is used on known hostname
This brings back old behavior where you can /server to another
server in the same network and login with services but now is only
sent when the server is known not every time so more secure.
2014-01-11 16:08:50 -05:00
b2a780e97a libsexy: Properly reflect reset attributes in input 2014-01-11 15:44:54 -05:00
aae6633c28 Don't select tab while closing with middle-click
Also fix unused warning and ignore shift right click
2014-01-08 09:03:50 -05:00
91ea5b6907 Fix warnings 2014-01-08 03:51:39 -05:00
20d26aea94 Rewrite dns command
- Cross platform
- Doesn't depend on external tools
2014-01-08 01:32:28 -05:00
9cba22c38a Define AI_ADDRCONFIG in inet.h, needed by OpenBSD 2014-01-04 23:13:34 -05:00
1e1ef1c6cf Change url-handler example to firefox -new-window
Firefox removed the ability to open private windows with a link
2014-01-03 03:39:35 -05:00
537fb85696 Bind middle-click to close tab
Closes #832
2014-01-02 18:03:32 -05:00
2bd1c3f99d Fixed whitespace. 2013-12-27 19:50:50 -08:00
c531db4714 fe-gtk: Fixed notification balloons for PMs not getting displayed if blinking tray icons for PMs is unchecked. 2013-12-27 19:41:18 -08:00
c7bf4b0474 Replaced use of T4 templates with PS-based templates.
TextTransform.exe is not available with Express versions of Visual Studio.
2013-12-27 12:05:07 -08:00
61ceaef57e Properly request server-time when it's the only cap
Closes #862
2013-12-27 09:20:39 -05:00
afb6685593 Merge pull request #842 from ManiacTwister/setup-fix
Fixed setup window title offsets
2013-12-25 08:31:13 -08:00
1311748b06 Merge branch 'pr/823' 2013-12-25 10:23:46 -05:00
7537bf8f07 Merge pull request #846 from grimreaper/patch-1
Fix autogen.sh shebang line
2013-12-25 07:23:14 -08:00
96fd4949bd Add Techman's World IRC network
Closes #813
2013-12-25 10:22:35 -05:00
f87071b7e2 Fix autogen.sh shebang line
/bin/bash does not exist on many systems.  In addition this script appears to be POSIX compatible so just use the appropriate shebang line.
2013-12-25 10:22:25 -05:00
5e455be5f3 Merge pull request #864 from RichardHitt/snadge
Ignore realname if it's a null string
2013-12-23 13:53:59 -08:00
d7e3e4c9a4 Only return channel sessions from find_channel()
Closes #865
2013-12-23 16:44:40 -05:00
26268d3188 Ignore realname if it's a null string 2013-12-22 11:19:30 -08:00
407613a8db Fix NAMES command syntax 2013-11-28 05:01:40 -05:00
ae4e55b922 Merge pull request #848 from orium/print-priority-847
Print{,_attr} and server{,_attr} hooks priority fix
2013-11-27 18:19:42 -08:00
40f26429f8 Print{,_attr} and server{,_attr} hooks were incorrectly handled when both
version existed (regular and attrs).  Specifically, the priority was not
respected, and both versions were run even when EAT_PLUGIN was returned.

Fixes #847.
2013-11-28 02:11:33 +00:00
60ea2874b3 Fix autogen.sh shebang line
/bin/bash does not exist on many systems.  In addition this script appears to be POSIX compatible so just use the appropriate shebang line.
2013-11-23 22:43:40 -05:00
d38bbb1e2c update help message for /names 2013-11-23 15:31:09 -05:00
5c223ec5d5 Fix more warnings 2013-11-22 16:53:50 -05:00
a656cee382 Fix warnings 2013-11-22 16:25:34 -05:00
9772eae568 Merge pull request #845 from somasonic/master
Added Interlinked to servlist.c
2013-11-19 15:27:11 -08:00
a45ba5bdc0 Add Interlinked 2013-11-19 22:16:57 +00:00
2bbb2ac7db Fixed setup window title offsets 2013-11-18 03:37:11 +01:00
5331a6145b Fix crash with negative timestamp in banlist
Closes #841
2013-11-17 11:57:13 -05:00
5c872eb110 win32: Improvements to portable-mode in installer 2013-11-16 15:37:41 -05:00
9834301eda win32: Download spelling dictionaries from installer 2013-11-15 09:49:01 -05:00
3821e7a750 Fixes #836. Move to line boundary in _scroll{down,up}_timeout() not _scroll(). 2013-11-14 19:18:07 -08:00
1aca24f3de Fixes #837. Rewrite gtk_xtext_scroll{down,up}_timeout(). 2013-11-12 15:02:38 -08:00
811caaaa3d Fixes #836. In gtk_xtext_scroll() always force line integral line boundary. 2013-11-11 12:55:38 -08:00
3f1994f3bf win32: Download deps during installation 2013-11-10 03:56:50 -05:00
39aec3a45b installer: Use correct path to iscc.exe depending on the platform. 2013-11-03 14:46:13 -08:00
e8282d97f1 fe-gtk: Quote path to glib-compile-resources.exe 2013-11-03 14:24:49 -08:00
2e75068c7c Use correct path to TextTransform.exe depending on the platform. 2013-11-03 14:16:11 -08:00
af248ce2c1 Fix invalid timestamps crashing on Windows 2013-11-02 21:07:03 -04:00
7e6f37b4cd Update help message for kick/kickban 2013-11-01 14:42:43 -04:00
f178b551da Don't auto unmark away when getting znc playback 2013-11-01 00:58:27 -04:00
9afd169362 Round 4 of gtk accessor functions: setup.c 2013-10-29 00:54:12 -04:00
9e5551aa59 win32: Install pixbuf engine 2013-10-28 21:56:01 -04:00
e8d4f3f848 Properly set away and fullscreen menu items 2013-10-27 13:24:15 -04:00
30a47cf62e Fix random_line() cutting off text
fgets() wont include the newline
2013-10-27 13:21:52 -04:00
aadee8afba Use a full path to configdir when using portable mode
This avoids the issue of plugins changing paths on us
2013-10-27 12:51:14 -04:00
a1c9294b89 Only update userlistgui when necessary 2013-10-26 13:37:20 -04:00
7cf9ea83cb xtext: Get proper text width with attributes 2013-10-26 08:51:50 -04:00
d1de138cb1 Sensitize banlist buttons if half-op
For #647
2013-10-25 09:28:09 -04:00
cff05cef68 Update readme.md 2013-10-24 07:24:18 -04:00
120a5a1dcd Match nick last when checking url
Closes #796
2013-10-23 06:32:57 -04:00
36e41a6476 fix another warning 2013-10-22 14:53:33 -04:00
0ff2ade078 fix warning 2013-10-22 14:44:30 -04:00
bb5d589c79 Open channel list window on /list 2013-10-22 13:35:28 -04:00
6d3c176ff8 url_check_line () now recognizes all urls
previously it only recognized url with "://" after the scheme.
Urls without a scheme are purposely not recognized by this function.

Fixes #701
Closes #815
2013-10-22 13:28:03 -04:00
a25363f5c3 make_re() now doesn't free the argument.
This is good practice and also helped simplifying re_*() functions.
2013-10-22 13:26:30 -04:00
a72d40284d fix some warnings 2013-10-22 06:21:58 -04:00
4a591cf7d7 Port editlist to GtkTreeView 2013-10-22 06:08:09 -04:00
19e3fce2eb Fix SASL on some networks 2013-10-20 22:29:16 -04:00
62735c54fb sysinfo: Fix showing debian version on ubuntu 2013-10-20 21:15:12 -04:00
712cfc3135 win32: install theme manager by default 2013-10-20 03:37:58 -04:00
20c9c94a61 Ignore nick prefix when splitting NAMES reply 2013-10-20 01:33:57 -04:00
ad1520b29a Only split NAMES reply if server supports userhost-in-names 2013-10-20 00:29:58 -04:00
06a7d84b43 Add support for userhost-in-names capability 2013-10-18 04:40:39 -04:00
d960006de4 Add option to auto +x on connect 2013-10-17 23:43:58 -04:00
cf5e2f273f libsexy: last color parsing improvement 2013-10-17 21:59:31 -04:00
f342123d7f libsexy: More color parsing improvements 2013-10-17 21:37:02 -04:00
aac231d307 Remove dead networks 2013-10-17 05:20:22 -04:00
0e8069661f Default to SASL on every supported network 2013-10-17 05:16:27 -04:00
737325b417 Remove #xchat from ChatJunkies autojoin 2013-10-17 05:00:40 -04:00
bc3b923131 Respect use global flag with SASL 2013-10-17 04:52:06 -04:00
c6ad450151 Focus new server tabs 2013-10-15 22:54:38 -04:00
a284219abd Reset entry attributes on newlines 2013-10-15 22:41:50 -04:00
2e08b3a2da Add remaining chanopts to plugin api
In flags of get_list('channels')
2013-10-15 18:30:37 -04:00
57d168e56a Fix moving channels when using tabs 2013-10-15 01:10:03 -04:00
490b9a91e4 Don't overwrite existing ignores when flooded
Closes #792
2013-10-14 17:25:21 -04:00
80cbc74b2b Remove commented out networks in servlist 2013-10-13 15:13:51 -04:00
cf370d7e79 When opening a query dialog with /query nick msg, the message was not shown in
the newly opened dialog. This fixes that issue.
2013-10-13 14:38:26 -04:00
fd13e4046f Perl: fixed crash when a script exits abnormally 2013-10-13 14:26:54 -04:00
1b07c0f54b Renamed FurryLand to ElectronIRC
Closes #804
Closes #780
2013-10-13 14:21:03 -04:00
d941af5a6f Don't open banlist in empty channel tab 2013-10-13 12:54:14 -04:00
e2edbfe47d win32: Use version information from configure.ac to populate the Windows-specific files that need it - config-win32.h, version.txt, hexchat.rc, hexchat.iss
This is done via T4 templates. The original files are now generated at build-time and so have been added to .gitignore and removed from the repository, with the exception of version.txt which must be hosted on GitHub for the updater plugin.
2013-10-12 18:41:27 -07:00
0061cd38d0 win32: Make all projects depend on common so that common is always run before any others. 2013-10-12 18:41:27 -07:00
8311c3aa56 Rename Strawberry to Hexchat in Perl error message 2013-10-12 19:42:26 +02:00
80625a06fa Fix installer on 32bit Windows 2013-10-12 13:36:43 -04:00
adab8567e4 Merge pull request #801 from Phr33d0m/patch-2
Better understandable option for the input box's color rendering
2013-10-11 18:03:42 -07:00
0b228246ba Better understandable option for the input box's color rendering 2013-10-12 03:03:09 +02:00
cbf275777c xtext: store palette as GdkColors 2013-10-10 21:02:24 -04:00
04f34feb26 Fix configure output when python disabled 2013-10-10 00:39:36 -04:00
c226f4089a Fix a few cppcheck warnings.
Use the proper data type in format functions and fix a resource leak.
2013-10-10 00:05:22 -04:00
e244001cee Add hexchat perl module to gitignore 2013-10-09 23:12:42 -04:00
0a0bb57b2a Remove left over ifdef for spellcheck 2013-10-09 21:40:22 -04:00
5ad9552365 Fix messages with server-time not showing as new activity
Added a parameter to fe_print_text() to say that the message does not represent
new activity. This is used when a log from an old session is loaded. This used
to be implicit whenever the timestamp was non-zero, but with server-time this no
longer makes sense.

Fixes issue #746.
2013-10-09 21:34:02 -04:00
111a58f1ef Improve Windows installer
- Unify x86 and x64 installer files
- Get rid of version program
- Clean up .iss file
- Only allow one installation
2013-10-09 17:17:53 -04:00
1f06922803 Revert 2d5cb3ec7b
Scrolling has issues i couldn't easily fix, will get back to
later but lets keep this usable
2013-10-09 13:59:07 -04:00
2d5cb3ec7b Round 3 of Gtk accessor functions: xtext 2013-10-08 21:01:07 -04:00
44ad5703ea Work around for /away being called multiple times
This will have to be solved eventually in menu.c so you can change their
status without emitting the signals.
2013-10-08 20:00:07 -04:00
b393d2f62f Fix scroll buttons when using tabs 2013-10-08 18:40:11 -04:00
0c3220c469 Add preference to change tabs on scroll
Also revert e52905f50c
2013-10-08 18:16:10 -04:00
e52905f50c Add chanview files to project 2013-10-08 17:59:07 -04:00
075cc61c94 Rebrand Perl plugin to HexChat,
Add /pl and plugin_pref

Add help messages
2013-10-07 22:58:38 +02:00
aafbb6374b Round 2.5 of gtk accessor functions
Some leftovers in chanview-tabs and maingui
2013-10-06 22:17:45 -04:00
c463236521 Round two of gtk accessor functions: chanview-tabs 2013-10-05 22:21:04 -04:00
435e8881ed Merge pull request #787 from siduction/master
some Typos causing lintian moaning: {R,r}eciev.. -> {R,r}eceiv..
2013-10-05 09:31:34 -07:00
cc6de3f665 some Typos causing lintian moaning: {R,r}eciev.. -> {R,r}eceiv.. 2013-10-05 18:26:55 +02:00
b1df2f43aa Merge pull request #784 from Farow/pull2
tree-view: switch tabs on mouse wheel up/down
2013-10-04 14:43:42 -07:00
65eb233f9c tree-view: switch tabs on mouse wheel up/down 2013-10-05 00:35:50 +03:00
e10faa0369 Fix crash with long notify lists. 2013-10-04 17:00:56 -04:00
4ec0e6fd05 libsexy: Improve color parsing
- Background colour is only parsed when there's a comma
- Offset for background color is incorrectly calculated (there's no
control character, just a comma)
2013-10-04 12:17:46 -04:00
a47740636d libsexy: never include spaces when spell-checking 2013-10-04 07:16:44 -04:00
a29ccffcbe libsexy: Add "HexChat" to session dictionary 2013-10-04 06:33:49 -04:00
fa955a0f1a Don't try to update the clear button state when there's no DCC window. 2013-10-03 17:43:44 -07:00
301e5d260d More improvements to libsexy
- Add option for showing attributes in input
- Improve attribute parsing
- Fix detecting iso-codes on unix
- Improve getting default langs from $LANG
- Fix warnings
2013-10-03 16:23:46 -04:00
da680f1066 Use spell entry for topicbar
Closes #150
2013-10-03 16:23:46 -04:00
67a488033b libsexy: Don't mark nicks spelled incorrect 2013-10-03 16:23:46 -04:00
f6dd61cb02 Update to gtkspell3's iso code lookup
This no longer requires libxml
so now there is no reason for this to be optional
2013-10-03 16:23:46 -04:00
eb93130cd3 Remove gtkspell support 2013-10-03 16:23:46 -04:00
d643056ca0 Fix loading enchant on Unix 2013-10-03 16:23:46 -04:00
ba74e70ec1 libsexy: load colors more efficiently 2013-10-03 16:23:46 -04:00
6c3d201070 libsexy: fix spell-check on contractions 2013-10-03 16:23:34 -04:00
af2458f556 Parse attributes in the input box 2013-10-03 16:19:25 -04:00
3cb4439121 Merge pull request #781 from Farow/pull2
Added shortuct to config folder to installer
2013-10-03 05:14:25 -07:00
19ef48d0e8 Added shortuct to config folder to installer
Fixes #612
2013-10-03 14:42:32 +03:00
7ba2f1f17f Topic bar improvements
- Don't show on server tab
- Don't show unavailable modes
- Remove less used modes and add more common ones
- Use proper case for buttons
2013-10-03 05:01:15 -04:00
a831ecfd01 Strip trailing space from pluginpref_list entries 2013-09-30 01:38:51 -04:00
b7e8f64bba Fix crash in hexchat_pluginpref_list()
Set max output size to 4096
2013-09-30 01:23:20 -04:00
76b1c2f1ed Update readme.md 2013-09-29 20:44:12 -04:00
83fcb52085 Merge pull request #775 from benburkhart1/master
Channel joiner dialog does not allow you to join a valid channel
2013-09-29 15:59:00 -07:00
0791c8f069 RFC 1459 does not require channel name be above 0 characters, only that there's a prefix involved, this behavior is present elsewhere in xchat's join channel dialog, making this match. 2013-09-29 17:36:15 +00:00
247d84fbd1 Remove unused gtk-prefs project 2013-09-29 02:49:55 -04:00
00bd389cdc Merge branch 'gresource' 2013-09-29 02:24:30 -04:00
1f84c507a0 Reorganize files and migrate images to gresource 2013-09-29 02:24:06 -04:00
4ba886f7aa Accept %I in text events 2013-09-29 01:52:21 -04:00
d552415abe Add default keybindings for italics and underline 2013-09-29 01:47:10 -04:00
c537dae7f8 Use Pango Attributes for bold and italics 2013-09-28 23:02:38 -04:00
0d2feba69c Revert fast scrolling with background image 2013-09-27 18:23:51 -04:00
5465790886 Merge branch 'xtext2' 2013-09-27 17:42:38 -04:00
958f4099f1 Remove overdraw 2013-09-27 17:40:53 -04:00
449553ffb0 Replace xtext's transparency with full window transparency
Xtext's transparency barely worked on windows, didn't work on any modern
linux wm and used fake transparency.
This uses gtk's built in window opacity that works on more systems and
is real transparency.
Text area only transparency may return with a transition to cairo, if it
works on Windows.
2013-09-27 17:40:05 -04:00
960ded7db4 Update link to site in perl plugin 2013-09-27 20:09:48 +02:00
a14fe580f8 Tweak svg file 2013-09-27 02:51:19 -04:00
f23bda9e46 Remove useless defines
- HEXCHAT
- USE_DB
- SCROLL_HACK
- MOTION_MONITOR
- ITALIC
- COLOR_HILIGHT
2013-09-26 22:34:40 -04:00
ef73a89139 Remove XFT, SHM, and MMX 2013-09-26 22:31:14 -04:00
61b58fd5be Remove remnants of native file dialogs 2013-09-26 22:07:22 -04:00
60ba4d651c typo 2013-09-26 05:10:17 -04:00
5a6a03af0b Update appdata description 2013-09-26 04:10:40 -04:00
6f013e807c Remove whats left of gconf 2013-09-26 03:06:01 -04:00
d18a95fda6 Make Python version consistent on both platforms
and don't hardcode 2.7/3.3
2013-09-25 20:53:23 -04:00
c7a00a4aba Only show users country if its not unknown 2013-09-25 17:16:47 -04:00
7bc3317eeb Don't open most windows at mouse position 2013-09-25 02:09:47 -04:00
8028bb7f82 Make join dialog modal 2013-09-25 02:02:26 -04:00
6fc412c4e2 Update installer links to 2013 redist 2013-09-25 00:54:28 -04:00
0749cb1553 Remove hextray 2013-09-24 21:01:16 -04:00
f198581a09 Split long messages at spaces 2013-09-24 19:57:37 -04:00
4c9b193b45 Fix tab completion with utf8 completion char
Closes #738
2013-09-24 17:03:19 -04:00
130be78dbb typo.. 2013-09-23 23:10:31 -04:00
29d6db30ba Update help messages for userlist buttons and user popups 2013-09-23 23:08:56 -04:00
2e6001f1ed Revert menu.c @ ae04663aa9
This caused a few bugs such as improperly setting away/back
and redrawing the channel tree when the menu is opened.
2013-09-23 22:00:07 -04:00
9c4112cda7 Fix /cycle command
- Uses the correct channelkey when called from another tab
- Allows it to be used from any tab in the same server
- Verifies it's a channel you are in
2013-09-23 17:17:35 -04:00
04dbcdffc0 Only underline the channel part if nick prefix 2013-09-23 15:10:00 -04:00
0146a38faa Fix url detection of channel with nick prefix
Closes #769
2013-09-23 14:58:11 -04:00
145ceba124 Strip trailing space from CAP REQ
Mentioned in #770
2013-09-23 12:45:08 -04:00
90ea691b75 Add screenshot to appdata file 2013-09-20 23:01:27 -04:00
51cdcfca82 Fix warning 2013-09-20 17:33:27 -04:00
ae04663aa9 First round of using GTK accessor functions
This is the first step to build with GSEAL_ENABLE
setup.c uses a deprecated fontchooser,
chanview-tabs.c didn't like the conversion, and
I am waiting to do some work on xtext.c before
converting it.
2013-09-20 17:24:39 -04:00
9f8073ab77 Fix messages on networks that have chantypes the same as nick prefixes
Closes #763
2013-09-20 08:59:25 -04:00
bfa199be79 Add /d2Zi+ switch for better debug symbols 2013-09-20 13:11:01 +02:00
36911710fd Make manual reposition after unfullscreen Windows only 2013-09-19 22:01:15 -04:00
267ac71d4f Replace more GDK_* with GDK_KEY 2013-09-19 17:58:10 -04:00
f6ba274134 Add fullscreen to to view menu 2013-09-19 17:52:17 -04:00
cd825ac735 Improve text repositioning when searchbar string is modified. 2013-09-18 15:25:50 -07:00
1007af9506 Add message arguement to /query
Closes #757
2013-09-17 18:19:02 -04:00
b67953c70c Searchbar: Don't show error on empty string 2013-09-16 21:48:04 -04:00
1a67e245ac Fix searchbar loading highlight all pref on start 2013-09-16 21:31:05 -04:00
648de4410c plugins: fishlim: VS2013 comes with a working stdbool.h 2013-09-15 15:08:40 -07:00
b658fca4a7 Convert project files to vs2013 2013-09-15 15:07:46 -07:00
277732e384 Fix xtext crash in rawlog/text events window
Closes #740
2013-09-15 10:44:55 -04:00
f13413c26a Fix logging networks with invalid names on Windows 2013-09-15 07:40:47 -04:00
c9418ffca3 Translate -ize to -ise, favor[ite] to favour[ite], Behavior to Behaviour 2013-09-15 01:28:10 -07:00
ddb3bf05d8 use GDK_KEY 2013-09-15 03:22:04 -04:00
8b463e6b14 Update POTFILES.in 2013-09-15 03:07:45 -04:00
bc8eaf6588 Replace search window with a searchbar 2013-09-15 02:55:18 -04:00
b0b8f40791 Replace search window with a searchbar 2013-09-15 02:51:35 -04:00
aa37686bbd Move optimization settings from all subsequent projects to hexchat.props 2013-09-15 02:45:38 -04:00
4721a3747e Python: return hooks with PyLong_FromVoidPtr
Fixes #685
2013-09-15 02:45:38 -04:00
e5cb69db5d Python: Use keywords for attributes in emit_print() 2013-09-15 02:45:37 -04:00
414b591358 Python: Add support for attributes in hooks 2013-09-15 02:45:37 -04:00
ccd4945504 Merge xchat r1525
Fixes possible crash
2013-09-15 02:45:36 -04:00
59b19bac70 Update tooltip for sound alerts without libcanberra 2013-09-14 12:46:38 -04:00
14b8a77b78 Default spotchat to SASL 2013-09-12 03:55:17 -04:00
a71849db3f Bump Version to 2.9.6 2013-09-11 18:18:19 -04:00
a2eb3325ce Update Translations 2013-09-11 04:50:35 -04:00
b9df78b9c6 Exec: Print help on empty string
... and bump version
2013-09-10 02:24:53 -04:00
9a3c1ccd72 Update transifex config file 2013-09-08 01:28:06 -04:00
68116da5ad Remove about.c from POTFILES.in 2013-09-08 01:17:34 -04:00
68153812f7 Add channelkey to channel lists 2013-09-07 20:17:42 -04:00
bb1062ae2a Merge branch 'saslmech' 2013-09-07 19:00:40 -04:00
bdb18828e3 Disable challangeauth without openssl 2013-09-07 18:59:29 -04:00
a903f16c68 Implement BLOWFISh, AES, and EXTERNAL SASL mechanisms
Closes #657
2013-09-07 18:59:28 -04:00
5feeb717a0 Add appdata file 2013-09-07 02:08:04 -04:00
703316ace6 Merge pull request #733 from hexchat/filedialog
Improve file dialogs
2013-09-06 17:00:55 -07:00
88afa4afa2 Fix detecting utf-8 on some networks 2013-09-06 14:00:53 -04:00
bf269d2e03 Of course mimetype doesn't work on Windows.. 2013-08-31 15:38:29 -04:00
755932c3bc Use mimetypes for audio and images 2013-08-31 15:31:22 -04:00
4c406bce17 Improve file dialogs
- Fixes #314
- Adds file extensions to sound and image browsing
- Some options no longer default to our config dir
- Always add a shortcut to our config dir
- Remove broken 'last_dir' functionality, gtk already knows recent
2013-08-31 11:39:12 -04:00
3a87dedbb5 Merge pull request #731 from NoneGiven/patch-2
Fix colored vhosts
2013-08-28 12:57:18 -07:00
731fd33be2 Update text events, fix colored vhosts 2013-08-28 15:35:46 -04:00
ffc47e8439 Update travis to build theme manager 2013-08-28 13:32:35 -04:00
cc9d6042fd Update htm mime file 2013-08-28 13:22:12 -04:00
012b9c478e Merge pull request #730 from hasufell/mono
BUILD: add --with-theme-manager configure option
2013-08-28 10:21:37 -07:00
5d35ecfaa9 BUILD: update mime and desktop database 2013-08-28 14:30:57 +02:00
21bf0ae998 update desktop file 2013-08-28 14:30:57 +02:00
9d0ea7af4b update gitignore 2013-08-28 14:30:57 +02:00
08fd4f2dd7 BUILD: use thememan.in instead of Makefile echo 2013-08-28 14:30:57 +02:00
8f0d6e85fd BUILD: don't hardcode the install path in the script 2013-08-28 14:30:57 +02:00
7dea09c371 BUILD: fix quoting issue
\"$@\" got malformed and interpreted by the Makefile
2013-08-28 14:30:57 +02:00
ce5653d75c BUILD: add --with-theme-manager configure option 2013-08-28 14:30:57 +02:00
36b84c9af3 Merge pull request #728 from hasufell/master
build system improvements
2013-08-27 02:16:12 -07:00
d13046614e BUILD: use a blacklist rather than a whitelist for python versions 2013-08-27 10:59:03 +02:00
53e30995d6 Merge pull request #729 from hasufell/mime
fix htm desktop file
2013-08-26 22:44:57 -07:00
0c4e343b46 STYLE: tabs, not whitespaces 2013-08-27 00:18:08 +02:00
e6394cafe2 BUILD: consistently use PKG_CONFIG 2013-08-27 00:09:35 +02:00
fabc5bf4b7 STYLE: add missing comma 2013-08-26 23:45:51 +02:00
d601335aa6 fix desktop file 2013-08-26 23:27:29 +02:00
d6dacbe955 BUILD: use pkg-config to detect python 2013-08-26 23:00:47 +02:00
616c669d3b Fix /exec -o on Windows 2013-08-26 12:53:17 -04:00
d52cc1a1bd Add desktop and mimetype file for the Theme Manager 2013-08-26 10:06:34 -04:00
43a2f43090 Handle incoming messages from yourself
These are common for users of bouncers, private messages still need to
be handled.
2013-08-26 09:44:18 -04:00
b3369a4bc4 Sysinfo: Add announce option 2013-08-26 04:31:45 -04:00
b5b547abb6 Sysinfo: Fix gentoo detection 2013-08-26 03:58:36 -04:00
4e775df156 Update CLEAR and MSG help message 2013-08-25 11:16:49 -04:00
bf0ff98385 Update help for close command 2013-08-25 10:52:37 -04:00
66412e4997 Add TinyCrab to network list
Closes #723
2013-08-21 07:36:53 -04:00
77c1edbe13 Handle lists in MONITOR replies 2013-08-20 00:24:20 -04:00
46c32952b0 Make formatting more consistent
#719
2013-08-17 20:39:24 -04:00
41719bd4a8 Merge pull request #719 from Farow/pull
Improve cursor behavior
2013-08-17 17:32:16 -07:00
9629ca3fd9 Improve cursor behavior
- The cursor doesn't turn into a hand for non-url parts of a word
- Removal of unneeded variable str
2013-08-16 23:05:27 +03:00
a3ab5edc59 Merge pull request #718 from Farow/pull
Channel url improvements
2013-08-15 21:36:35 -07:00
8fbcddd2cd Add ObsidianIRC network
#412
2013-08-15 17:59:41 -04:00
73d63ca3da Allow multiple channels in url, fix nick re
- Multiple channels have to be separated by a comma
- Fix #nick becoming a url for nick instead of #nick
2013-08-13 07:39:34 +03:00
721a9965aa Fixed munging of whitespace in sysinfo's matching functions
Closes #712
2013-08-12 23:41:37 -04:00
4f77f046d0 Channel url and cursor fix
- Allow colons in channel urls
- Only add the channel part in the context menu
- Fix cursor not changing between separator and url
2013-08-13 04:19:14 +03:00
0b95c1c444 Merge branch 'pluginreload' 2013-08-10 19:44:38 -04:00
41c0c345cd And free connect command.. 2013-08-10 18:04:56 -04:00
c8f6d2c538 Merge pull request #713 from Farow/master
Make the channel key input larger
2013-08-10 14:32:02 -07:00
b2d2187b20 Only replace variables in connect commands 2013-08-10 16:51:56 -04:00
b8894a468d Update channel key input
- allow up to 23 characters
- make the input bigger
2013-08-10 22:55:17 +03:00
1c30e0c124 Still include old freenode hostname in servlist 2013-08-08 12:01:49 -04:00
4dc600a63c Alphabetical order.. 2013-08-07 06:28:04 -04:00
13bfd060b6 Format Channel URLs
closes #706
2013-08-07 06:14:30 -04:00
1370a49742 Save notify list on close of friends list
for #570
2013-08-06 16:13:10 -04:00
ab6bf4234c Bind esc to close in chanlist 2013-08-05 07:06:04 -04:00
5224c275e8 Destroy utility windows with their parents. 2013-08-05 04:03:26 -04:00
272b3d2f82 Add .patch to gitignore 2013-08-04 07:13:50 -04:00
2528a78593 Remove VS Redistributable update version from installer link 2013-08-04 11:45:08 +02:00
2917a83d7b Update text on reload button 2013-08-04 04:53:40 -04:00
77e9417c7b Add label for website in about dialog 2013-08-04 04:48:45 -04:00
e8456beadc Add reload command for plugins and add to gui 2013-08-04 04:36:10 -04:00
d63a33b6dc Use built-in gtk_about_dialog 2013-08-03 07:11:25 -04:00
bdc814a4a4 Merge pull request #677 from hasufell/master
CONFIGURE: add "--enable-minimal-flags"
2013-08-02 23:25:40 -07:00
ce40e5a111 Merge pull request #700 from orium/url-chan-prefix
Server aware nickname and channel matching
2013-08-02 23:24:50 -07:00
61c9ad08bf Fixed memory leak. 2013-08-02 02:45:54 +01:00
bca0ad8e1e Fix description line for Scroll Page in fkeys.c. 2013-08-01 11:55:22 -07:00
6ec7bfad30 Indentation fix. 2013-08-01 16:39:49 +01:00
0e76283c9a Now nickname and channel matching is server aware: we only match words that
have the prefixes the server uses.

The url regex matching was designed to be more versatile. This was needed to
disambiguate matches between nicks and channels, since they may have common
prefixes now (&+!). In case of ambiguity, when the server supports prefixes that
are common to both channels and nicknames, we choose the nickname (the nickname
only matches if there is a user with that nick in the current session).

Fixes #655.
2013-08-01 16:28:17 +01:00
78a72a6c1e Merge pull request #697 from RichardHitt/topbottom
Scroll-page keybindings:  Add Top (C+HOME), Bottom (C+END)
2013-07-31 22:20:48 -07:00
4a95b07ae7 python: Set VERSION using existing VERSION_MAJOR and VERSION_MINOR macros and some mintor refactoring. 2013-07-30 22:54:57 -07:00
154ea98deb Fix kickbanning opped users 2013-07-30 23:29:25 -04:00
be252e271f Scroll-page keybindings: Add Top (C+HOME), Bottom (C+END) 2013-07-30 13:11:07 -07:00
e2328e7a91 Merge pull request #687 from Mikah89/clear_dcc_list_rebased
Clear button in dcc download manager
2013-07-27 13:19:29 -07:00
942b92c796 Remove #hexchat from default autojoin 2013-07-27 00:23:40 -04:00
3bd2143d9a Have join dialog suggest #hexchat for freenode users 2013-07-27 00:22:57 -04:00
93cfa353e7 Tweak cli output and fix related warnings 2013-07-27 00:03:16 -04:00
2cbe758c80 Fix some warnings 2013-07-26 22:53:01 -04:00
72c6834cc5 Python: Fix callbacks for the "special" print hooks 2013-07-26 19:51:56 -04:00
ac06b74b18 Use system's libsexy by default
It will still fallback to static
2013-07-26 15:03:59 -04:00
1fd94e79b9 Merge pull request #679 from hasufell/libtool
MAKE: backwards compat for old libtool
2013-07-26 11:55:37 -07:00
bb3cb269c2 Upd: Properly handle http errors
Also some cleanup of some old code and comments
2013-07-25 19:54:25 -04:00
715a520c0e Move optimization settings from all subsequent projects to hexchat.props 2013-07-24 20:56:36 +02:00
78d14a2b1e Removed restriction that disabled the clear button if at least one transfer item was selected in dcc download manager. 2013-07-23 23:55:20 +01:00
3d10b9f3e2 Python: return hooks with PyLong_FromVoidPtr
Fixes #685
2013-07-21 16:40:38 -04:00
f97f1a08ae Merge pull request #689 from hexchat/python-attributes
Python: Add support for attributes in hooks
2013-07-21 13:33:47 -07:00
13e9713b72 Merge xchat r1525
Fixes possible crash
2013-07-20 18:00:19 -04:00
bf9276fc5c Python: Use keywords for attributes in emit_print() 2013-07-19 14:14:26 -04:00
fe86c4900f Merge pull request #680 from staticshock/dotless-domains
Permit dot-less domain names
2013-07-19 09:23:52 -07:00
f45487e92c Python: Add support for attributes in hooks 2013-07-19 10:25:46 -04:00
bca972bdc3 Permit dot-less domain names
Fixes #523
2013-07-19 09:01:53 -04:00
a8abba84bd Fixed coding style and clearified some comments, following arnavion suggestions 2013-07-17 09:20:54 +01:00
2e2f4662f3 Updater: fix download links 2013-07-16 12:48:34 -04:00
0c87c49146 Implemented clear functionality for DCC download manager. Created clear button in DCC downloaded manager interface. 2013-07-15 21:34:14 +01:00
6c8d9c2194 Merge pull request #675 from orium/server-time-plugins
Server time plugins
2013-07-14 11:29:24 -07:00
62d52d55b2 Add staticbox network
Also default to SASL on some more networks
2013-07-14 10:20:03 -04:00
3598966069 Forgot to add hexchat_emit_print_attrs() to the macros in hexchat-plugins.h. 2013-07-13 16:50:51 +01:00
ec6f5b011a g_free() should be used for g_malloc(). 2013-07-13 05:33:16 +01:00
9d4a1a3b4f Update docs links 2013-07-12 19:32:10 -04:00
9978ebd853 Removed outdated comment. 2013-07-12 22:52:12 +01:00
18eaccb840 Added functions to create/destroy event_attrs to plugin interface.
Function names were chosen to keep consistency with the rest of the
API.
2013-07-12 22:46:04 +01:00
e63ec01089 MAKE: backwards compat for old libtool 2013-07-12 14:17:30 +02:00
e0fb3d537d Added hexchat_emit_print_attrs() to plugin interface. 2013-07-12 01:33:35 +01:00
19d4356484 CONFIGURE: add "--enable-minimal-flags"
This will turn off automagic adding of flags that might be unwanted
such as "-g" or "-pipe".
2013-07-11 12:36:14 +02:00
be1e6bde65 Fix requesting sasl multiple times 2013-07-11 05:58:10 -04:00
f113008c7f Don't grey out log fliename in preferences
It can still be useful when global logging is disabled
2013-07-10 15:39:45 -04:00
5e240eb259 Indentation fixes and code cleanup. 2013-07-10 00:42:34 +01:00
7101b7b864 Now hexchat_hook_server_attrs() and hexchat_hook_print_attrs() is called
when it should. This should close #661.
2013-07-09 23:11:28 +01:00
98aa62f637 Removed two dummy functions in plugin interface. 2013-07-09 22:04:07 +01:00
798db7368a Added hexchat_hook_server_attrs() and hexchat_hook_print_attrs() to the plugin
interface. This hooks are similar to hexchat_hook_{server,print}() except the
callback passes an extra argument with the (new) structure hexchat_event_attrs.

This structure contains attributes related to the event; by now it only contains
the server_time_utc member which is non-zero if server-time is enabled and the
server used this extension to pass a timestamp.

See issue #661.

(Note: this hooks are still not called by hexchat in this commit.)
2013-07-09 20:21:16 +01:00
4cf61ccedb Fix warning 2013-07-08 16:30:54 -04:00
7f50ee6fd2 Increase upper limit for max DCC speed in preferences
For #672
2013-07-07 15:15:50 -04:00
1544a5d6cb Default to nickserv when using /ghost or /id commands 2013-07-04 18:08:56 -04:00
3284502645 Merge pull request #667 from orium/fe_get-dialogs-transient
fe_get_{int,str}() sets transient for the main window.
2013-07-03 12:00:41 -07:00
4cc03aba75 Now fe_get_{int,str}() sets transient for the main window.
This allows window managers to handle the window in a better way, for instance
xmonad used to open the dialogs in a new tile and now opens a simple float.
2013-07-03 19:48:45 +01:00
286bbc6bde Add another server to 2ch network 2013-07-03 00:42:48 -04:00
d1244d7231 Use URL command for opening in existing
This avoids making a new connection to an already open network.
2013-07-02 12:22:01 -04:00
50219a63ad Fix opening empty channel when url has trailing slash 2013-07-02 12:19:47 -04:00
806c75f051 Add 2ch network
Closes #666
2013-07-02 10:35:06 -04:00
ee621d2435 Update man page 2013-07-01 21:57:38 -04:00
340811da6e Merge pull request #665 from orium/freebsd-fixes
Freebsd fixes
2013-07-01 18:51:51 -07:00
4b40597c76 Fixed get_timezone() to work on windows. 2013-07-02 02:22:41 +01:00
9a789bc9e7 Now handle_message_tag_time() doesn't use "timezone" since it is not defined
in *BSD.
2013-07-02 01:54:18 +01:00
4886cc8258 Don't use G_VALUE_INIT since it was introduced in glib 2.30, and our minimum
requirement is glib 2.28. This was giving a compilation error in FreeBSD 9.1,
since it uses glib 2.28.
2013-07-02 01:54:11 +01:00
82277a80ea Fix urls with --existing 2013-07-01 14:53:47 -04:00
22064278df Update fe-text's help message 2013-07-01 14:36:15 -04:00
932bfa3482 Don't use popup dialogs for help 2013-07-01 14:28:26 -04:00
5de5d6d00b Improve help message 2013-07-01 14:11:24 -04:00
aab55d8cff Handle extraneous cli args as urls 2013-07-01 13:43:58 -04:00
73c9321361 Fixed server-time timestamps issue regarding local time. 2013-06-30 15:00:38 +01:00
25288120be Fixed another bug in handle_message_tag_time(): tm_mon is between 0 and 11. 2013-06-28 23:42:11 +01:00
d99d951f7f Fixed bug in handle_message_tag_time(). 2013-06-28 22:08:35 +01:00
00e15828a1 Also support znc.in/server-time-iso 2013-06-28 13:33:08 -04:00
ad926e9b07 Merge pull request #656 from orium/server-time
Closes #499
2013-06-28 11:59:33 -04:00
059cbcd406 Fixed compilation error in VS. 2013-06-28 16:29:39 +01:00
dcdb11a78b Added preferences options to enable the server-time extension when available.
(Internationalization messages missing.)
2013-06-28 16:15:15 +01:00
aef9e3922e Fixed a few null pointer derefs caused by dummy code that somehow I
forgot about.
2013-06-28 16:08:03 +01:00
ce6fef3d0a A few messages missing regarding server-time. 2013-06-28 16:07:42 +01:00
4057b7dd58 Now inbound_cap_ls() can enable extensions when a bouncer uses a namespace for
the extension server-time.
2013-06-28 16:07:24 +01:00
d1725e3f44 server-time for all numerical messages. 2013-06-28 16:04:32 +01:00
42da8fe3ef server-time supported in all named servermsg: ping, error, notice and
authenticate.

The only thing left to do for server-time are the numeric messages.
2013-06-28 16:04:16 +01:00
a01bd83c64 Organized cap inbound code in inbound.c instead of proto-irc.c. 2013-06-28 16:04:06 +01:00
6a0240aa18 server-time supported in most named messages. 2013-06-28 16:03:37 +01:00
179747a7bc Implemented handle_message_tag_time() for time-server messages. 2013-06-28 16:03:20 +01:00
94186f7888 First step towards message tags extension support
(see http://ircv3.atheme.org/specification/message-tags-3.2).

In particular this commit implements a (very) dummy implementation
sketch of the server-time extension
(see http://ircv3.atheme.org/specification/message-tags-3.2 and #499).
2013-06-28 16:03:12 +01:00
ac5771377e fe-gtk: Only escape notification bodies for notification servers that support "body-markup". 2013-06-28 00:14:54 -07:00
863dc2e841 docs: Typo. 2013-06-27 10:53:29 -07:00
59b9ee3417 plugins: Implemented get_info("password") and re-added get_info("nickserv") as an alias to that. 2013-06-23 11:39:12 -07:00
3285934703 Update hacking.md 2013-06-23 07:29:26 -03:00
c7d1102c61 perl: Fixed get_list('networks') to work with new servlist.conf syntax for autojoin channels. 2013-06-22 22:06:49 -07:00
457 changed files with 156099 additions and 148273 deletions

51
.gitignore vendored
View File

@ -2,49 +2,55 @@
# Unix generated files
.deps/
.libs/
.dirstamp
Makefile
Makefile.in
aclocal.m4
autom4te.cache/
compile
/build-aux/
confdefs.h
conftest
conftest.c
conftest.err
config.guess
config.h.in
config.h
config.log
config.status
config.sub
config.*
config-win32.h
configure
configure.tmp
depcomp
doxygen*.tmp
html/
install-sh
intl/
libtool
ltmain.sh
m4/
missing
plugins/perl/irc.pm.h
plugins/perl/xchat.pm.h
plugins/perl/hexchat.pm.h
po/Makefile.in.in
po/POTFILES
po/remove-potcdate.sed
po/stamp-po
share/pkgconfig/hexchat-plugin.pc
po/stamp-*
osx/Info.plist
data/man/hexchat.1
data/pkgconfig/hexchat-plugin.pc
data/misc/hexchat.appdata.xml
data/misc/hexchat.desktop
data/misc/hexchat.desktop.in
data/misc/htm.desktop
src/common/dbus/example
src/common/dbus/marshallers.h
src/common/dbus/org.hexchat.service.service
src/common/dbus/remote-object-glue.h
src/common/make-te
src/common/marshal.*
src/common/textenums.h
src/common/textevents.h
src/fe-gtk/hexchat
src/fe-gtk/hexchat.rc
src/fe-gtk/resources.c
src/fe-gtk/resources.h
src/fe-text/hexchat-text
src/htm/Main.resources
src/htm/thememan.exe
src/htm/thememan.exe.config
src/htm/thememan.exe.mdb
src/htm/thememan
stamp-h1
*.a
*.o
@ -53,18 +59,31 @@ stamp-h1
*.gmo
*.mo
*.po~
*.pot
*.patch
tags
src/**/*.plist
# Win32 generated files
plugins/wmpa/wmpa_h.h
plugins/wmpa/wmpa_i.c
src/pixmaps/inline_pngs.h
src/htm/obj/*
win32/ipch/*
win32/ext/perl/perl-x86-cache
win32/ext/perl/perl-x86-SetupFiles
win32/ext/perl/perl-x64-cache
win32/ext/perl/perl-x64-SetupFiles
win32/installer/hexchat.iss
resource.h
*.opensdf
*.sdf
*.suo
*.user
*.exe
#OSX
osx/HexChat.app
osx/.HexChat.app
po/.intltool-merge-cache
*.zip
*.dmg
*.VC.db
*.VC.opendb

10
.mailmap Normal file
View File

@ -0,0 +1,10 @@
Berke Viktor <github.bviktor@outlook.com> <berkeviktor@aol.com>
Berke Viktor <github.bviktor@outlook.com> <bviktor@hexchat.org>
Berke Viktor <github.bviktor@outlook.com> <bviktor@outlook.com>
Berke Viktor <github.bviktor@outlook.com> berkeviktor@aol.com
Patrick Griffis <tingping@tingping.se> TingPing <tingping@fedoraproject.org>
Patrick Griffis <tingping@tingping.se> TingPing <tingping@tingping.se>
Patrick Griffis <tingping@tingping.se> TingPing <tngpng@gmail.com>
Patrick Griffis <tingping@tingping.se> TingPing <TingPing@users.noreply.github.com>
Arnav Singh <arnavion@gmail.com> Arnavion
Eustachy Kapusta <Eustachy.kapusta@gmail.com> tomek

View File

@ -1,14 +1,36 @@
sudo: required
dist: trusty
language: c
compiler: gcc
before_script:
- sudo apt-get build-dep -qq xchat
- sudo apt-get install -qq libnotify-dev libproxy-dev libpci-dev libcanberra-dev
cache: apt
compiler: clang
script:
- ./autogen.sh
- ./configure --enable-textfe
- make
- ./autogen.sh --enable-textfe --with-theme-manager --enable-static-analysis
- make V=1 -j$(nproc)
notifications:
irc:
channels: "chat.freenode.net#hexchat-devel"
template: "Build #%{build_number} (%{commit}) by %{author}: %{message}"
template: "Build %{build_url} (%{commit} in %{branch}) by %{author}: %{message}"
on_success: change
matrix:
fast_finish: true
addons:
apt:
packages:
- automake
- autoconf-archive
- imagemagick
- intltool
- libcanberra-dev
- libdbus-glib-1-dev
- libglib2.0-dev
- libgtk2.0-dev
- libluajit-5.1-dev
- libnotify-dev
- libpci-dev
- libperl-dev
- libproxy-dev
- libssl-dev
- libtool
- monodevelop
- mono-devel
- python-dev

View File

@ -2,8 +2,7 @@
host = https://www.transifex.com
[hexchat.main]
file_filter = po\<lang>.po
source_file = po\hexchat.pot
file_filter = po/<lang>.po
source_file = po/hexchat.pot
source_lang = en
type = PO

View File

@ -1,6 +1,7 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = po intl src plugins man share
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = autogen.sh
SUBDIRS = po src plugins data
EXTRA_DIST = autogen.sh Doxyfile readme.md

View File

@ -1,113 +1,32 @@
#!/bin/bash
have_automake=false
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
if automake --version < /dev/null > /dev/null 2>&1 ; then
automake_version=`automake --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
case $automake_version in
1.2*|1.3*|1.4|1.4*|1.5*|1.6*|1.7*|1.8*)
;;
*)
have_automake=true
;;
esac
fi
if $have_automake ; then
AUTOMAKE="automake"
ACLOCAL="aclocal"
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
(test -f $srcdir/src/common/hexchat.c) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the top-level directory"
exit 1
}
if [ "$1" = "--copy" ]; then
shift
aclocal --force --install || exit 1
intltoolize --force --copy --automake || exit 1
autoreconf --force --install --include=m4 -Wno-portability || exit 1
else
if automake-1.9 --version < /dev/null > /dev/null 2>&1 ; then
AUTOMAKE="automake-1.9"
ACLOCAL="aclocal-1.9"
else
echo "automake missing or too old. This requires at least automake 1.9"
exit 1
fi
intltoolize --automake || exit 1
autoreconf --install --symlink --include=m4 -Wno-portability || exit 1
fi
# ------ START GETTEXT ------
if [ "$NOCONFIGURE" = "" ]; then
$srcdir/configure "$@" || exit 1
echo searching for GNU gettext intl directory...
dirs="/usr/share /usr/local/share /opt/share /usr /usr/local /opt /usr/gnu/share /opt/local /opt/local/share"
found=0
for try in $dirs; do
echo -n " -> $try/gettext/intl... "
if test -d $try/gettext/intl; then
echo found it
found=1
break
fi
echo no
done
if test "$found" != 1; then
echo ERROR: Cannot find gettext/intl directory.
echo ERROR: Install GNU gettext in /usr or /usr/local prefix.
exit 7
fi;
echo copying gettext intl files...
if test -f $try/gettext/mkinstalldirs; then
ln -s $try/gettext/mkinstalldirs mkinstalldirs
fi
intldir="$try/gettext/intl"
if test ! -d intl; then
mkdir intl
fi
olddir=`pwd`
cd $intldir
for file in *; do
if test $file != COPYING.LIB-2.0 && test $file != COPYING.LIB-2.1; then
rm -f $olddir/intl/$file
cp $intldir/$file $olddir/intl/
fi
done
cp -f $try/gettext/po/Makefile.in.in $olddir/po/
cd $olddir
if test -f intl/plural.c; then
sleep 2
touch intl/plural.c
if [ "$1" = "--help" ]; then exit 0 else
echo "Now type \`make\' to compile" || exit 1
fi
else
echo "Skipping configure process."
fi
# ------ END GETTEXT ------
echo running $ACLOCAL...
$ACLOCAL $ACLOCAL_FLAGS
if test "$?" != "0"; then
echo aclocal failed, stopping.
exit 2
fi
echo running libtoolize...
libtoolize --force
if test "$?" != "0"; then
echo libtoolize failed, stopping.
exit 3
fi
echo running autoheader...
autoheader
if test "$?" != "0"; then
echo autoheader failed, stopping.
exit 4
fi
echo running $AUTOMAKE...
$AUTOMAKE -a
if test "$?" != "0"; then
echo automake failed, stopping.
exit 5
fi
echo running autoconf...
autoconf
if test "$?" != "0"; then
echo autoconf failed, stopping.
exit 6
fi
echo if no errors occured, run ./configure
exit 0
#autogen.sh generates:
# aclocal.m4 Makefile.in config.guess config.sub ltmain.sh
# configure install-sh missing mkinstalldirs depcomp
#
#configure generates:
# config.status libtool Makefile.in
set +x

View File

@ -1,672 +0,0 @@
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2010 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
# should be set by the caller.
#
# The set of defined variables is at the end of this script.
# Known limitations:
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
# than 256 bytes, otherwise the compiler driver will dump core. The only
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
# All known linkers require a `.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
shrext=.so
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
# Code taken from libtool.m4's _LT_CC_BASENAME.
for cc_temp in $CC""; do
case $cc_temp in
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
\-*) ;;
*) break;;
esac
done
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
# Code taken from libtool.m4's _LT_COMPILER_PIC.
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix*)
wl='-Wl,'
;;
darwin*)
case $cc_basename in
xlc*)
wl='-Wl,'
;;
esac
;;
mingw* | cygwin* | pw32* | os2* | cegcc*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
newsos6)
;;
linux* | k*bsd*-gnu)
case $cc_basename in
ecc*)
wl='-Wl,'
;;
icc* | ifort*)
wl='-Wl,'
;;
lf95*)
wl='-Wl,'
;;
pgcc | pgf77 | pgf90)
wl='-Wl,'
;;
ccc*)
wl='-Wl,'
;;
como)
wl='-lopt='
;;
*)
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*)
wl='-Wl,'
;;
esac
;;
esac
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
rdos*)
;;
solaris*)
wl='-Wl,'
;;
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3*)
wl='-Wl,'
;;
sysv4*MP*)
;;
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
wl='-Wl,'
;;
unicos*)
wl='-Wl,'
;;
uts4*)
;;
esac
fi
# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
cygwin* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
interix*)
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
openbsd*)
with_gnu_ld=no
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
# Unlike libtool, we use -rpath here, not --rpath, since the documented
# option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
case "$host_os" in
aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we cannot use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32* | cegcc*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
interix[3-9]*)
hardcode_direct=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
gnu* | linux* | k*bsd*-gnu)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
netbsd*)
;;
solaris*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
ld_shlibs=no
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
else
ld_shlibs=no
fi
;;
esac
;;
sunos4*)
hardcode_direct=yes
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = no; then
hardcode_libdir_flag_spec=
fi
else
case "$host_os" in
aix3*)
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$GCC" = yes; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix[4-9]*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
;;
esac
fi
hardcode_direct=yes
hardcode_libdir_separator=':'
if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
:
else
# We have old collect2
hardcode_direct=unsupported
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
;;
esac
fi
# Begin _LT_AC_SYS_LIBPATH_AIX.
echo 'int main () { return 0; }' > conftest.c
${CC} ${LDFLAGS} conftest.c -o conftest
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
fi
if test -z "$aix_libpath"; then
aix_libpath="/usr/lib:/lib"
fi
rm -f conftest.c conftest
# End _LT_AC_SYS_LIBPATH_AIX.
if test "$aix_use_runtimelinking" = yes; then
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
fi
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
libext=lib
;;
darwin* | rhapsody*)
hardcode_direct=no
if test "$GCC" = yes ; then
:
else
case $cc_basename in
xlc*)
;;
*)
ld_shlibs=no
;;
esac
fi
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd1*)
ld_shlibs=no
;;
freebsd2.2*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
freebsd2*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd* | dragonfly*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
hpux9*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
hpux10*)
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
fi
;;
hpux11*)
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
case $host_cpu in
hppa*64*|ia64*)
hardcode_direct=no
;;
*)
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
esac
fi
;;
irix5* | irix6* | nonstopux*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
netbsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
newsos6)
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
else
case "$host_os" in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
fi
else
ld_shlibs=no
fi
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
osf3*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*)
if test "$GCC" = yes; then
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
# Both cc and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
hardcode_libdir_separator=:
;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
sunos4*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
;;
sysv4)
case $host_vendor in
sni)
hardcode_direct=yes # is this really true???
;;
siemens)
hardcode_direct=no
;;
motorola)
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
esac
;;
sysv4.3*)
;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
fi
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
;;
sysv5* | sco3.2v5* | sco5v6*)
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
hardcode_libdir_separator=':'
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
;;
esac
fi
# Check dynamic linker characteristics
# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
# only about the one the linker finds when passed -lNAME. This is the last
# element of library_names_spec in libtool.m4, or possibly two of them if the
# linker has special search rules.
library_names_spec= # the last element of library_names_spec in libtool.m4
libname_spec='lib$name'
case "$host_os" in
aix3*)
library_names_spec='$libname.a'
;;
aix[4-9]*)
library_names_spec='$libname$shrext'
;;
amigaos*)
library_names_spec='$libname.a'
;;
beos*)
library_names_spec='$libname$shrext'
;;
bsdi[45]*)
library_names_spec='$libname$shrext'
;;
cygwin* | mingw* | pw32* | cegcc*)
shrext=.dll
library_names_spec='$libname.dll.a $libname.lib'
;;
darwin* | rhapsody*)
shrext=.dylib
library_names_spec='$libname$shrext'
;;
dgux*)
library_names_spec='$libname$shrext'
;;
freebsd1*)
;;
freebsd* | dragonfly*)
case "$host_os" in
freebsd[123]*)
library_names_spec='$libname$shrext$versuffix' ;;
*)
library_names_spec='$libname$shrext' ;;
esac
;;
gnu*)
library_names_spec='$libname$shrext'
;;
hpux9* | hpux10* | hpux11*)
case $host_cpu in
ia64*)
shrext=.so
;;
hppa*64*)
shrext=.sl
;;
*)
shrext=.sl
;;
esac
library_names_spec='$libname$shrext'
;;
interix[3-9]*)
library_names_spec='$libname$shrext'
;;
irix5* | irix6* | nonstopux*)
library_names_spec='$libname$shrext'
case "$host_os" in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux* | k*bsd*-gnu)
library_names_spec='$libname$shrext'
;;
knetbsd*-gnu)
library_names_spec='$libname$shrext'
;;
netbsd*)
library_names_spec='$libname$shrext'
;;
newsos6)
library_names_spec='$libname$shrext'
;;
nto-qnx*)
library_names_spec='$libname$shrext'
;;
openbsd*)
library_names_spec='$libname$shrext$versuffix'
;;
os2*)
libname_spec='$name'
shrext=.dll
library_names_spec='$libname.a'
;;
osf3* | osf4* | osf5*)
library_names_spec='$libname$shrext'
;;
rdos*)
;;
solaris*)
library_names_spec='$libname$shrext'
;;
sunos4*)
library_names_spec='$libname$shrext$versuffix'
;;
sysv4 | sysv4.3*)
library_names_spec='$libname$shrext'
;;
sysv4*MP*)
library_names_spec='$libname$shrext'
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
library_names_spec='$libname$shrext'
;;
uts4*)
library_names_spec='$libname$shrext'
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# How to pass a linker flag through the compiler.
wl="$escaped_wl"
# Static library suffix (normally "a").
libext="$libext"
# Shared library suffix (normally "so").
shlibext="$shlibext"
# Format of library name prefix.
libname_spec="$escaped_libname_spec"
# Library names that the linker finds when passed -lNAME.
library_names_spec="$escaped_library_names_spec"
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator="$hardcode_libdir_separator"
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
hardcode_direct="$hardcode_direct"
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L="$hardcode_minus_L"
EOF

File diff suppressed because it is too large Load Diff

16
data/Makefile.am Normal file
View File

@ -0,0 +1,16 @@
SUBDIRS =
if DO_PLUGIN
SUBDIRS += pkgconfig
endif
if DO_GTK
SUBDIRS += icons misc man
else
if WITH_TM
SUBDIRS += misc
endif
endif
EXTRA_DIST = \
hexchat.gresource.xml

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/icons">
<file alias="hexchat.png" preprocess="to-pixdata" compressed="true">icons/hexchat.png</file>
<file alias="book.png" preprocess="to-pixdata" compressed="true">icons/book.png</file>
<file alias="ulist_voice.png" preprocess="to-pixdata" compressed="true">icons/ulist_voice.png</file>
<file alias="ulist_halfop.png" preprocess="to-pixdata" compressed="true">icons/ulist_halfop.png</file>
<file alias="ulist_op.png" preprocess="to-pixdata" compressed="true">icons/ulist_op.png</file>
<file alias="ulist_owner.png" preprocess="to-pixdata" compressed="true">icons/ulist_owner.png</file>
<file alias="ulist_founder.png" preprocess="to-pixdata" compressed="true">icons/ulist_founder.png</file>
<file alias="ulist_netop.png" preprocess="to-pixdata" compressed="true">icons/ulist_netop.png</file>
<file alias="tray_fileoffer.png" preprocess="to-pixdata" compressed="true">icons/tray_fileoffer.png</file>
<file alias="tray_highlight.png" preprocess="to-pixdata" compressed="true">icons/tray_highlight.png</file>
<file alias="tray_message.png" preprocess="to-pixdata" compressed="true">icons/tray_message.png</file>
<file alias="tree_channel.png" preprocess="to-pixdata">icons/tree_channel.png</file>
<file alias="tree_dialog.png" preprocess="to-pixdata" compressed="true">icons/tree_dialog.png</file>
<file alias="tree_server.png" preprocess="to-pixdata" compressed="true">icons/tree_server.png</file>
<file alias="tree_util.png" preprocess="to-pixdata" compressed="true">icons/tree_util.png</file>
</gresource>
</gresources>

View File

@ -1,4 +1,4 @@
icon_DATA = ../../src/pixmaps/hexchat.png
icon_DATA = hexchat.png
icondir = $(datadir)/icons/hicolor/48x48/apps
hicolor_DATA = hexchat.svg
@ -11,3 +11,5 @@ install-data-hook:
uninstall-hook:
$(UPDATE_ICON_CACHE);
EXTRA_DIST = $(icon_DATA) $(hicolor_DATA)

View File

Before

Width:  |  Height:  |  Size: 841 B

After

Width:  |  Height:  |  Size: 841 B

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
height="64"
width="64">
<metadata>
<rdf:RDF>
<cc:Work>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:creator>
<cc:Agent>
<dc:title>Guglielmi David</dc:title>
</cc:Agent>
</dc:creator>
<cc:license rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
<dc:rights>
<cc:Agent>
<dc:title>Peter Zelezny</dc:title>
</cc:Agent>
</dc:rights>
<dc:contributor>
<cc:Agent>
<dc:title>Samuel Messner</dc:title>
</cc:Agent>
</dc:contributor>
</cc:Work>
<cc:License rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
<cc:requires rdf:resource="http://web.resource.org/cc/Notice" />
<cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
<cc:requires rdf:resource="http://web.resource.org/cc/SourceCode" />
<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<defs>
<linearGradient id="hexchatGradient" x1="0" y1="1" x2="0" y2="0">
<stop id="hgRedStop" offset="0" style="stop-color: #FF2600; stop-opacity: 1;" />
<stop id="hgYellowStop" offset="1" style="stop-color: #FFD600; stop-opacity: 1;" />
</linearGradient>
<filter inkscape:collect="always" id="dropshadow">
<feGaussianBlur inkscape:collect="always" stdDeviation="1.9736701" id="dropshadowGaussian" />
</filter>
</defs>
<path
style="fill: #000000; fill-opacity: 1;"
d="m 31.62506,4.4248023 c -7.285288,0.0713 -14.595323,0.526836 -15.96875,1.3125 C 12.909458,7.3086297 -0.0321942,29.523731 6.0185229e-5,32.612303 0.0323162,35.700876 13.470952,57.688808 16.25006,59.206053 c 2.779105,1.517245 29.159399,1.258827 31.90625,-0.3125 2.746852,-1.571328 15.688504,-23.786428 15.65625,-26.875 C 63.7803,28.929981 50.372918,6.9107967 47.59381,5.3935523 46.204258,4.6349293 38.910347,4.3535003 31.62506,4.4248023 z m -0.1875,9.2500007 c 3.386631,-0.03246 6.676687,0.05409 8.75,0.28125 l -8.71875,9.71875 -9.0625,-9.5 c 2.055746,-0.283043 5.521157,-0.466366 9.03125,-0.5 z m 17.34375,9.84375 c 2.298293,3.744897 4.302354,7.392556 4.3125,8.34375 0.01126,1.055883 -2.358157,5.507241 -4.875,9.6875 l -9.03125,-8.03125 z m -34.46875,0.25 8.75,9.75 -8.1875,7.875 c -2.482342,-3.992634 -4.707927,-8.110307 -4.71875,-9.125 -0.01021,-0.95736 1.927117,-4.687748 4.15625,-8.5 z m 17.15625,16.90625 9.8125,9.21875 c -4.111037,0.67314 -16.108253,0.781873 -19.46875,0.125 z"
id="outline"
sodipodi:nodetypes="ssssssssscccscsccccccsccccc" />
<path
style="fill: url(#hexchatGradient); fill-opacity: 1;"
d="m 31.25006,6.4873027 c -6.857093,0.06521 -13.707297,0.469014 -15,1.1875 -2.585405,1.4369712 -14.780358,21.7692653 -14.75,24.5937503 0.03036,2.824486 12.665486,22.924987 15.28125,24.3125 2.615763,1.387513 27.445846,1.186972 30.03125,-0.25 2.585405,-1.436972 14.780359,-21.769265 14.75,-24.59375 C 61.5322,28.912818 48.897074,8.7810649 46.28131,7.3935527 44.973429,6.6997957 38.107152,6.4220967 31.25006,6.4873027 z m 0.0625,5.0625003 c 5.36199,-0.05245 10.696035,0.19201 11.71875,0.75 0.06132,0.03346 0.143803,0.127745 0.21875,0.1875 l -11.28125,12.59375 -0.5,0.53125 -0.46875,-0.53125 -11.75,-12.3125 c 0.10903,-0.09884 0.228263,-0.201843 0.3125,-0.25 1.010846,-0.577879 6.38801,-0.916306 11.75,-0.96875 z m 18.0625,9.46875 c 2.883844,4.661341 5.612556,9.652893 5.625,10.84375 0.01348,1.290331 -3.064699,7.087557 -6.09375,12.09375 l -11.09375,-9.90625 -0.53125,-0.46875 0.5,-0.46875 11.59375,-12.09375 z m -35.78125,0.03125 10.84375,12.0625 0.4375,0.46875 -0.46875,0.4375 -10.28125,9.90625 c -3.04689,-4.86606 -6.049362,-10.36778 -6.0625,-11.625 -0.01271,-1.216102 2.689239,-6.451996 5.53125,-11.25 z m 17.875,17.78125 0.4375,0.4375 12.34375,11.59375 c -0.318014,0.365376 -0.587006,0.638955 -0.78125,0.75 -2.02169,1.155758 -21.423322,1.397228 -23.46875,0.28125 -0.228202,-0.124506 -0.601742,-0.47821 -1,-0.9375 l 12,-11.6875 0.46875,-0.4375 z"
id="coloredX" />
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
data/icons/hexchat.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

BIN
data/icons/hexchat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

58
data/icons/hexchat.svg Normal file
View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xlink="http://www.w3.org/1999/xlink"
height="64"
width="64">
<metadata>
<rdf:RDF>
<cc:Work>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:creator>
<cc:Agent>
<dc:title>Guglielmi David</dc:title>
</cc:Agent>
</dc:creator>
<cc:license rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
<dc:rights>
<cc:Agent>
<dc:title>Peter Zelezny</dc:title>
</cc:Agent>
</dc:rights>
<dc:contributor>
<cc:Agent>
<dc:title>Samuel Messner</dc:title>
</cc:Agent>
</dc:contributor>
</cc:Work>
<cc:License rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
<cc:requires rdf:resource="http://web.resource.org/cc/Notice" />
<cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
<cc:requires rdf:resource="http://web.resource.org/cc/SourceCode" />
<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<defs>
<linearGradient id="hexchatGradient" x1="0" y1="0" x2="0" y2="1">
<stop id="hgYellowStop" offset="0" style="stop-color: #FFD600" />
<stop id="hgRedStop" offset="1" style="stop-color: #FF2600" />
</linearGradient>
</defs>
<use xlink:href="#outline" style="opacity:0.15" transform="translate(0,2)" id="shadow" />
<path
style="fill:#000000; fill-opacity: 1;"
d="M 31.71875,4.1088109 C 24.433462,4.1801109 17.123427,4.6356469 15.75,5.4213109 13.003148,6.9926379 0.06149557,29.207739 0.09374996,32.296311 0.12600597,35.384884 13.564642,57.372816 16.34375,58.890061 19.122855,60.407306 45.503149,60.148888 48.25,58.577561 50.996852,57.006233 63.938504,34.791133 63.90625,31.702561 63.87399,28.613989 50.466608,6.5948049 47.6875,5.0775609 46.297948,4.3189379 39.004037,4.0375089 31.71875,4.1088109 Z m -0.1875,9.2500001 c 3.386631,-0.03246 6.676687,0.05409 8.75,0.28125 l -8.71875,9.71875 -9.0625,-9.5 c 2.055746,-0.283043 5.521157,-0.466366 9.03125,-0.5 z m 17.34375,9.84375 c 2.298293,3.744897 4.302354,7.392556 4.3125,8.34375 0.01126,1.055883 -2.358157,5.507241 -4.875,9.6875 l -9.03125,-8.03125 z m -34.46875,0.25 8.75,9.75 -8.1875,7.875 c -2.482342,-3.992634 -4.707927,-8.110307 -4.71875,-9.125 -0.01021,-0.95736 1.927117,-4.687748 4.15625,-8.5 z m 17.15625,16.90625 9.8125,9.21875 c -4.111037,0.67314 -16.108253,0.781873 -19.46875,0.125 z"
id="outline" />
<path
style="fill:url(#hexchatGradient); fill-opacity: 1;"
d="m 31.34375,6.1713109 c -6.857093,0.06521 -13.707297,0.469014 -15,1.1875 C 13.758345,8.7957819 1.5633917,29.128076 1.5937497,31.952561 c 0.03036,2.824486 12.6654863,22.924987 15.2812503,24.3125 2.615763,1.387513 27.445846,1.186972 30.03125,-0.25 2.585405,-1.436972 14.780359,-21.769265 14.75,-24.59375 C 61.62589,28.596826 48.990764,8.4650729 46.375,7.0775609 45.067119,6.3838039 38.200842,6.1061049 31.34375,6.1713109 Z m 0.0625,5.0625001 c 5.36199,-0.05245 10.696035,0.19201 11.71875,0.75 0.06132,0.03346 0.143803,0.127745 0.21875,0.1875 l -11.28125,12.59375 -0.5,0.53125 -0.46875,-0.53125 -11.75,-12.3125 c 0.10903,-0.09884 0.228263,-0.201843 0.3125,-0.25 1.010846,-0.577879 6.38801,-0.916306 11.75,-0.96875 z m 18.0625,9.46875 c 2.883844,4.661341 5.612556,9.652893 5.625,10.84375 0.01348,1.290331 -3.064699,7.087557 -6.09375,12.09375 l -11.09375,-9.90625 -0.53125,-0.46875 0.5,-0.46875 11.59375,-12.09375 z m -35.78125,0.03125 10.84375,12.0625 0.4375,0.46875 -0.46875,0.4375 -10.28125,9.90625 c -3.04689,-4.86606 -6.0493623,-10.36778 -6.0625003,-11.625 -0.01271,-1.216102 2.6892393,-6.451996 5.5312503,-11.25 z m 17.875,17.78125 0.4375,0.4375 12.34375,11.59375 c -0.318014,0.365376 -0.587006,0.638955 -0.78125,0.75 -2.02169,1.155758 -21.423322,1.397228 -23.46875,0.28125 -0.228202,-0.124506 -0.601742,-0.47821 -1,-0.9375 l 12,-11.6875 0.46875,-0.4375 z"
id="coloredX" />
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
data/icons/tray_message.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 422 B

After

Width:  |  Height:  |  Size: 422 B

View File

Before

Width:  |  Height:  |  Size: 911 B

After

Width:  |  Height:  |  Size: 911 B

View File

Before

Width:  |  Height:  |  Size: 568 B

After

Width:  |  Height:  |  Size: 568 B

View File

Before

Width:  |  Height:  |  Size: 611 B

After

Width:  |  Height:  |  Size: 611 B

View File

Before

Width:  |  Height:  |  Size: 660 B

After

Width:  |  Height:  |  Size: 660 B

View File

Before

Width:  |  Height:  |  Size: 668 B

After

Width:  |  Height:  |  Size: 668 B

View File

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 593 B

View File

Before

Width:  |  Height:  |  Size: 691 B

After

Width:  |  Height:  |  Size: 691 B

View File

Before

Width:  |  Height:  |  Size: 678 B

After

Width:  |  Height:  |  Size: 678 B

View File

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 670 B

3
data/man/Makefile.am Normal file
View File

@ -0,0 +1,3 @@
man_MANS = hexchat.1
EXTRA_DIST = hexchat.1.in

View File

@ -1,10 +1,10 @@
.TH HEXCHAT "1" "April 2013" "HexChat 2.9.5" "User Commands"
.TH HEXCHAT "1" "April 2013" "HexChat @VERSION@" "User Commands"
.SH NAME
HexChat \- IRC Client
.SH DESCRIPTION
.SS "Usage:"
.IP
hexchat [OPTION...]
hexchat [OPTION...] URL
.SS "Help Options:"
.TP
\fB\-h\fR, \fB\-\-help\fR

50
data/misc/Makefile.am Normal file
View File

@ -0,0 +1,50 @@
appdatadir = $(datadir)/appdata
appdata_in_files =
if DO_GTK
appdata_in_files += hexchat.appdata.xml.in
endif
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@
if USE_DBUS
exec_command = 'hexchat --existing %U'
else
exec_command = 'hexchat %U'
endif
hexchat.desktop.in: hexchat.desktop.in.in
$(AM_V_GEN)sed -e s!\@exec_command\@!$(exec_command)! < $< > $@
data_desktopdir = $(datadir)/applications
data_desktop_in_files =
if DO_GTK
data_desktop_in_files += hexchat.desktop.in
endif
if WITH_TM
data_desktop_in_files += htm.desktop.in
mime_DATA = htm-mime.xml
mimedir = $(datadir)/mime/packages
endif
data_desktop_DATA = $(data_desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
UPDATE_MIME_DATABASE = update-mime-database "$(datadir)/mime" || :
UPDATE_DESKTOP_DATABASE = update-desktop-database -q "$(datadir)/applications" || :
install-data-hook:
$(UPDATE_MIME_DATABASE);
$(UPDATE_DESKTOP_DATABASE);
uninstall-hook:
$(UPDATE_MIME_DATABASE);
$(UPDATE_DESKTOP_DATABASE);
EXTRA_DIST = hexchat.appdata.xml.in hexchat.desktop.in.in htm.desktop.in htm-mime.xml
CLEANFILES = $(appdata_DATA) $(data_desktop_DATA) hexchat.desktop.in

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>hexchat.desktop</id>
<name>HexChat</name>
<developer_name>HexChat</developer_name>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<translation type="gettext">hexchat</translation>
<summary>IRC Client</summary>
<description>
<_p>HexChat is an easy to use yet extensible IRC Client. It allows you to securely join multiple networks and talk to users privately or in channels using a customizable interface. You can even transfer files.</_p>
<_p>HexChat supports features such as: DCC, SASL, proxies, spellcheck, alerts, logging, custom themes, and Python/Perl scripts.</_p>
</description>
<url type="homepage">http://hexchat.github.io</url>
<url type="bugtracker">https://github.com/hexchat/hexchat</url>
<url type="translate">https://www.transifex.com/hexchat/hexchat</url>
<url type="donation">https://goo.gl/jESZvU</url>
<url type="help">https://hexchat.readthedocs.io/en/latest/</url>
<screenshots>
<screenshot type="default">
<image>http://i.imgur.com/tLMguQz.png</image>
<_caption>Main Chat Window</_caption>
</screenshot>
</screenshots>
<update_contact>tingping_at_fedoraproject.org</update_contact>
</component>

View File

@ -0,0 +1,18 @@
[Desktop Entry]
_Name=HexChat
_GenericName=IRC Client
_Comment=Chat with other people online
_Keywords=IM;Chat;
Exec=@exec_command@
Icon=hexchat
Terminal=false
Type=Application
Categories=GTK;Network;IRCClient;
StartupNotify=true
X-GNOME-UsesNotifications=true
MimeType=x-scheme-handler/irc;x-scheme-handler/ircs;
Actions=SafeMode;
[Desktop Action SafeMode]
_Name=Open Safe Mode
Exec=hexchat --no-auto --no-plugins

8
data/misc/htm-mime.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-hct">
<comment>HexChat theme archives</comment>
<icon name="hexchat" />
<glob pattern="*.hct" weight="100" />
</mime-type>
</mime-info>

7
data/misc/htm.desktop.in Normal file
View File

@ -0,0 +1,7 @@
[Desktop Entry]
_Name=HexChat Theme Manager
Exec=thememan %f
Icon=hexchat
Terminal=false
Type=Application
MimeType=application/x-hct;

124
m4/ax_check_enable_debug.m4 Normal file
View File

@ -0,0 +1,124 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_enable_debug.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_ENABLE_DEBUG([enable by default=yes/info/profile/no], [ENABLE DEBUG VARIABLES ...], [DISABLE DEBUG VARIABLES NDEBUG ...], [IS-RELEASE])
#
# DESCRIPTION
#
# Check for the presence of an --enable-debug option to configure, with
# the specified default value used when the option is not present. Return
# the value in the variable $ax_enable_debug.
#
# Specifying 'yes' adds '-g -O0' to the compilation flags for all
# languages. Specifying 'info' adds '-g' to the compilation flags.
# Specifying 'profile' adds '-g -pg' to the compilation flags and '-pg' to
# the linking flags. Otherwise, nothing is added.
#
# Define the variables listed in the second argument if debug is enabled,
# defaulting to no variables. Defines the variables listed in the third
# argument if debug is disabled, defaulting to NDEBUG. All lists of
# variables should be space-separated.
#
# If debug is not enabled, ensure AC_PROG_* will not add debugging flags.
# Should be invoked prior to any AC_PROG_* compiler checks.
#
# IS-RELEASE can be used to change the default to 'no' when making a
# release. Set IS-RELEASE to 'yes' or 'no' as appropriate. By default, it
# uses the value of $ax_is_release, so if you are using the AX_IS_RELEASE
# macro, there is no need to pass this parameter.
#
# AX_IS_RELEASE([git-directory])
# AX_CHECK_ENABLE_DEBUG()
#
# LICENSE
#
# Copyright (c) 2011 Rhys Ulerich <rhys.ulerich@gmail.com>
# Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved.
#serial 5
AC_DEFUN([AX_CHECK_ENABLE_DEBUG],[
AC_BEFORE([$0],[AC_PROG_CC])dnl
AC_BEFORE([$0],[AC_PROG_CXX])dnl
AC_BEFORE([$0],[AC_PROG_F77])dnl
AC_BEFORE([$0],[AC_PROG_FC])dnl
AC_MSG_CHECKING(whether to enable debugging)
ax_enable_debug_default=m4_tolower(m4_normalize(ifelse([$1],,[no],[$1])))
ax_enable_debug_is_release=m4_tolower(m4_normalize(ifelse([$4],,
[$ax_is_release],
[$4])))
# If this is a release, override the default.
AS_IF([test "$ax_enable_debug_is_release" = "yes"],
[ax_enable_debug_default="no"])
m4_define(ax_enable_debug_vars,[m4_normalize(ifelse([$2],,,[$2]))])
m4_define(ax_disable_debug_vars,[m4_normalize(ifelse([$3],,[NDEBUG],[$3]))])
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug=]@<:@yes/info/profile/no@:>@,[compile with debugging])],
[],enable_debug=$ax_enable_debug_default)
# empty mean debug yes
AS_IF([test "x$enable_debug" = "x"],
[enable_debug="yes"])
# case of debug
AS_CASE([$enable_debug],
[yes],[
AC_MSG_RESULT(yes)
CFLAGS="${CFLAGS} -g -O0"
CXXFLAGS="${CXXFLAGS} -g -O0"
FFLAGS="${FFLAGS} -g -O0"
FCFLAGS="${FCFLAGS} -g -O0"
OBJCFLAGS="${OBJCFLAGS} -g -O0"
],
[info],[
AC_MSG_RESULT(info)
CFLAGS="${CFLAGS} -g"
CXXFLAGS="${CXXFLAGS} -g"
FFLAGS="${FFLAGS} -g"
FCFLAGS="${FCFLAGS} -g"
OBJCFLAGS="${OBJCFLAGS} -g"
],
[profile],[
AC_MSG_RESULT(profile)
CFLAGS="${CFLAGS} -g -pg"
CXXFLAGS="${CXXFLAGS} -g -pg"
FFLAGS="${FFLAGS} -g -pg"
FCFLAGS="${FCFLAGS} -g -pg"
OBJCFLAGS="${OBJCFLAGS} -g -pg"
LDFLAGS="${LDFLAGS} -pg"
],
[
AC_MSG_RESULT(no)
dnl Ensure AC_PROG_CC/CXX/F77/FC/OBJC will not enable debug flags
dnl by setting any unset environment flag variables
AS_IF([test "x${CFLAGS+set}" != "xset"],
[CFLAGS=""])
AS_IF([test "x${CXXFLAGS+set}" != "xset"],
[CXXFLAGS=""])
AS_IF([test "x${FFLAGS+set}" != "xset"],
[FFLAGS=""])
AS_IF([test "x${FCFLAGS+set}" != "xset"],
[FCFLAGS=""])
AS_IF([test "x${OBJCFLAGS+set}" != "xset"],
[OBJCFLAGS=""])
])
dnl Define various variables if debugging is disabled.
dnl assert.h is a NOP if NDEBUG is defined, so define it by default.
AS_IF([test "x$enable_debug" = "xyes"],
[m4_map_args_w(ax_enable_debug_vars, [AC_DEFINE(], [,,[Define if debugging is enabled])])],
[m4_map_args_w(ax_disable_debug_vars, [AC_DEFINE(], [,,[Define if debugging is disabled])])])
ax_enable_debug=$enable_debug
])

69
m4/ax_is_release.m4 Normal file
View File

@ -0,0 +1,69 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_is_release.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_IS_RELEASE(POLICY)
#
# DESCRIPTION
#
# Determine whether the code is being configured as a release, or from
# git. Set the ax_is_release variable to 'yes' or 'no'.
#
# If building a release version, it is recommended that the configure
# script disable compiler errors and debug features, by conditionalising
# them on the ax_is_release variable. If building from git, these
# features should be enabled.
#
# The POLICY parameter specifies how ax_is_release is determined. It can
# take the following values:
#
# * git-directory: ax_is_release will be 'no' if a '.git' directory exists
# * minor-version: ax_is_release will be 'no' if the minor version number
# in $PACKAGE_VERSION is odd; this assumes
# $PACKAGE_VERSION follows the 'major.minor.micro' scheme
# * micro-version: ax_is_release will be 'no' if the micro version number
# in $PACKAGE_VERSION is odd; this assumes
# $PACKAGE_VERSION follows the 'major.minor.micro' scheme
# * always: ax_is_release will always be 'yes'
# * never: ax_is_release will always be 'no'
#
# Other policies may be added in future.
#
# LICENSE
#
# Copyright (c) 2015 Philip Withnall <philip@tecnocode.co.uk>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved.
#serial 3
AC_DEFUN([AX_IS_RELEASE],[
AC_BEFORE([AC_INIT],[$0])
m4_case([$1],
[git-directory],[
# $is_release = (.git directory does not exist)
AS_IF([test -d .git],[ax_is_release=no],[ax_is_release=yes])
],
[minor-version],[
# $is_release = ($minor_version is even)
minor_version=`echo "$PACKAGE_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
AS_IF([test "$(( $minor_version % 2 ))" -ne 0],
[ax_is_release=no],[ax_is_release=yes])
],
[micro-version],[
# $is_release = ($micro_version is even)
micro_version=`echo "$PACKAGE_VERSION" | sed 's/[[^.]]*\.[[^.]]*\.\([[^.]]*\).*/\1/'`
AS_IF([test "$(( $micro_version % 2 ))" -ne 0],
[ax_is_release=no],[ax_is_release=yes])
],
[always],[ax_is_release=yes],
[never],[ax_is_release=no],
[
AC_MSG_ERROR([Invalid policy. Valid policies: git-directory, minor-version.])
])
])

327
m4/ax_python_devel.m4 Normal file
View File

@ -0,0 +1,327 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_python_devel.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PYTHON_DEVEL([version])
#
# DESCRIPTION
#
# Note: Defines as a precious variable "PYTHON_VERSION". Don't override it
# in your configure.ac.
#
# This macro checks for Python and tries to get the include path to
# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LIBS) output
# variables. It also exports $(PYTHON_EXTRA_LIBS) and
# $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code.
#
# You can search for some particular version of Python by passing a
# parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please
# note that you *have* to pass also an operator along with the version to
# match, and pay special attention to the single quotes surrounding the
# version number. Don't use "PYTHON_VERSION" for this: that environment
# variable is declared as precious and thus reserved for the end-user.
#
# This macro should work for all versions of Python >= 2.1.0. As an end
# user, you can disable the check for the python version by setting the
# PYTHON_NOVERSIONCHECK environment variable to something else than the
# empty string.
#
# If you need to use this macro for an older Python version, please
# contact the authors. We're always open for feedback.
#
# LICENSE
#
# Copyright (c) 2009 Sebastian Huber <sebastian-huber@web.de>
# Copyright (c) 2009 Alan W. Irwin
# Copyright (c) 2009 Rafael Laboissiere <rafael@laboissiere.net>
# Copyright (c) 2009 Andrew Collier
# Copyright (c) 2009 Matteo Settenvini <matteo@member.fsf.org>
# Copyright (c) 2009 Horst Knorr <hk_classes@knoda.org>
# Copyright (c) 2013 Daniel Mullner <muellner@math.stanford.edu>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 18
AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
AC_DEFUN([AX_PYTHON_DEVEL],[
#
# Allow the use of a (user set) custom python version
#
AC_ARG_VAR([PYTHON_VERSION],[The installed Python
version to use, for example '2.3'. This string
will be appended to the Python interpreter
canonical name.])
AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
if test -z "$PYTHON"; then
AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path])
PYTHON_VERSION=""
fi
#
# Check for a version of Python >= 2.1.0
#
AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
ac_supports_python_ver=`$PYTHON -c "import sys; \
ver = sys.version.split ()[[0]]; \
print (ver >= '2.1.0')"`
if test "$ac_supports_python_ver" != "True"; then
if test -z "$PYTHON_NOVERSIONCHECK"; then
AC_MSG_RESULT([no])
AC_MSG_FAILURE([
This version of the AC@&t@_PYTHON_DEVEL macro
doesn't work properly with versions of Python before
2.1.0. You may need to re-run configure, setting the
variables PYTHON_CPPFLAGS, PYTHON_LIBS, PYTHON_SITE_PKG,
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
to something else than an empty string.
])
else
AC_MSG_RESULT([skip at user request])
fi
else
AC_MSG_RESULT([yes])
fi
#
# if the macro parameter ``version'' is set, honour it
#
if test -n "$1"; then
AC_MSG_CHECKING([for a version of Python $1])
ac_supports_python_ver=`$PYTHON -c "import sys; \
ver = sys.version.split ()[[0]]; \
print (ver $1)"`
if test "$ac_supports_python_ver" = "True"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([this package requires Python $1.
If you have it installed, but it isn't the default Python
interpreter in your system path, please pass the PYTHON_VERSION
variable to configure. See ``configure --help'' for reference.
])
PYTHON_VERSION=""
fi
fi
#
# Check if you have distutils, else fail
#
AC_MSG_CHECKING([for the distutils Python package])
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
if test -z "$ac_distutils_result"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([cannot import Python module "distutils".
Please check your Python installation. The error was:
$ac_distutils_result])
PYTHON_VERSION=""
fi
#
# Check for Python include path
#
AC_MSG_CHECKING([for Python include path])
if test -z "$PYTHON_CPPFLAGS"; then
python_path=`$PYTHON -c "import distutils.sysconfig; \
print (distutils.sysconfig.get_python_inc ());"`
plat_python_path=`$PYTHON -c "import distutils.sysconfig; \
print (distutils.sysconfig.get_python_inc (plat_specific=1));"`
if test -n "${python_path}"; then
if test "${plat_python_path}" != "${python_path}"; then
python_path="-I$python_path -I$plat_python_path"
else
python_path="-I$python_path"
fi
fi
PYTHON_CPPFLAGS=$python_path
fi
AC_MSG_RESULT([$PYTHON_CPPFLAGS])
AC_SUBST([PYTHON_CPPFLAGS])
#
# Check for Python library path
#
AC_MSG_CHECKING([for Python library path])
if test -z "$PYTHON_LIBS"; then
# (makes two attempts to ensure we've got a version number
# from the interpreter)
ac_python_version=`cat<<EOD | $PYTHON -
# join all versioning strings, on some systems
# major/minor numbers could be in different list elements
from distutils.sysconfig import *
e = get_config_var('VERSION')
if e is not None:
print(e)
EOD`
if test -z "$ac_python_version"; then
if test -n "$PYTHON_VERSION"; then
ac_python_version=$PYTHON_VERSION
else
ac_python_version=`$PYTHON -c "import sys; \
print (sys.version[[:3]])"`
fi
fi
# Make the versioning information available to the compiler
AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"],
[If available, contains the Python version number currently in use.])
# First, the library directory:
ac_python_libdir=`cat<<EOD | $PYTHON -
# There should be only one
import distutils.sysconfig
e = distutils.sysconfig.get_config_var('LIBDIR')
if e is not None:
print (e)
EOD`
# Now, for the library:
ac_python_library=`cat<<EOD | $PYTHON -
import distutils.sysconfig
c = distutils.sysconfig.get_config_vars()
if 'LDVERSION' in c:
print ('python'+c[['LDVERSION']])
else:
print ('python'+c[['VERSION']])
EOD`
# This small piece shamelessly adapted from PostgreSQL python macro;
# credits goes to momjian, I think. I'd like to put the right name
# in the credits, if someone can point me in the right direction... ?
#
if test -n "$ac_python_libdir" -a -n "$ac_python_library"
then
# use the official shared library
ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
PYTHON_LIBS="-L$ac_python_libdir -l$ac_python_library"
else
# old way: use libpython from python_configdir
ac_python_libdir=`$PYTHON -c \
"from distutils.sysconfig import get_python_lib as f; \
import os; \
print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
fi
if test -z "PYTHON_LIBS"; then
AC_MSG_ERROR([
Cannot determine location of your Python DSO. Please check it was installed with
dynamic libraries enabled, or try setting PYTHON_LIBS by hand.
])
fi
fi
AC_MSG_RESULT([$PYTHON_LIBS])
AC_SUBST([PYTHON_LIBS])
#
# Check for site packages
#
AC_MSG_CHECKING([for Python site-packages path])
if test -z "$PYTHON_SITE_PKG"; then
PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
print (distutils.sysconfig.get_python_lib(0,0));"`
fi
AC_MSG_RESULT([$PYTHON_SITE_PKG])
AC_SUBST([PYTHON_SITE_PKG])
#
# libraries which must be linked in when embedding
#
AC_MSG_CHECKING(python extra libraries)
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
print (conf('LIBS') + ' ' + conf('SYSLIBS'))"`
fi
AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
AC_SUBST(PYTHON_EXTRA_LDFLAGS)
#
# linking flags needed when embedding
#
AC_MSG_CHECKING(python extra linking flags)
if test -z "$PYTHON_EXTRA_LIBS"; then
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
conf = distutils.sysconfig.get_config_var; \
print (conf('LINKFORSHARED'))"`
fi
AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
AC_SUBST(PYTHON_EXTRA_LIBS)
#
# final check to see if everything compiles alright
#
AC_MSG_CHECKING([consistency of all components of python development environment])
# save current global flags
ac_save_LIBS="$LIBS"
ac_save_LDFLAGS="$LDFLAGS"
ac_save_CPPFLAGS="$CPPFLAGS"
LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LIBS"
LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS"
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
AC_LANG_PUSH([C])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[#include <Python.h>]],
[[Py_Initialize();]])
],[pythonexists=yes],[pythonexists=no])
AC_LANG_POP([C])
# turn back to default flags
CPPFLAGS="$ac_save_CPPFLAGS"
LIBS="$ac_save_LIBS"
LDFLAGS="$ac_save_LDFLAGS"
AC_MSG_RESULT([$pythonexists])
if test ! "x$pythonexists" = "xyes"; then
AC_MSG_FAILURE([
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LIBS environment variable.
Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
============================================================================
ERROR!
You probably have to install the development version of the Python package
for your distribution. The exact name of this package varies among them.
============================================================================
])
PYTHON_VERSION=""
fi
#
# all done!
#
])

8
m4/clang-analyze.am Normal file
View File

@ -0,0 +1,8 @@
analysis_verbose = $(analysis_verbose_$(V))
analysis_verbose_ = $(analysis_verbose_$(AM_DEFAULT_VERBOSITY))
analysis_verbose_0 = @echo " CCSA " $@; $(COMPILE) --analyze $< -o $@;
analysis_verbose_1 = $(COMPILE) --analyze $< -o $@;
%.plist: %.c
$(analysis_verbose)

View File

@ -1 +0,0 @@
man_MANS = hexchat.1

30
osx/Info.plist.in Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>HexChat</string>
<key>CFBundleGetInfoString</key>
<string>@VERSION@</string>
<key>CFBundleIconFile</key>
<string>hexchat.icns</string>
<key>CFBundleIdentifier</key>
<string>org.hexchat</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>@VERSION@</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>@VERSION@</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>LSMinimumSystemVersion</key>
<string>10.4</string>
</dict>
</plist>

435
osx/gtkrc Normal file
View File

@ -0,0 +1,435 @@
# Mac Theme for Xamarin composed by Lanedo GmbH
# Copyright 2012 Xamarin Inc.
# Authors:
# Christian Kellner <christian.kellner@lanedo.com>
# Carlos Garnacho <carlos.garnacho@lanedo.com>
#
# Modified by HexChat
#
gtk-color-scheme =
"bg_color: #f5f5f5
fg_color: #000
base_color: #fff
text_color: #000
selected_bg_color: #0066FF
selected_fg_color: #fff
tooltip_bg_color: #fafaba
tooltip_fg_color: #000"
gtk-button-images = 0
gtk-menu-images = 0
gtk-toolbar-style = 0
gtk-enable-mnemonics = 0
gtk-icon-sizes = "gtk-small-toolbar=16,16:gtk-large-toolbar=22,22"
gtk-toolbar-icon-size = large-toolbar
gtk-auto-mnemonics = 1
gtk-error-bell = 0
gtk-show-input-method-menu = 0
gtk-key-theme-name="Mac"
style "default" {
xthickness = 1
ythickness = 1
### colours
bg[NORMAL] = @bg_color
bg[PRELIGHT] = @bg_color
bg[SELECTED] = @selected_bg_color
bg[INSENSITIVE] = @bg_color
bg[ACTIVE] = @bg_color
fg[NORMAL] = @fg_color
fg[PRELIGHT] = @fg_color
fg[SELECTED] = @selected_fg_color
fg[INSENSITIVE] = darker (@bg_color)
fg[ACTIVE] = @fg_color
text[NORMAL] = @text_color
text[PRELIGHT] = @text_color
text[SELECTED] = @selected_fg_color
text[INSENSITIVE] = darker (@bg_color)
text[ACTIVE] = @text_color
base[NORMAL] = @base_color
base[PRELIGHT] = @selected_bg_color
base[SELECTED] = @selected_bg_color
base[INSENSITIVE] = @bg_color
base[ACTIVE] = shade (1.3, @selected_bg_color)
### style properties
GtkWidget::new-tooltip-style = 1
GtkEntry::honors-transparent-bg-hint = 1
GtkEntry::inner-border = { 2, 2, 2, 2 }
GtkButton::child-displacement-x = 0
GtkButton::child-displacement-y = 0
GtkButton::default-border = { 0, 0, 0, 0 }
GtkButton::inner-border = { 2, 2, 4, 4 }
GtkButtonBox::child-min-width = 70
GtkButtonBox::child-min-height = 22
GtkTreeView::odd-row-color = "#f0f4f9"
GtkScrolledWindow::scrollbar-spacing = 0
GtkScrolledWindow::scrollbars-within-bevel = 1
GtkScale::slider-length = 14
GtkRange::trough-side-details = 1
GtkTreeView::expander-size = 8
GtkExpander::expander-size = 8
GtkComboBox::arrow-size = 12
GtkMenu::vertical-padding = 4
GtkMenuItem::horizontal-padding = 9
GtkMenuItem::toggle-spacing = 0
GtkSeparatorMenuItem::horizontal-padding = 2
engine "xamarin" {
arrowstyle = 2
rgba = TRUE
roundness = 3
glazestyle = 0
menustyle = 0
menuitemstyle = 0
menubaritemstyle = 0
comboboxstyle = 1
spinbuttonstyle = 1
colorize_scrollbar = FALSE
progressbarstyle = 0
trough_shades = { 0.842, 0.886 }
}
}
style "wide" = "default" {
xthickness = 2
ythickness = 2
}
style "wider" = "default" {
xthickness = 3
ythickness = 3
}
style "button" {
xthickness = 2
ythickness = 2
bg[NORMAL] = @bg_color
bg[PRELIGHT] = shade(1.1, @bg_color)
bg[ACTIVE] = @bg_color
bg[INSENSITIVE] = @bg_color
GtkWidget::focus-padding = 0
engine "quartz" {
}
}
style "combo-box-button" {
xthickness = 2
ythickness = 4
bg[NORMAL] = @base_color
bg[PRELIGHT] = shade(1.1, @base_color)
bg[ACTIVE] = @base_color
bg[INSENSITIVE] = @base_color
GtkWidget::focus-padding = 0
engine "xamarin" {
contrast = 1.0
gradient_shades = {0.99, 0.98, 0.97, 0.96}
focus_color = shade(0.6, @base_color)
textstyle = 1
}
}
style "dialog-button" = "default" {
xthickness = 3
ythickness = 2
font_name = "Lucida Grande 13"
GtkWidget::draw-border = { 2, 2, 2, 2 }
GtkWidget::focus-line-width = 1
GtkButton::inner-border = { 8, 8, 0, 3 }
engine "quartz" {
buttontype = "aqua"
}
}
style "toggle-button" = "button" {
bg[NORMAL] = @base_color
bg[PRELIGHT] = shade(0.98, @base_color)
}
style "menu" {
xthickness = 0
ythickness = 0
font_name = "Lucida Grande 14"
bg[PRELIGHT] = @selected_fg_color
fg[PRELIGHT] = @selected_fg_color
text[PRELIGHT] = @selected_fg_color
engine "quartz" {
}
}
style "menu-item" = "menu" {
ythickness = 2
GtkWidget::draw-border = { 0, 0, 0, 2 }
}
style "menu-separator" = "menu-item" {
ythickness = 3
}
style "toolbar" = "default"
{
bg[NORMAL] = "#ddd"
engine "xamarin" {
toolbarstyle = 2
}
}
style "toolbar-button"
{
engine "xamarin" {
contrast = 1.0
focus_color = @bg_color
}
}
style "tooltip"
{
xthickness = 5
ythickness = 5
fg[NORMAL] = @tooltip_fg_color
bg[NORMAL] = @tooltip_bg_color
engine "xamarin" {
roundness = 0
}
}
style "treeview" = "default"
{
GtkTreeView::odd-row-color = "#f5f5f5"
base[SELECTED] = "#2b5dcd"
base[ACTIVE] = "#cacaca"
text[SELECTED] = "#FFF"
text[ACTIVE] = "#000"
font_name = "Lucida Grande 12"
engine "quartz" {
}
}
style "tree-header"
{
ythickness = 0
bg[NORMAL] = "#f2f2f2"
font_name = "Lucida Grande 11"
GtkWidget::focus-line-width = 0
GtkWidget::draw-border = { 1, 1, 1, 1 }
GtkButton::inner-border = { 3, 3, 1, 3 }
engine "quartz" {
}
}
style "icon-view" = "default"
{
bg[SELECTED] = "#f5f7fa"
base[SELECTED] = "#f5f7fa"
fg[SELECTED] = "#000"
text[SELECTED] = "#000"
}
style "toolbar-combo-box" = "default"
{
fg[NORMAL] = "#616161"
text[NORMAL] = @fg_color
bg[NORMAL] = "#fff"
base[NORMAL] = "#fff"
ythickness = 4
xthickness = 2
engine "xamarin" {
comboboxstyle = 0
arrowstyle = 2
}
}
style "combo-box" = "default"
{
fg[NORMAL] = "#616161"
xthickness = 2
ythickness = 4
engine "xamarin" {
arrowstyle = 4
}
}
style "combo-box-entry" = "combo-box"
{
engine "xamarin" {
arrowstyle = 3
}
}
style "combo-box-label" = "combo-box"
{
fg[NORMAL] = "#595959"
}
style "combo-box-menu" = "menu" {
font_name = "Lucida Grande 12"
}
style "notebook" = "default"
{
GtkNotebook::tab-overlap = 1
#bg[ACTIVE] = @base_color
bg[NORMAL] = @base_color
engine "xamarin" {
gradient_shades = { 0.945, 0.945, 0.945, 0.685 }
}
}
style "radio-or-check-box"
{
ythickness = 6
#GtkCheckButton::indicator-size = 14
GtkCheckButton::indicator-spacing = 4
engine "quartz" {
}
}
style "entry" = "default"
{
xthickness = 2
ythickness = 2
GtkEntry::inner-border = { 2, 2, 2, 2 }
base[INSENSITIVE] = shade(1.02, @bg_color)
engine "quartz" {
}
}
style "search-entry" = "wider"
{
xthickness = 6
ythickness = 4
bg[NORMAL] = @base_color
}
style "scrollbar" = "default"
{
GtkScrollbar::has-forward-stepper = 0
GtkScrollbar::has-backward-stepper = 0
GtkRange::slider-width = 15
GtkRange::trough-border = 0
GtkRange::trough-side-details = 0
engine "quartz" {
}
}
style "progressbar" = "default"
{
engine "quartz" {
}
}
style "scrolled-window" = "default"
{
xthickness = 1
ythickness = 1
}
style "scale" = "default"
{
bg[SELECTED] = @selected_bg_color
engine "xamarin" {
roundness = 7
}
}
style "spin-button" = "wider"
{
fg[NORMAL] = "#616161"
ythickness = 4
GtkEntry::inner-border = { 2, 2, 1, 1 }
engine "xamarin" {
arrowstyle = 3
}
}
### Apply the styles
class "GtkWidget" style "default"
class "GtkEntry" style "entry"
class "GtkSpinButton" style "spin-button"
class "GtkFrame" style "wider"
class "GtkRange" style "wide"
class "GtkSeparator" style "wide"
class "GtkScrollbar" style "scrollbar"
class "GtkProgressBar" style "progressbar"
class "GtkScrolledWindow" style "scrolled-window"
class "GtkNotebook" style "notebook"
class "GtkButton" style "button"
class "GtkToggleButton" style "toggle-button"
class "GtkScale" style "scale"
#widget "*GtkEntry" style "entry"
widget "*search-entry*" style "search-entry"
widget "*GtkTextView" style "entry"
widget_class "<GtkDialog>*<GtkCheckButton>" style "radio-or-check-box"
widget_class "<GtkDialog>.<GtkVBox>.<GtkButtonBox>.<GtkButton>*" style "dialog-button"
widget_class "<GtkDialog>.<GtkVBox>.<GtkHBox>.<GtkButtonBox>.<GtkButton>*" style "dialog-button"
widget "*.toggleFindInFiles" style "toggle-button"
widget "*.toggleReplaceInFiles" style "toggle-button"
widget_class "*<GtkMenu>*" style "menu"
widget_class "*<GtkMenuItem>*" style "menu-item"
widget_class "*<GtkSeparatorMenuItem>" style "menu-separator"
widget "*.gtk-combobox-popup-menu*" style "combo-box-menu"
widget_class "*<GtkToolbar>*" style "toolbar"
widget_class "*ToolButton*" style "toolbar-button"
widget_class "*.<GtkTreeView>*" style "treeview"
widget_class "*.GtkTreeView.GtkButton" style "tree-header"
widget_class "*.GtkList.GtkButton" style "tree-header"
widget_class "*<GtkIconView>" style "icon-view"
widget_class "*.<GtkComboBox>.*" style "combo-box"
widget_class "*.<GtkComboBoxText>.*" style "combo-box-entry"
widget_class "*.<GtkComboBoxEntry>.*" style "combo-box-entry"
widget_class "*.<GtkComboBoxText>.<GtkEntry>" style "combo-box-entry"
widget_class "*.<GtkComboBoxEntry>.<GtkEntry>" style "combo-box-entry"
widget_class "*.<GtkComboBoxText>.<GtkToggleButton>" style "combo-box-button"
widget_class "*.<GtkComboBoxEntry>.<GtkToggleButton>" style "combo-box-button"
widget_class "*.<GtkComboBox>.*.GtkLabel" style "combo-box-label"
# Comboboxes within toolbars
widget_class "*.<GtkToolbar>.*.<GtkComboBox>.*" style "toolbar-combo-box"
widget "*MainToolbar*.GtkComboBox.*" style "toolbar-combo-box"
widget "gtk-tooltip*" style "tooltip"

68
osx/hexchat.bundle Normal file
View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<app-bundle>
<meta>
<prefix name="default">/usr/local</prefix>
<prefix name="enchant">/usr/local/opt/enchant-applespell</prefix>
<destination overwrite="yes">${project}</destination>
<run-install-name-tool/>
<launcher-script>${project}/launcher.sh</launcher-script >
<gtk>gtk+-2.0</gtk>
</meta>
<plist>${project}/Info.plist</plist>
<main-binary>
${prefix}/bin/hexchat
</main-binary>
<binary>
${prefix}/lib/hexchat/plugins/*.so
</binary>
<binary>
${prefix:enchant}/lib/libenchant.dylib
</binary>
<binary>
${prefix:enchant}/lib/enchant/libenchant_applespell.so
</binary>
<binary>
${prefix}/lib/${gtkdir}/modules/*.so
</binary>
<binary>
${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/engines/libquartz.so
</binary>
<binary>
${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/engines/libxamarin.so
</binary>
<binary>
${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/printbackends/*.so
</binary>
<binary>
${prefix}/lib/gdk-pixbuf-2.0/${pkg:${gtk}:gtk_binary_version}/loaders/*.so
</binary>
<binary>
${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/
</binary>
<data>
${prefix}/share/themes/Mac/gtk-2.0-key/gtkrc
</data>
<translations name="gtk20">
${prefix}/share/locale
</translations>
<translations name="hexchat">
${prefix}/share/locale
</translations>
<data dest="${bundle}/Contents/Resources/etc/${gtkdir}/gtkrc">
${project}/gtkrc
</data>
<data dest="${bundle}/Contents/Resources">
${project}/hexchat.icns
</data>
</app-bundle>

BIN
osx/hexchat.icns Normal file

Binary file not shown.

174
osx/launcher.sh Executable file
View File

@ -0,0 +1,174 @@
#!/bin/sh
if test "x$GTK_DEBUG_LAUNCHER" != x; then
set -x
fi
if test "x$GTK_DEBUG_GDB" != x; then
EXEC="gdb --args"
else
EXEC=exec
fi
name=`basename "$0"`
tmp="$0"
tmp=`dirname "$tmp"`
tmp=`dirname "$tmp"`
bundle=`dirname "$tmp"`
bundle_contents="$bundle"/Contents
bundle_res="$bundle_contents"/Resources
bundle_lib="$bundle_res"/lib
bundle_bin="$bundle_res"/bin
bundle_data="$bundle_res"/share
bundle_etc="$bundle_res"/etc
export PREFIX="$bundle_res"
export DYLD_LIBRARY_PATH="$bundle_lib"
export XDG_CONFIG_DIRS="$bundle_etc"/xdg
export XDG_DATA_DIRS="$bundle_data"
export GTK_DATA_PREFIX="$bundle_res"
export GTK_EXE_PREFIX="$bundle_res"
export GTK_PATH="$bundle_res"
export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders"
export PANGO_LIBDIR="$bundle_lib"
export PANGO_SYSCONFDIR="$bundle_etc"
export OPENSSL_CONF="/System/Library/OpenSSL/openssl.cnf"
export HEXCHAT_LIBDIR="$bundle_lib/hexchat/plugins"
APP=name
I18NDIR="$bundle_data/locale"
# Set the locale-related variables appropriately:
unset LANG LC_MESSAGES LC_MONETARY LC_COLLATE
# Has a language ordering been set?
# If so, set LC_MESSAGES and LANG accordingly; otherwise skip it.
# First step uses sed to clean off the quotes and commas, to change - to _, and change the names for the chinese scripts from "Hans" to CN and "Hant" to TW.
APPLELANGUAGES=`defaults read .GlobalPreferences AppleLanguages | sed -En -e 's/\-/_/' -e 's/Hant/TW/' -e 's/Hans/CN/' -e 's/[[:space:]]*\"?([[:alnum:]_]+)\"?,?/\1/p' `
if test "$APPLELANGUAGES"; then
# A language ordering exists.
# Test, item per item, to see whether there is an corresponding locale.
for L in $APPLELANGUAGES; do
#test for exact matches:
if test -f "$I18NDIR/${L}/LC_MESSAGES/$APP.mo"; then
export LANG=$L
break
fi
#This is a special case, because often the original strings are in US
#English and there is no translation file.
if test "x$L" == "xen_US"; then
export LANG=$L
break
fi
#OK, now test for just the first two letters:
if test -f "$I18NDIR/${L:0:2}/LC_MESSAGES/$APP.mo"; then
export LANG=${L:0:2}
break
fi
#Same thing, but checking for any english variant.
if test "x${L:0:2}" == "xen"; then
export LANG=$L
break
fi;
done
fi
unset APPLELANGUAGES L
# If we didn't get a language from the language list, try the Collation preference, in case it's the only setting that exists.
APPLECOLLATION=`defaults read .GlobalPreferences AppleCollationOrder`
if test -z ${LANG} -a -n $APPLECOLLATION; then
if test -f "$I18NDIR/${APPLECOLLATION:0:2}/LC_MESSAGES/$APP.mo"; then
export LANG=${APPLECOLLATION:0:2}
fi
fi
if test ! -z $APPLECOLLATION; then
export LC_COLLATE=$APPLECOLLATION
fi
unset APPLECOLLATION
# Continue by attempting to find the Locale preference.
APPLELOCALE=`defaults read .GlobalPreferences AppleLocale`
if test -f "$I18NDIR/${APPLELOCALE:0:5}/LC_MESSAGES/$APP.mo"; then
if test -z $LANG; then
export LANG="${APPLELOCALE:0:5}"
fi
elif test -z $LANG -a -f "$I18NDIR/${APPLELOCALE:0:2}/LC_MESSAGES/$APP.mo"; then
export LANG="${APPLELOCALE:0:2}"
fi
#Next we need to set LC_MESSAGES. If at all possilbe, we want a full
#5-character locale to avoid the "Locale not supported by C library"
#warning from Gtk -- even though Gtk will translate with a
#two-character code.
if test -n $LANG; then
#If the language code matches the applelocale, then that's the message
#locale; otherwise, if it's longer than two characters, then it's
#probably a good message locale and we'll go with it.
if test $LANG == ${APPLELOCALE:0:5} -o $LANG != ${LANG:0:2}; then
export LC_MESSAGES=$LANG
#Next try if the Applelocale is longer than 2 chars and the language
#bit matches $LANG
elif test $LANG == ${APPLELOCALE:0:2} -a $APPLELOCALE > ${APPLELOCALE:0:2}; then
export LC_MESSAGES=${APPLELOCALE:0:5}
#Fail. Get a list of the locales in $PREFIX/share/locale that match
#our two letter language code and pick the first one, special casing
#english to set en_US
elif test $LANG == "en"; then
export LC_MESSAGES="en_US"
else
LOC=`find $PREFIX/share/locale -name $LANG???`
for L in $LOC; do
export LC_MESSAGES=$L
done
fi
else
#All efforts have failed, so default to US english
export LANG="en_US"
export LC_MESSAGES="en_US"
fi
CURRENCY=`echo $APPLELOCALE | sed -En 's/.*currency=([[:alpha:]]+).*/\1/p'`
if test "x$CURRENCY" != "x"; then
#The user has set a special currency. Gtk doesn't install LC_MONETARY files, but Apple does in /usr/share/locale, so we're going to look there for a locale to set LC_CURRENCY to.
if test -f /usr/local/share/$LC_MESSAGES/LC_MONETARY; then
if test -a `cat /usr/local/share/$LC_MESSAGES/LC_MONETARY` == $CURRENCY; then
export LC_MONETARY=$LC_MESSAGES
fi
fi
if test -z "$LC_MONETARY"; then
FILES=`find /usr/share/locale -name LC_MONETARY -exec grep -H $CURRENCY {} \;`
if test -n "$FILES"; then
export LC_MONETARY=`echo $FILES | sed -En 's%/usr/share/locale/([[:alpha:]_]+)/LC_MONETARY.*%\1%p'`
fi
fi
fi
#No currency value means that the AppleLocale governs:
if test -z "$LC_MONETARY"; then
LC_MONETARY=${APPLELOCALE:0:5}
fi
#For Gtk, which only looks at LC_ALL:
export LC_ALL=$LC_MESSAGES
unset APPLELOCALE FILES LOC
if test -f "$bundle_lib/charset.alias"; then
export CHARSETALIASDIR="$bundle_lib"
fi
# Extra arguments can be added in environment.sh.
EXTRA_ARGS=
if test -f "$bundle_res/environment.sh"; then
source "$bundle_res/environment.sh"
fi
# Strip out the argument added by the OS.
if /bin/expr "x$1" : '^x-psn_' > /dev/null; then
shift 1
fi
$EXEC "$bundle_contents/MacOS/$name-bin" "$@" $EXTRA_ARGS

11
osx/makebundle.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
rm -rf HexChat.app
rm -f *.app.zip
python $HOME/.local/bin/gtk-mac-bundler hexchat.bundle
echo "Compressing bundle"
#hdiutil create -format UDBZ -srcdir HexChat.app -quiet HexChat-2.9.6.1-$(git rev-parse --short master).dmg
zip -9rXq ./HexChat-$(git describe --tags).app.zip ./HexChat.app

View File

@ -1,38 +0,0 @@
# Makefile stub for creating standalone plugin distributions.
plugin_dist: pg_dist pg_dist/config.status
pgi=`cd $(srcdir)/.. && pwd`; cd pg_dist; \
$(MAKE) $(AM_MAKEFLAGS) PLUGIN_INCLUDES=-I$$pgi distcheck dist
pg_dist: pg_distdir pg_dist/configure.in pg_dist/install-sh
cd pg_dist \
&& libtoolize --copy --force --automake \
&& automake --copy --add-missing --foreign \
&& autoconf -l ../$(top_srcdir)
pg_distdir: $(DISTFILES)
test -d pg_dist || mkdir pg_dist
for dfile in $(DISTFILES); do \
test -f $$dfile && cp $$dfile pg_dist \
|| test -f $(srcdir)/$$dfile && cp $(srcdir)/$$dfile pg_dist; done
sed '/Make.plugin/d' < $(srcdir)/Makefile.am > pg_dist/Makefile.am
pg_dist/configure.in: $(srcdir)/../plugin-conf.in
rm -f pg_dist/configure.in
test -f $(srcdir)/config.stub \
&& cat $(srcdir)/config.stub > pg_dist/configure.in || true
cat $(srcdir)/../plugin-conf.in | \
sed 's%@PLUGIN_VERSION@%$(PLUGIN_VERSION)%; \
s%@PLUGIN@%$(PLUGIN)%' >> pg_dist/configure.in
pg_dist/install-sh: pg_distdir
cp $(top_srcdir)/install-sh pg_dist
pg_dist/config.status: pg_dist/configure
cd pg_dist \
&& test -f config.status && $(SHELL) ./config.status --recheck \
|| $(SHELL) ./configure --enable-maintainer-mode
DISTCLEANFILES = pg_dist/* pg_dist
#

View File

@ -1,7 +1,6 @@
# temp. solution while mailcheck & xdcc arn't in SUBDIRS
EXTRA_DIST = Make.plugin plugin-conf.in xdcc/xdcc.c xdcc/Makefile.am
# noinst_HEADERS = hexchat-plugin.h
if DO_LUA
lua = lua
endif
if DO_PYTHON
pythondir = python
@ -27,5 +26,4 @@ if DO_SYSINFO
sysinfodir = sysinfo
endif
#SUBDIRS = . $(pythondir) $(perldir) mailcheck xdcc
SUBDIRS = . $(pythondir) $(perldir) $(checksumdir) $(doatdir) $(fishlimdir) $(sysinfodir)
SUBDIRS = $(lua) $(pythondir) $(perldir) $(checksumdir) $(doatdir) $(fishlimdir) $(sysinfodir)

View File

@ -2,6 +2,7 @@ libdir = $(hexchatlibdir)
lib_LTLIBRARIES = checksum.la
checksum_la_SOURCES = checksum.c
checksum_la_LDFLAGS = -avoid-version -module
checksum_la_LIBADD =
AM_CPPFLAGS = $(COMMON_CFLAGS) -I$(srcdir)/../../src/common
checksum_la_LDFLAGS = $(PLUGIN_LDFLAGS) -module
checksum_la_LIBADD = $(GLIB_LIBS)
checksum_la_CPPFLAGS = -I$(top_srcdir)/src/common
checksum_la_CFLAGS = $(GLIB_CFLAGS)

View File

@ -20,217 +20,194 @@
* THE SOFTWARE.
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <openssl/sha.h>
#include <glib.h>
#include "config.h"
#ifdef WIN32
#ifndef snprintf
#define snprintf _snprintf
#endif
#define stat _stat64
#else
/* for INT_MAX */
#include <limits.h>
#define __USE_LARGEFILE64
#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
#endif
#include <stdlib.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
#include "hexchat-plugin.h"
#define BUFSIZE 32768
#define DEFAULT_LIMIT 256 /* default size is 256 MiB */
#define SHA256_DIGEST_LENGTH 32
#define SHA256_BUFFER_LENGTH 65
static hexchat_plugin *ph; /* plugin handle */
static char name[] = "Checksum";
static char desc[] = "Calculate checksum for DCC file transfers";
static char version[] = "3.1";
/* Use of OpenSSL SHA256 interface: http://adamlamers.com/?p=5 */
static void
sha256_hash_string (unsigned char hash[SHA256_DIGEST_LENGTH], char outputBuffer[65])
set_limit (char *size)
{
int i;
for (i = 0; i < SHA256_DIGEST_LENGTH; i++)
int limit = atoi (size);
if (limit > 0 && limit < INT_MAX)
{
sprintf (outputBuffer + (i * 2), "%02x", hash[i]);
}
outputBuffer[64] = 0;
}
#if 0
static void
sha256 (char *string, char outputBuffer[65])
{
int i;
unsigned char hash[SHA256_DIGEST_LENGTH];
SHA256_CTX sha256;
SHA256_Init (&sha256);
SHA256_Update (&sha256, string, strlen (string));
SHA256_Final (hash, &sha256);
for (i = 0; i < SHA256_DIGEST_LENGTH; i++)
{
sprintf (outputBuffer + (i * 2), "%02x", hash[i]);
}
outputBuffer[64] = 0;
}
#endif
static int
sha256_file (char *path, char outputBuffer[65])
{
int bytesRead;
unsigned char *buffer;
unsigned char hash[SHA256_DIGEST_LENGTH];
SHA256_CTX sha256;
FILE *file = fopen (path, "rb");
if (!file)
{
return -534;
}
SHA256_Init (&sha256);
buffer = malloc (BUFSIZE);
bytesRead = 0;
if (!buffer)
{
fclose (file);
return ENOMEM;
}
while ((bytesRead = fread (buffer, 1, BUFSIZE, file)))
{
SHA256_Update (&sha256, buffer, bytesRead);
}
SHA256_Final (hash, &sha256);
sha256_hash_string (hash, outputBuffer);
fclose (file);
free (buffer);
return 0;
}
static void
set_limit (char* size)
{
int buffer = atoi (size);
if (buffer > 0 && buffer < INT_MAX)
{
if (hexchat_pluginpref_set_int (ph, "limit", buffer))
{
hexchat_printf (ph, "File size limit has successfully been set to: %d MiB\n", buffer);
}
if (hexchat_pluginpref_set_int (ph, "limit", limit))
hexchat_printf (ph, "Checksum: File size limit has successfully been set to: %d MiB\n", limit);
else
{
hexchat_printf (ph, "File access error while saving!\n");
}
hexchat_printf (ph, "Checksum: File access error while saving!\n");
}
else
{
hexchat_printf (ph, "Invalid input!\n");
hexchat_printf (ph, "Checksum: Invalid input!\n");
}
}
static int
get_limit ()
get_limit (void)
{
int size = hexchat_pluginpref_get_int (ph, "limit");
if (size <= -1 || size >= INT_MAX)
{
if (size <= 0 || size >= INT_MAX)
return DEFAULT_LIMIT;
}
else
{
return size;
}
}
static void
print_limit ()
static gboolean
check_limit (GFile *file)
{
hexchat_printf (ph, "File size limit for checksums: %d MiB", get_limit ());
GFileInfo *file_info;
goffset file_size;
file_info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_SIZE, G_FILE_QUERY_INFO_NONE,
NULL, NULL);
if (!file_info)
return FALSE;
file_size = g_file_info_get_size (file_info);
g_object_unref (file_info);
if (file_size > get_limit () * 1048576ll)
return FALSE;
return TRUE;
}
static gboolean
sha256_from_stream (GFileInputStream *file_stream, char out_buf[])
{
GChecksum *checksum;
gssize bytes_read;
guint8 digest[SHA256_DIGEST_LENGTH];
gsize digest_len = sizeof(digest);
guchar buffer[BUFSIZE];
gsize i;
checksum = g_checksum_new (G_CHECKSUM_SHA256);
while ((bytes_read = g_input_stream_read (G_INPUT_STREAM (file_stream), buffer, sizeof (buffer), NULL, NULL)))
{
if (bytes_read == -1)
{
g_checksum_free (checksum);
return FALSE;
}
g_checksum_update (checksum, buffer, bytes_read);
}
g_checksum_get_digest (checksum, digest, &digest_len);
g_checksum_free (checksum);
for (i = 0; i < SHA256_DIGEST_LENGTH; i++)
{
/* out_buf will be exactly SHA256_BUFFER_LENGTH including null */
g_sprintf (out_buf + (i * 2), "%02x", digest[i]);
}
return TRUE;
}
static gboolean
sha256_from_file (char *filename, char out_buf[])
{
GFileInputStream *file_stream;
char *filename_fs;
GFile *file;
filename_fs = g_filename_from_utf8 (filename, -1, NULL, NULL, NULL);
if (!filename_fs)
{
hexchat_printf (ph, "Checksum: Invalid filename (%s)\n", filename);
return FALSE;
}
file = g_file_new_for_path (filename_fs);
g_free (filename_fs);
if (!file)
{
hexchat_printf (ph, "Checksum: Failed to open %s\n", filename);
return FALSE;
}
if (!check_limit (file))
{
hexchat_printf (ph, "Checksum: %s is larger than size limit. You can increase it with /CHECKSUM SET.\n", filename);
g_object_unref (file);
return FALSE;
}
file_stream = g_file_read (file, NULL, NULL);
if (!file_stream)
{
hexchat_printf (ph, "Checksum: Failed to read file %s\n", filename);
g_object_unref (file);
return FALSE;
}
if (!sha256_from_stream (file_stream, out_buf))
{
hexchat_printf (ph, "Checksum: Failed to generate checksum for %s\n", filename);
g_object_unref (file_stream);
g_object_unref (file);
return FALSE;
}
g_object_unref (file_stream);
g_object_unref (file);
return TRUE;
}
static int
dccrecv_cb (char *word[], void *userdata)
{
int result;
struct stat buffer; /* buffer for storing file info */
char sum[65]; /* buffer for checksum */
const char *file;
char *cfile;
const char *dcc_completed_dir;
char *filename, checksum[SHA256_BUFFER_LENGTH];
if (hexchat_get_prefs (ph, "dcc_completed_dir", &file, NULL) == 1 && file[0] != 0)
{
cfile = g_strconcat (file, G_DIR_SEPARATOR_S, word[1], NULL);
}
/* Print in the privmsg tab of the sender */
hexchat_set_context (ph, hexchat_find_context (ph, NULL, word[3]));
if (hexchat_get_prefs (ph, "dcc_completed_dir", &dcc_completed_dir, NULL) == 1 && dcc_completed_dir[0] != '\0')
filename = g_build_filename (dcc_completed_dir, word[1], NULL);
else
filename = g_strdup (word[2]);
if (sha256_from_file (filename, checksum))
{
cfile = g_strdup(word[2]);
hexchat_printf (ph, "SHA-256 checksum for %s (local): %s\n", word[1], checksum);
}
result = stat (cfile, &buffer);
if (result == 0) /* stat returns 0 on success */
{
if (buffer.st_size <= (unsigned long long) get_limit () * 1048576)
{
sha256_file (cfile, sum); /* file is the full filename even if completed dir set */
/* try to print the checksum in the privmsg tab of the sender */
hexchat_set_context (ph, hexchat_find_context (ph, NULL, word[3]));
hexchat_printf (ph, "SHA-256 checksum for %s (local): %s\n", word[1], sum);
}
else
{
hexchat_set_context (ph, hexchat_find_context (ph, NULL, word[3]));
hexchat_printf (ph, "SHA-256 checksum for %s (local): (size limit reached, no checksum calculated, you can increase it with /CHECKSUM INC)\n", word[1]);
}
}
else
{
hexchat_printf (ph, "File access error!\n");
}
g_free (cfile);
g_free (filename);
return HEXCHAT_EAT_NONE;
}
static int
dccoffer_cb (char *word[], void *userdata)
{
int result;
struct stat buffer; /* buffer for storing file info */
char sum[65]; /* buffer for checksum */
char checksum[SHA256_BUFFER_LENGTH];
result = stat (word[3], &buffer);
if (result == 0) /* stat returns 0 on success */
/* Print in the privmsg tab of the receiver */
hexchat_set_context (ph, hexchat_find_context (ph, NULL, word[3]));
if (sha256_from_file (word[3], checksum))
{
if (buffer.st_size <= (unsigned long long) get_limit () * 1048576)
{
sha256_file (word[3], sum); /* word[3] is the full filename */
hexchat_commandf (ph, "quote PRIVMSG %s :SHA-256 checksum for %s (remote): %s", word[2], word[1], sum);
}
else
{
hexchat_set_context (ph, hexchat_find_context (ph, NULL, word[3]));
hexchat_printf (ph, "quote PRIVMSG %s :SHA-256 checksum for %s (remote): (size limit reached, no checksum calculated)", word[2], word[1]);
}
}
else
{
hexchat_printf (ph, "File access error!\n");
hexchat_commandf (ph, "quote PRIVMSG %s :SHA-256 checksum for %s (remote): %s", word[2], word[1], checksum);
}
return HEXCHAT_EAT_NONE;
@ -241,7 +218,7 @@ checksum (char *word[], char *word_eol[], void *userdata)
{
if (!g_ascii_strcasecmp ("GET", word[2]))
{
print_limit ();
hexchat_printf (ph, "File size limit for checksums: %d MiB", get_limit ());
}
else if (!g_ascii_strcasecmp ("SET", word[2]))
{
@ -254,7 +231,7 @@ checksum (char *word[], char *word_eol[], void *userdata)
hexchat_printf (ph, " SET <filesize> - set the maximum file size (in MiB) to be hashed\n");
}
return HEXCHAT_EAT_NONE;
return HEXCHAT_EAT_ALL;
}
int
@ -272,7 +249,7 @@ hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **p
hexchat_pluginpref_set_int (ph, "limit", DEFAULT_LIMIT);
}
hexchat_hook_command (ph, "CHECKSUM", HEXCHAT_PRI_NORM, checksum, "Usage: /CHECKSUM GET|SET", 0);
hexchat_hook_command (ph, "CHECKSUM", HEXCHAT_PRI_NORM, checksum, "Usage: /CHECKSUM GET|SET", NULL);
hexchat_hook_print (ph, "DCC RECV Complete", HEXCHAT_PRI_NORM, dccrecv_cb, NULL);
hexchat_hook_print (ph, "DCC Offer", HEXCHAT_PRI_NORM, dccoffer_cb, NULL);

View File

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
@ -19,58 +20,19 @@
<RootNamespace>checksum</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<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>hcchecksum</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcchecksum</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
<OutDir>$(HexChatRel)plugins\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CHECKSUM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>checksum.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
@ -78,20 +40,10 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;CHECKSUM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>checksum.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
@ -104,6 +56,4 @@
<None Include="checksum.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,332 +0,0 @@
/* HexChat Win32 DNS Plugin
* Copyright (C) 2003-2004 Peter Zelezny.
* Copyright (C) 2012 Berke Viktor.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* Requires MS Visual Studio and IPV6 headers to compile (run nmake).
* Compiling with gcc (mingw) will fail due to missing gai_strerror.
*/
#define DNS_VERSION "2.4"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#define USE_IPV6
#ifdef WIN32
#ifdef USE_IPV6
#include <winsock2.h>
#include <ws2tcpip.h>
#else
#include <winsock2.h>
#endif
#include <io.h>
#else
#include <unistd.h>
#include <netdb.h>
#include <sys/socket.h>
#endif
#include "hexchat-plugin.h"
#include "thread.h"
#define HELP "Usage: DNS <nickname|hostname|numerical address>\n"
#define HEAD "\0034[DNS]\017\t"
#define PIPE_READ 0
#define PIPE_WRITE 1
#define MAX_HOSTNAME 128
static hexchat_plugin *ph;
static thread *active_thread = NULL;
static int
waitline (void *source, char *buf, int bufsize)
{
int i = 0;
int len;
while(1)
{
len = 1;
/* we can't read() here, due to glib's giowin32 */
if (ph->hexchat_read_fd (ph, source, buf + i, &len) != 0)
{
return -1;
}
if (buf[i] == '\n' || bufsize == i + 1)
{
buf[i] = 0;
return i;
}
i++;
}
}
static void *
thread_function (void *ud)
{
#ifdef USE_IPV6
struct addrinfo *ent;
struct addrinfo *cur;
struct addrinfo hints;
#else
struct hostent *ent;
#endif
thread *th = ud;
int fd = th->pipe_fd[PIPE_WRITE];
int ret;
char ipstring[MAX_HOSTNAME];
char reverse[MAX_HOSTNAME];
// int i;
active_thread = th;
#ifdef USE_IPV6
memset (&hints, 0, sizeof (hints));
hints.ai_family = PF_UNSPEC; /* support ipv6 and ipv4 */
hints.ai_flags = AI_CANONNAME;
// hints.ai_socktype = SOCK_STREAM;
ret = getaddrinfo (th->userdata, NULL, &hints, &ent);
if (ret != 0)
{
sprintf (ipstring, "1%d\n", ret); /* failed */
write (fd, ipstring, strlen (ipstring));
// Sleep (3000);
active_thread = NULL;
return 0;
}
// i = 0;
cur = ent;
while (cur)
{
/* find the numeric IP number */
ipstring[0] = 0;
getnameinfo (cur->ai_addr, cur->ai_addrlen,
ipstring, sizeof (ipstring), NULL, 0, NI_NUMERICHOST);
if (cur->ai_canonname)
{
/* force reverse lookup if canonname & ipstring are the same */
if (/*i == 0 &&*/ strcmp (cur->ai_canonname, ipstring) == 0)
goto lamecode;
}
if (cur->ai_canonname)
{
write (fd, "0", 1);
write (fd, ipstring, strlen (ipstring));
write (fd, "\n", 1);
write (fd, cur->ai_canonname, strlen (cur->ai_canonname));
} else
{
lamecode:
// ret = 1;
// if (i == 0)
{
/* reverse lookup */
reverse[0] = 0;
ret = getnameinfo (cur->ai_addr, cur->ai_addrlen,
reverse, sizeof (reverse), NULL, 0, NI_NAMEREQD);
}
write (fd, "0", 1);
write (fd, ipstring, strlen (ipstring));
write (fd, "\n", 1);
if (ret == 0)
write (fd, reverse, strlen (reverse));
}
write (fd, "\n", 1);
// i++;
cur = cur->ai_next;
}
/* tell the parent we're done */
write (fd, "2\n", 2);
freeaddrinfo (ent);
#else
ent = gethostbyname (th->userdata);
if (ent)
{
write (fd, "0", 1);
write (fd, ent->h_name, strlen (ent->h_name));
write (fd, "\n", 1);
write (fd, ent->h_name, strlen (ent->h_name));
write (fd, "\n", 1);
write (fd, "2\n", 2);
} else
{
write (fd, "10\n", 1);
}
#endif
// Sleep (3000);
active_thread = NULL; /* race condition, better than nothing */
return 0;
}
static int
dns_close_pipe (int fd)
{
close (fd);
return 0;
}
/* read messages comming from the child (through the pipe) */
static int
dns_read_cb (int fd, int flags, thread *th, void *source)
{
char buf[512];
char buf2[512];
while (waitline (source, buf, sizeof (buf)))
{
switch (buf[0])
{
case '0': /* got data to show */
waitline (source, buf2, sizeof (buf2));
if (buf2[0] == 0)
hexchat_printf(ph, HEAD"\002Numerical\002: %s\n", buf + 1);
else
hexchat_printf(ph, HEAD"\002Canonical\002: %s \002Numerical\002: %s\n", buf2, buf + 1);
return 1;
case '1': /* failed */
hexchat_printf(ph, HEAD"Lookup failed. %s\n", gai_strerrorA (atoi (buf + 1)));
case '2': /* done */
// close (th->pipe_fd[PIPE_WRITE]);
// close (th->pipe_fd[PIPE_READ]);
hexchat_hook_timer(ph, 3000, dns_close_pipe, (void *)th->pipe_fd[PIPE_WRITE]);
hexchat_hook_timer(ph, 4000, dns_close_pipe, (void *)th->pipe_fd[PIPE_READ]);
free (th->userdata); /* hostname strdup'ed */
free (th);
return 0;
}
}
return 1;
}
/* find hostname from nickname (search the userlist, current chan only) */
static char *
find_nick_host (char *nick)
{
hexchat_list *list;
char *at;
const char *host;
list = hexchat_list_get (ph, "users");
if (!list)
return NULL;
while (hexchat_list_next (ph, list))
{
if (stricmp (nick, hexchat_list_str (ph, list, "nick")) == 0)
{
host = hexchat_list_str (ph, list, "host");
if (host)
{
at = strrchr (host, '@');
if (at)
return at + 1;
}
break;
}
}
return NULL;
}
static int
dns_cmd_cb (char *word[], char *word_eol[], void *ud)
{
thread *th;
char *nickhost;
if (!word[2][0])
{
hexchat_print (ph, HELP);
return HEXCHAT_EAT_ALL;
}
th = thread_new ();
if (th)
{
nickhost = find_nick_host (word[2]);
if (nickhost)
{
hexchat_printf (ph, HEAD"Looking up %s (%s)...\n", nickhost, word[2]);
th->userdata = strdup (nickhost);
} else
{
hexchat_printf (ph, HEAD"Looking up %s...\n", word[2]);
th->userdata = strdup (word[2]);
}
if (thread_start (th, thread_function, th))
{
hexchat_hook_fd(ph, th->pipe_fd[PIPE_READ],
HEXCHAT_FD_READ | HEXCHAT_FD_EXCEPTION | HEXCHAT_FD_NOTSOCKET,
(void *)dns_read_cb, th);
}
}
return HEXCHAT_EAT_ALL;
}
int
hexchat_plugin_deinit (hexchat_plugin *plugin_handle)
{
while (active_thread) /* children will set this var to NULL soon... */
{
Sleep (1000);
}
hexchat_printf (ph, "DNS plugin unloaded\n");
return 1;
}
int
hexchat_plugin_init
(hexchat_plugin *plugin_handle, char **plugin_name,
char **plugin_desc, char **plugin_version, char *arg)
{
/* we need to save this for use with any hexchat_* functions */
ph = plugin_handle;
*plugin_name = "DNS";
*plugin_desc = "Threaded IPv4/6 DNS Command";
*plugin_version = DNS_VERSION;
hexchat_hook_command(ph, "DNS", HEXCHAT_PRI_LOW, dns_cmd_cb, HELP, 0);
hexchat_printf (ph, "DNS plugin loaded\n");
return 1; /* return 1 for success */
}

View File

@ -1,3 +0,0 @@
EXPORTS
hexchat_plugin_init
hexchat_plugin_deinit

View File

@ -1,113 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<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>
<PropertyGroup Label="Globals">
<ProjectGuid>{3786FA8C-3E76-45E3-984E-FCCFF44729C9}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>dns</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcdns</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcdns</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DNS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>dns.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;DNS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>dns.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="dns.def" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="dns.c" />
<ClCompile Include="thread.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="thread.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,34 +0,0 @@
#include <io.h>
#include <fcntl.h>
#include "thread.h"
thread *
thread_new (void)
{
thread *th;
th = calloc (1, sizeof (*th));
if (!th)
{
return NULL;
}
if (_pipe (th->pipe_fd, 4096, _O_BINARY) == -1)
{
free (th);
return NULL;
}
return th;
}
int
thread_start (thread *th, void *(*start_routine)(void *), void *arg)
{
DWORD id;
CloseHandle (CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)start_routine, arg, 0, (DWORD *)&id));
th->threadid = id;
return 1;
}

View File

@ -1,11 +0,0 @@
#include <windows.h>
typedef struct
{
DWORD threadid;
int pipe_fd[2];
void *userdata;
} thread;
thread *thread_new (void);
int thread_start (thread *th, void *(*start_routine)(void *), void *arg);

View File

@ -2,7 +2,8 @@ libdir = $(hexchatlibdir)
lib_LTLIBRARIES = doat.la
doat_la_SOURCES = doat.c
doat_la_LDFLAGS = -avoid-version -module
doat_la_LIBADD =
AM_CPPFLAGS = $(COMMON_CFLAGS) -I$(srcdir)/../../src/common
doat_la_LDFLAGS = $(PLUGIN_LDFLAGS) -module
doat_la_LIBADD = $(GLIB_LIBS)
doat_la_CPPFLAGS = -I$(top_srcdir)/src/common
doat_la_CFLAGS = $(GLIB_CFLAGS)

View File

@ -5,9 +5,12 @@
* http://sam.zoy.org/wtfpl/COPYING or http://lwsitu.com/xchat/COPYING
* for more details. */
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <glib.h>
#include "hexchat-plugin.h"
static hexchat_plugin *ph;
@ -31,7 +34,7 @@ parse_command( char *word[], char *word_eol[], void *userdata ) {
break;
}
channel = strdup( token );
channel = g_strdup( token );
delimiter = strchr( channel, '/' );
@ -40,13 +43,13 @@ parse_command( char *word[], char *word_eol[], void *userdata ) {
*delimiter = '\0';
if( strlen( delimiter + 1 ) > 0 ) {
server = strdup( delimiter + 1 );
server = g_strdup( delimiter + 1 );
}
}
/* /Network form */
if( strlen( channel ) == 0 ) {
free( channel );
g_free( channel );
channel = NULL;
}
@ -58,13 +61,8 @@ parse_command( char *word[], char *word_eol[], void *userdata ) {
}
}
if( channel != NULL ) {
free( channel );
}
if( server != NULL ) {
free( server );
}
g_free( channel );
g_free( server );
}
}
return HEXCHAT_EAT_HEXCHAT;

View File

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
@ -19,77 +20,32 @@
<RootNamespace>doat</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<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>hcdoat</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcdoat</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
<OutDir>$(HexChatRel)plugins\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..\..\src\common;$(HexChatLib);$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>doat.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..\..\src\common;$(HexChatLib);$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>doat.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
@ -100,6 +56,4 @@
<None Include="doat.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,502 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@ -1,231 +0,0 @@
/*
EasyWinampControl - A Winamp "What's playing" plugin for HexChat
Copyright (C) Yann HAMON & contributors
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <windows.h>
#include "hexchat-plugin.h"
static hexchat_plugin *ph; /* plugin handle */
static int enable = 1;
// For example, circularstrstr("winamp", "pwi", 3) would return 5 (the index of p)
int circularstrstr(char* a, char* b, int nb)
{
int equal = 1;
int length;
int pos=-1;
int i, j;
length = strlen(a);
for (i=0; i<length && pos == -1; ++i) {
equal = 1;
for (j=0; j<nb;j++) {
if (a[(i+j)%length] != b[j])
equal = 0;
}
if (equal == 1)
pos = i;
}
return pos;
}
void GetCurrentSongsName(HWND hwndWinamp, char* title, int titlesize)
{
int pos;
char *title2;
int i, j=0;
int length;
char *p;
GetWindowText(hwndWinamp, title, titlesize);
length = strlen(title);
if ((pos = circularstrstr(title, "- Winamp ***", 12)) != -1) {
// The option "scroll song title in taskbar" is on
title2 = (char*) malloc (titlesize*sizeof(char));
for (i=(pos+12)%length; i!=pos; i=(i+1)%length)
title2[j++] = title[i];
title2[j] = '\0';
p = title2;
while (p<title2+titlesize && *p != '.')
p++;
p+=2; // Delete the . and the following white space
strcpy(title, p);
free(title2);
}
else {
p = title;
while (p<title+titlesize && *p != '.')
p++;
p+=2; // Delete the . and the following white space
if (p<title+titlesize)
strncpy(title, p, titlesize-(p-title));
// Delete the trailing "- winamp"
p = title + titlesize - 1;
while (p>title && *p != '-') p--;
*p = '\0';
}
}
// Controlling winamp
static int wcmd_cb(char *word[], char *word_eol[], void *userdata)
{
// Everything's here : http://winamp.com/nsdn/winamp2x/dev/sdk/api.php
// The previous url seems dead, see http://forums.winamp.com/showthread.php?threadid=180297
HWND hwndWinamp = NULL;
if ((hwndWinamp = FindWindow("Winamp v1.x",NULL)) == NULL) {
hexchat_print(ph, "Winamp's window not found - Is winamp really running?\n");
}
else {
if (strcmp(word[1], "") == 0)
hexchat_print(ph, "Usage: wcmd [command]\n");
else if (strcmp(word[2], "next") == 0) {
hexchat_print(ph, "Loading next song...\n");
SendMessage (hwndWinamp, WM_COMMAND, 40048, 0);
}
else if (strcmp(word[2], "prev") == 0) {
hexchat_print(ph, "Loading previous song...\n");
SendMessage (hwndWinamp, WM_COMMAND, 40044, 0);
}
else if (strcmp(word[2], "play") == 0) {
hexchat_print(ph, "Playin'...\n");
SendMessage (hwndWinamp, WM_COMMAND, 40045, 0);
}
else if (strcmp(word[2], "stop") == 0) {
hexchat_print(ph, "Winamp stopped!...\n");
SendMessage (hwndWinamp, WM_COMMAND, 40047, 0);
}
else if (strcmp(word[2], "pause") == 0) {
SendMessage (hwndWinamp, WM_COMMAND, 40046, 0);
}
}
return HEXCHAT_EAT_ALL;
}
// Display current song
static int wp_cb(char *word[], char *word_eol[], void *userdata)
{
HWND hwndWinamp = NULL;
int bitrate, length, elapsed, minutes, seconds, eminutes, eseconds, samplerate, nbchannels;
char elapsedtime[7];
char totaltime[7];
char this_title[1024];
if ((hwndWinamp = FindWindow("Winamp v1.x",NULL)) == NULL)
hexchat_print(ph, "Winamp's window not found - Is winamp really running?\n");
else {
//Winamp's running
// Seems buggy when winamp2's agent is running, and winamp not (or winamp3) -> crashes HexChat.
SendMessage(hwndWinamp, WM_USER, (WPARAM)0, (LPARAM)125);
if ((samplerate = SendMessage(hwndWinamp, WM_USER, (WPARAM)0, (LPARAM)126)) == 0) {
hexchat_print(ph, "Could not get current song's samplerate... !?\n");
return HEXCHAT_EAT_ALL;
}
if ((bitrate = SendMessage(hwndWinamp, WM_USER, (WPARAM)1, (LPARAM)126)) == 0) {
hexchat_print(ph, "Could not get current song's bitrate... !?\n");
return HEXCHAT_EAT_ALL;
}
if ((nbchannels = SendMessage(hwndWinamp, WM_USER, (WPARAM)2, (LPARAM)126)) == 0) {
hexchat_print(ph, "Could not get the number of channels... !?\n");
return HEXCHAT_EAT_ALL;
}
if ((length = SendMessage(hwndWinamp, WM_USER, (WPARAM)1, (LPARAM)105)) == 0) {
// Could be buggy when streaming audio or video, returned length is unexpected;
// How to detect is Winamp is streaming, and display ??:?? in that case?
hexchat_print(ph, "Could not get current song's length... !?\n");
return HEXCHAT_EAT_ALL;
}
else {
minutes = length/60;
seconds = length%60;
if (seconds>9)
wsprintf(totaltime, "%d:%d", minutes, seconds);
else
wsprintf(totaltime, "%d:0%d", minutes, seconds);
}
if ((elapsed = SendMessage(hwndWinamp, WM_USER, (WPARAM)0, (LPARAM)105)) == 0) {
hexchat_print(ph, "Could not get current song's elapsed time... !?\n");
return HEXCHAT_EAT_ALL;
}
else {
eminutes = (elapsed/1000)/60; /* kinda stupid sounding, but e is for elapsed */
eseconds = (elapsed/1000)%60;
if (eseconds>9)
wsprintf(elapsedtime, "%d:%d", eminutes, eseconds);
else
wsprintf(elapsedtime, "%d:0%d", eminutes, eseconds);
}
if ((bitrate = SendMessage(hwndWinamp, WM_USER, (WPARAM)1, (LPARAM)126)) == 0) {
hexchat_print(ph, "Could not get current song's bitrate... !?\n");
return HEXCHAT_EAT_ALL;
}
GetCurrentSongsName(hwndWinamp, this_title, 1024);
hexchat_commandf(ph, "dispcurrsong %d %d %d %s %s %s", samplerate, bitrate, nbchannels, elapsedtime, totaltime, this_title);
}
return HEXCHAT_EAT_ALL; /* eat this command so HexChat and other plugins can't process it */
}
int hexchat_plugin_init(hexchat_plugin *plugin_handle,
char **plugin_name,
char **plugin_desc,
char **plugin_version,
char *arg)
{
/* we need to save this for use with any hexchat_* functions */
ph = plugin_handle;
*plugin_name = "EasyWinampControl";
*plugin_desc = "Some commands to remotely control winamp";
*plugin_version = "1.2";
hexchat_hook_command(ph, "wp", HEXCHAT_PRI_NORM, wp_cb,
"Usage: wp", 0);
hexchat_hook_command(ph, "wcmd", HEXCHAT_PRI_NORM, wcmd_cb,
"Usage: wcmd [play|pause|stop|prev|next]", 0);
hexchat_print(ph, "EasyWinampControl plugin loaded\n");
return 1; /* return 1 for success */
}
int hexchat_plugin_deinit(void)
{
hexchat_print(ph, "EasyWinampControl plugin unloaded\n");
return 1;
}

View File

@ -1,18 +0,0 @@
include "..\..\src\makeinc.mak"
all: ewc.obj ewc.def
link $(LDFLAGS) $(LIBS) /dll /out:xcewc.dll /def:ewc.def ewc.obj
ewc.def:
echo EXPORTS > ewc.def
echo hexchat_plugin_init >> ewc.def
echo hexchat_plugin_deinit >> ewc.def
ewc.obj: ewc.c makefile.mak
cl $(CFLAGS) ewc.c
clean:
del *.obj
del *.dll
del *.exp
del *.lib

View File

@ -28,7 +28,7 @@
static hexchat_plugin *ph; /* plugin handle */
static char name[] = "Exec";
static char desc[] = "Execute commands inside HexChat";
static char version[] = "1.1";
static char version[] = "1.2";
static int
run_command (char *word[], char *word_eol[], void *userdata)
@ -41,6 +41,10 @@ run_command (char *word[], char *word_eol[], void *userdata)
time_t start;
double timeElapsed;
char *token;
char *context = NULL;
int announce = 0;
HANDLE readPipe;
HANDLE writePipe;
STARTUPINFO sInfo;
@ -59,9 +63,8 @@ run_command (char *word[], char *word_eol[], void *userdata)
if (!stricmp("-O", word[2]))
{
/*strcat (commandLine, word_eol[3]);*/
hexchat_printf (ph, "Printing Exec output to others is not supported yet.\n");
return HEXCHAT_EAT_HEXCHAT;
strcat (commandLine, word_eol[3]);
announce = 1;
}
else
{
@ -90,7 +93,19 @@ run_command (char *word[], char *word_eol[], void *userdata)
{
/* avoid garbage */
buffer[dwRead] = '\0';
hexchat_printf (ph, "%s", buffer);
if (announce)
{
/* Say each line seperately, TODO: improve... */
token = strtok_s (buffer, "\n", &context);
while (token != NULL)
{
hexchat_commandf (ph, "SAY %s", token);
token = strtok_s (NULL, "\n", &context);
}
}
else
hexchat_printf (ph, "%s", buffer);
}
}
else
@ -100,20 +115,25 @@ run_command (char *word[], char *word_eol[], void *userdata)
}
timeElapsed = difftime (time (0), start);
}
/* display a newline to separate things */
if (!announce)
hexchat_printf (ph, "\n");
if (timeElapsed >= 10)
{
hexchat_printf (ph, "Command took too much time to run, execution aborted.\n");
}
CloseHandle (readPipe);
CloseHandle (pInfo.hProcess);
CloseHandle (pInfo.hThread);
}
/* display a newline to separate things */
hexchat_printf (ph, "\n");
if (timeElapsed >= 10)
else
{
hexchat_printf (ph, "Command took too much time to run, execution aborted.\n");
hexchat_command (ph, "help exec");
}
CloseHandle (readPipe);
CloseHandle (pInfo.hProcess);
CloseHandle (pInfo.hThread);
return HEXCHAT_EAT_HEXCHAT;
}

View File

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
@ -19,77 +20,28 @@
<RootNamespace>exec</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<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>hcexec</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcexec</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
<OutDir>$(HexChatRel)plugins\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;EXEC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>exec.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;EXEC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>exec.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
@ -100,6 +52,4 @@
<ClCompile Include="exec.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,16 +0,0 @@
Install dependencies (on Debian/Ubuntu):
sudo apt-get install build-essential libglib2.0-dev libssl-dev
Build the plugin with:
make
Install with:
sudo make install

View File

@ -1,9 +1,10 @@
EXTRA_DIST = INSTALL LICENSE README
EXTRA_DIST = LICENSE fish.h irc.h keystore.h plugin_hexchat.h dh1080.h
libdir = $(hexchatlibdir)
lib_LTLIBRARIES = fishlim.la
fishlim_la_SOURCES = fish.c irc.c keystore.c misc.c plugin_hexchat.c
fishlim_la_LDFLAGS = -avoid-version -module
fishlim_la_LIBADD =
AM_CPPFLAGS = $(COMMON_CFLAGS) -I$(srcdir)/../../src/common
fishlim_la_SOURCES = fish.c irc.c keystore.c plugin_hexchat.c dh1080.c
fishlim_la_LDFLAGS = $(PLUGIN_LDFLAGS) -module
fishlim_la_LIBADD = $(GLIB_LIBS) $(OPENSSL_LIBS)
fishlim_la_CPPFLAGS = -I$(top_srcdir)/src/common
fishlim_la_CFLAGS = $(GLIB_CFLAGS) $(OPENSSL_CFLAGS)

View File

@ -1,5 +0,0 @@
/* stdbool.h replacement for MSVC */
#define false 0
#define true 1
#define bool _Bool
typedef int _Bool;

209
plugins/fishlim/dh1080.c Normal file
View File

@ -0,0 +1,209 @@
/* HexChat
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* For Diffie-Hellman key-exchange a 1080bit germain prime is used, the
* generator g=2 renders a field Fp from 1 to p-1. Therefore breaking it
* means to solve a discrete logarithm problem with no less than 1080bit.
*
* Base64 format is used to send the public keys over IRC.
*
* The calculated secret key is hashed with SHA-256, the result is converted
* to base64 for final use with blowfish.
*/
#include "dh1080.h"
#include <openssl/bn.h>
#include <openssl/dh.h>
#include <openssl/sha.h>
#include <string.h>
#include <glib.h>
#define DH1080_PRIME_BITS 1080
#define DH1080_PRIME_BYTES 135
#define SHA256_DIGEST_LENGTH 32
#define B64ABC "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
#define MEMZERO(x) memset(x, 0x00, (sizeof(x)/sizeof(*x)) )
/* All clients must use the same prime number to be able to keyx */
static const guchar prime1080[DH1080_PRIME_BYTES] =
{
0xFB, 0xE1, 0x02, 0x2E, 0x23, 0xD2, 0x13, 0xE8, 0xAC, 0xFA, 0x9A, 0xE8, 0xB9, 0xDF, 0xAD, 0xA3, 0xEA,
0x6B, 0x7A, 0xC7, 0xA7, 0xB7, 0xE9, 0x5A, 0xB5, 0xEB, 0x2D, 0xF8, 0x58, 0x92, 0x1F, 0xEA, 0xDE, 0x95,
0xE6, 0xAC, 0x7B, 0xE7, 0xDE, 0x6A, 0xDB, 0xAB, 0x8A, 0x78, 0x3E, 0x7A, 0xF7, 0xA7, 0xFA, 0x6A, 0x2B,
0x7B, 0xEB, 0x1E, 0x72, 0xEA, 0xE2, 0xB7, 0x2F, 0x9F, 0xA2, 0xBF, 0xB2, 0xA2, 0xEF, 0xBE, 0xFA, 0xC8,
0x68, 0xBA, 0xDB, 0x3E, 0x82, 0x8F, 0xA8, 0xBA, 0xDF, 0xAD, 0xA3, 0xE4, 0xCC, 0x1B, 0xE7, 0xE8, 0xAF,
0xE8, 0x5E, 0x96, 0x98, 0xA7, 0x83, 0xEB, 0x68, 0xFA, 0x07, 0xA7, 0x7A, 0xB6, 0xAD, 0x7B, 0xEB, 0x61,
0x8A, 0xCF, 0x9C, 0xA2, 0x89, 0x7E, 0xB2, 0x8A, 0x61, 0x89, 0xEF, 0xA0, 0x7A, 0xB9, 0x9A, 0x8A, 0x7F,
0xA9, 0xAE, 0x29, 0x9E, 0xFA, 0x7B, 0xA6, 0x6D, 0xEA, 0xFE, 0xFB, 0xEF, 0xBF, 0x0B, 0x7D, 0x8B
};
static DH *g_dh;
int
dh1080_init (void)
{
g_return_val_if_fail (g_dh == NULL, 0);
if ((g_dh = DH_new()))
{
int codes;
g_dh->p = BN_bin2bn (prime1080, DH1080_PRIME_BYTES, NULL);
g_dh->g = BN_new ();
g_assert (g_dh->p != NULL && g_dh->g != NULL);
BN_set_word(g_dh->g, 2);
if (DH_check (g_dh, &codes))
return codes == 0;
}
return 0;
}
void
dh1080_deinit (void)
{
g_clear_pointer (&g_dh, DH_free);
}
static inline int
DH_verifyPubKey (BIGNUM *pk)
{
int codes;
return DH_check_pub_key (g_dh, pk, &codes) && codes == 0;
}
static guchar *
dh1080_decode_b64 (const char *data, gsize *out_len)
{
GString *str = g_string_new (data);
guchar *ret;
if (str->len % 4 == 1 && str->str[str->len - 1] == 'A')
g_string_truncate (str, str->len - 1);
while (str->len % 4 != 0)
g_string_append_c (str, '=');
ret = g_base64_decode_inplace (str->str, out_len);
g_string_free (str, FALSE);
return ret;
}
static char *
dh1080_encode_b64 (const guchar *data, gsize data_len)
{
char *ret = g_base64_encode (data, data_len);
char *p;
if (!(p = strchr (ret, '=')))
{
char *new_ret = g_new(char, strlen(ret) + 2);
strcpy (new_ret, ret);
strcat (new_ret, "A");
g_free (ret);
ret = new_ret;
}
else
{
*p = '\0';
}
return ret;
}
int
dh1080_generate_key (char **priv_key, char **pub_key)
{
guchar buf[DH1080_PRIME_BYTES];
int len;
DH *dh;
g_assert (priv_key != NULL);
g_assert (pub_key != NULL);
dh = DHparams_dup (g_dh);
if (!dh)
return 0;
if (!DH_generate_key (dh))
{
DH_free (dh);
return 0;
}
MEMZERO (buf);
len = BN_bn2bin (dh->priv_key, buf);
*priv_key = dh1080_encode_b64 (buf, len);
MEMZERO (buf);
len = BN_bn2bin(dh->pub_key, buf);
*pub_key = dh1080_encode_b64 (buf, len);
OPENSSL_cleanse (buf, sizeof (buf));
DH_free (dh);
return 1;
}
int
dh1080_compute_key (const char *priv_key, const char *pub_key, char **secret_key)
{
char *pub_key_data;
gsize pub_key_len;
BIGNUM *pk;
DH *dh;
g_assert (secret_key != NULL);
/* Verify base64 strings */
if (strspn (priv_key, B64ABC) != strlen (priv_key)
|| strspn (pub_key, B64ABC) != strlen (pub_key))
return 0;
dh = DHparams_dup (g_dh);
pub_key_data = dh1080_decode_b64 (pub_key, &pub_key_len);
pk = BN_bin2bn (pub_key_data, pub_key_len, NULL);
if (DH_verifyPubKey (pk))
{
guchar shared_key[DH1080_PRIME_BYTES] = { 0 };
guchar sha256[SHA256_DIGEST_LENGTH] = { 0 };
char *priv_key_data;
gsize priv_key_len;
int shared_len;
priv_key_data = dh1080_decode_b64 (priv_key, &priv_key_len);
dh->priv_key = BN_bin2bn(priv_key_data, priv_key_len, NULL);
shared_len = DH_compute_key (shared_key, pk, dh);
SHA256(shared_key, shared_len, sha256);
*secret_key = dh1080_encode_b64 (sha256, sizeof(sha256));
OPENSSL_cleanse (priv_key_data, priv_key_len);
g_free (priv_key_data);
}
BN_free (pk);
DH_free (dh);
g_free (pub_key_data);
return 1;
}

24
plugins/fishlim/dh1080.h Normal file
View File

@ -0,0 +1,24 @@
/* HexChat
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma once
int dh1080_generate_key (char **, char **);
int dh1080_compute_key (const char *, const char *, char **);
int dh1080_init (void);
void dh1080_deinit (void);

View File

@ -22,6 +22,11 @@
*/
#ifdef __APPLE__
#define __AVAILABILITYMACROS__
#define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
#endif
#include <stdlib.h>
#include <string.h>
#include <openssl/blowfish.h>
@ -34,17 +39,17 @@ static const char fish_base64[64] = "./0123456789abcdefghijklmnopqrstuvwxyzABCDE
static const signed char fish_unbase64[256] = {
IB,IB,IB,IB,IB,IB,IB,IB, IB,IB,IB,IB,IB,IB,IB,IB,
IB,IB,IB,IB,IB,IB,IB,IB, IB,IB,IB,IB,IB,IB,IB,IB,
// ! " # $ % & ' ( ) * + , - . /
/* ! " # $ % & ' ( ) * + , - . / */
IB,IB,IB,IB,IB,IB,IB,IB, IB,IB,IB,IB,IB,IB, 0, 1,
// 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
/* 0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
2, 3, 4, 5, 6, 7, 8, 9, 10,11,IB,IB,IB,IB,IB,IB,
// @ A B C D E F G H I J K L M N O
/* @ A B C D E F G H I J K L M N O */
IB,38,39,40,41,42,43,44, 45,46,47,48,49,50,51,52,
// P Q R S T U V W X Y Z [ \ ] ^ _
/* P Q R S T U V W X Y Z [ \ ] ^ _*/
53,54,55,56,57,58,59,60, 61,62,63,IB,IB,IB,IB,IB,
// ` a b c d e f g h i j k l m n o
/* ` a b c d e f g h i j k l m n o */
IB,12,13,14,15,16,17,18, 19,20,21,22,23,24,25,26,
// p q r s t u v w x y z { | } ~ <del>
/* p q r s t u v w x y z { | } ~ <del> */
27,28,29,30,31,32,33,34, 35,36,37,IB,IB,IB,IB,IB,
};
@ -70,12 +75,11 @@ char *fish_encrypt(const char *key, size_t keylen, const char *message) {
messagelen = strlen(message);
if (messagelen == 0) return NULL;
encrypted = malloc(((messagelen-1)/8)*12 + 12 + 1); // each 8-byte block becomes 12 bytes
encrypted = g_malloc(((messagelen - 1) / 8) * 12 + 12 + 1); /* each 8-byte block becomes 12 bytes */
end = encrypted;
if (!encrypted) return NULL;
while (*message) {
// Read 8 bytes (a Blowfish block)
/* Read 8 bytes (a Blowfish block) */
BF_LONG binary[2] = { 0, 0 };
unsigned char c;
for (i = 0; i < 8; i++) {
@ -85,10 +89,10 @@ char *fish_encrypt(const char *key, size_t keylen, const char *message) {
}
message += 8;
// Encrypt block
/* Encrypt block */
BF_encrypt(binary, &bfkey);
// Emit FiSH-BASE64
/* Emit FiSH-BASE64 */
bit = 0;
word = 1;
for (j = 0; j < 12; j++) {
@ -101,7 +105,7 @@ char *fish_encrypt(const char *key, size_t keylen, const char *message) {
}
}
// Stop if a null terminator was found
/* Stop if a null terminator was found */
if (c == '\0') break;
}
*end = '\0';
@ -119,19 +123,18 @@ char *fish_decrypt(const char *key, size_t keylen, const char *data) {
unsigned char d;
BF_set_key(&bfkey, keylen, (const unsigned char*)key);
decrypted = malloc(strlen(data)+1);
decrypted = g_malloc(strlen(data) + 1);
end = decrypted;
if (!decrypted) return NULL;
while (*data) {
// Convert from FiSH-BASE64
/* Convert from FiSH-BASE64 */
BF_LONG binary[2] = { 0, 0 };
bit = 0;
word = 1;
for (i = 0; i < 12; i++) {
d = fish_unbase64[(const unsigned char)*(data++)];
if (d == IB) goto decrypt_end;
binary[word] |= d << bit;
binary[word] |= (unsigned long)d << bit;
bit += 6;
if (i == 5) {
bit = 0;
@ -139,10 +142,10 @@ char *fish_decrypt(const char *key, size_t keylen, const char *data) {
}
}
// Decrypt block
/* Decrypt block */
BF_decrypt(binary, &bfkey);
// Copy to buffer
/* Copy to buffer */
GET_BYTES(end, binary[0]);
GET_BYTES(end, binary[1]);
}
@ -160,14 +163,14 @@ char *fish_encrypt_for_nick(const char *nick, const char *data) {
char *key;
char *encrypted;
// Look for key
/* Look for key */
key = keystore_get_key(nick);
if (!key) return NULL;
// Encrypt
/* Encrypt */
encrypted = fish_encrypt(key, strlen(key), data);
free(key);
g_free(key);
return encrypted;
}
@ -178,14 +181,14 @@ char *fish_encrypt_for_nick(const char *nick, const char *data) {
char *fish_decrypt_from_nick(const char *nick, const char *data) {
char *key;
char *decrypted;
// Look for key
/* Look for key */
key = keystore_get_key(nick);
if (!key) return NULL;
// Decrypt
/* Decrypt */
decrypted = fish_decrypt(key, strlen(key), data);
free(key);
g_free(key);
return decrypted;
}

View File

@ -25,13 +25,10 @@
#ifndef FISH_H
#define FISH_H
#ifdef _MSC_VER
#include "bool.h"
#else
#include <stdbool.h>
#endif
#include <stddef.h>
#include <glib.h>
char *fish_encrypt(const char *key, size_t keylen, const char *message);
char *fish_decrypt(const char *key, size_t keylen, const char *data);
char *fish_encrypt_for_nick(const char *nick, const char *data);

View File

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
@ -19,58 +20,19 @@
<RootNamespace>fishlim</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<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>hcfishlim</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcfishlim</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
<OutDir>$(HexChatRel)plugins\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>fishlim.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
@ -78,20 +40,10 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>fishlim.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
@ -101,21 +53,18 @@
<None Include="fishlim.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="bool.h" />
<ClInclude Include="dh1080.h" />
<ClInclude Include="fish.h" />
<ClInclude Include="irc.h" />
<ClInclude Include="keystore.h" />
<ClInclude Include="misc.h" />
<ClInclude Include="plugin_hexchat.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="dh1080.c" />
<ClCompile Include="fish.c" />
<ClCompile Include="irc.c" />
<ClCompile Include="keystore.c" />
<ClCompile Include="misc.c" />
<ClCompile Include="plugin_hexchat.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -32,9 +32,6 @@
<ClInclude Include="keystore.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="misc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="plugin_hexchat.h">
<Filter>Header Files</Filter>
</ClInclude>
@ -49,9 +46,6 @@
<ClCompile Include="keystore.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="misc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="plugin_hexchat.c">
<Filter>Source Files</Filter>
</ClCompile>

View File

@ -22,8 +22,9 @@
*/
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include <glib.h>
#include "irc.h"
/**
@ -31,26 +32,28 @@
* at spaces. The prefix and command is extracted from the message, and
* parameters_offset is set to the index of the first parameter.
*/
bool irc_parse_message(const char *words[],
gboolean irc_parse_message(const char *words[],
const char **prefix, const char **command,
size_t *parameters_offset) {
size_t w = 1;
if (prefix) *prefix = NULL;
if (command) *command = NULL;
// See if the message starts with a prefix (sender user)
/* See if the message starts with a prefix (sender user) */
if (words[w][0] == ':') {
if (prefix) *prefix = &words[w][1];
w++;
}
// Check command
if (words[w][0] == '\0') return false;
/* Check command */
if (words[w][0] == '\0') return FALSE;
if (command) *command = words[w];
w++;
*parameters_offset = w;
return true;
if (parameters_offset)
*parameters_offset = w;
return TRUE;
}
@ -65,48 +68,15 @@ bool irc_parse_message(const char *words[],
*/
char *irc_prefix_get_nick(const char *prefix) {
const char *end;
char *nick;
size_t length;
if (!prefix) return NULL;
// Find end of nick
/* Find end of nick */
end = prefix;
while (*end != '\0' && *end != '!' && *end != '@') end++;
// Allocate string
/* Allocate string */
length = end - prefix;
nick = malloc(length+1);
if (!nick) return NULL;
// Copy to string
memcpy(nick, prefix, length);
nick[length] = '\0';
return nick;
return g_strndup (prefix, length);
}
/**
* Compares two nick names. Return 0 if equal. Otherwise the return value is
* less than zero if a is less than b or greater than zero if a is greater
* than b.
*/
int irc_nick_cmp(const char *a, const char *b) {
char ac;
char bc;
char diff;
for (;;) {
ac = *(a++);
bc = *(b++);
// Change into IRC uppercase (see RFC 2812 section 2.2)
if (ac >= 'a' && ac <= '~') ac &= ~0x20;
if (bc >= 'a' && bc <= '~') bc &= ~0x20;
diff = ac - bc;
if (diff) return diff;
if (!ac) return 0;
}
}

View File

@ -25,18 +25,13 @@
#ifndef IRC_H
#define IRC_H
#ifdef _MSC_VER
#include "bool.h"
#else
#include <stdbool.h>
#endif
#include <stddef.h>
#include <glib.h>
bool irc_parse_message(const char *words[],
gboolean irc_parse_message(const char *words[],
const char **prefix, const char **command,
size_t *parameters_offset);
char *irc_prefix_get_nick(const char *prefix);
int irc_nick_cmp(const char *a, const char *b);
#endif

View File

@ -22,12 +22,13 @@
*/
#include "config.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include "irc.h"
#include "fish.h"
#include "misc.h"
#include "keystore.h"
#include "plugin_hexchat.h"
@ -38,7 +39,7 @@ static char *keystore_password = NULL;
/**
* Opens the key store file: ~/.config/hexchat/addon_fishlim.conf
*/
static GKeyFile *getConfigFile() {
static GKeyFile *getConfigFile(void) {
gchar *filename = get_config_filename();
GKeyFile *keyfile = g_key_file_new();
@ -54,14 +55,30 @@ static GKeyFile *getConfigFile() {
/**
* Returns the key store password, or the default.
*/
static const char *get_keystore_password() {
static const char *get_keystore_password(void) {
return (keystore_password != NULL ?
keystore_password :
// Silly default value...
/* Silly default value... */
"blowinikey");
}
static char *escape_nickname(const char *nick) {
char *escaped = g_strdup(nick);
char *p = escaped;
while (*p) {
if (*p == '[')
*p = '~';
else if (*p == ']')
*p = '!';
++p;
}
return escaped;
}
/**
* Gets a value for a nick/channel from addon_fishlim.conf. Unlike
* g_key_file_get_string, this function is case insensitive.
@ -87,17 +104,21 @@ static gchar *get_nick_value(GKeyFile *keyfile, const char *nick, const char *it
* Extracts a key from the key store file.
*/
char *keystore_get_key(const char *nick) {
// Get the key
/* Get the key */
GKeyFile *keyfile = getConfigFile();
gchar *value = get_nick_value(keyfile, nick, "key");
char *escaped_nick = escape_nickname(nick);
gchar *value = get_nick_value(keyfile, escaped_nick, "key");
g_key_file_free(keyfile);
if (!value) return NULL;
g_free(escaped_nick);
if (!value)
return NULL;
if (strncmp(value, "+OK ", 4) != 0) {
// Key is stored in plaintext
return import_glib_string(value);
/* Key is stored in plaintext */
return value;
} else {
// Key is encrypted
/* Key is encrypted */
const char *encrypted = value+4;
const char *password = get_keystore_password();
char *decrypted = fish_decrypt(password, strlen(password), encrypted);
@ -109,10 +130,10 @@ char *keystore_get_key(const char *nick) {
/**
* Deletes a nick and the associated key in the key store file.
*/
static bool delete_nick(GKeyFile *keyfile, const char *nick) {
static gboolean delete_nick(GKeyFile *keyfile, const char *nick) {
gchar **group;
gchar **groups = g_key_file_get_groups(keyfile, NULL);
bool ok = false;
gboolean ok = FALSE;
for (group = groups; *group != NULL; group++) {
if (!irc_nick_cmp(*group, nick)) {
@ -125,85 +146,100 @@ static bool delete_nick(GKeyFile *keyfile, const char *nick) {
return ok;
}
#if !GLIB_CHECK_VERSION(2,40,0)
/**
* Writes the key store file to disk.
*/
static bool save_keystore(GKeyFile *keyfile) {
char *filename;
bool ok;
// Serialize
static gboolean keyfile_save_to_file (GKeyFile *keyfile, char *filename) {
gboolean ok;
/* Serialize */
gsize file_length;
gchar *file_data = g_key_file_to_data(keyfile, &file_length, NULL);
if (!file_data) return false;
if (!file_data)
return FALSE;
// Write to file
filename = get_config_filename();
ok = g_file_set_contents(filename, file_data, file_length, NULL);
g_free(filename);
/* Write to file */
ok = g_file_set_contents (filename, file_data, file_length, NULL);
g_free(file_data);
return ok;
}
#endif
/**
* Writes the key store file to disk.
*/
static gboolean save_keystore(GKeyFile *keyfile) {
char *filename;
gboolean ok;
filename = get_config_filename();
#if !GLIB_CHECK_VERSION(2,40,0)
ok = keyfile_save_to_file (keyfile, filename);
#else
ok = g_key_file_save_to_file (keyfile, filename, NULL);
#endif
g_free (filename);
return ok;
}
/**
* Sets a key in the key store file.
*/
bool keystore_store_key(const char *nick, const char *key) {
gboolean keystore_store_key(const char *nick, const char *key) {
const char *password;
char *encrypted;
char *wrapped;
bool ok = false;
gboolean ok = FALSE;
GKeyFile *keyfile = getConfigFile();
char *escaped_nick = escape_nickname(nick);
// Remove old key
delete_nick(keyfile, nick);
/* Remove old key */
delete_nick(keyfile, escaped_nick);
// Add new key
/* Add new key */
password = get_keystore_password();
if (password) {
// Encrypt the password
/* Encrypt the password */
encrypted = fish_encrypt(password, strlen(password), key);
if (!encrypted) goto end;
// Prepend "+OK "
/* Prepend "+OK " */
wrapped = g_strconcat("+OK ", encrypted, NULL);
g_free(encrypted);
// Store encrypted in file
g_key_file_set_string(keyfile, nick, "key", wrapped);
free(wrapped);
/* Store encrypted in file */
g_key_file_set_string(keyfile, escaped_nick, "key", wrapped);
g_free(wrapped);
} else {
// Store unencrypted in file
g_key_file_set_string(keyfile, nick, "key", key);
/* Store unencrypted in file */
g_key_file_set_string(keyfile, escaped_nick, "key", key);
}
// Save key store file
/* Save key store file */
ok = save_keystore(keyfile);
end:
g_key_file_free(keyfile);
g_free(escaped_nick);
return ok;
}
/**
* Deletes a nick from the key store.
*/
bool keystore_delete_nick(const char *nick) {
gboolean keystore_delete_nick(const char *nick) {
GKeyFile *keyfile = getConfigFile();
char *escaped_nick = escape_nickname(nick);
// Delete entry
bool ok = delete_nick(keyfile, nick);
/* Delete entry */
gboolean ok = delete_nick(keyfile, escaped_nick);
// Save
/* Save */
if (ok) save_keystore(keyfile);
g_key_file_free(keyfile);
g_free(escaped_nick);
return ok;
}
void keystore_secure_free(void *ptr, size_t size) {
secure_erase(ptr, size);
free(ptr);
}

View File

@ -25,18 +25,13 @@
#ifndef KEYSTORE_H
#define KEYSTORE_H
#ifdef _MSC_VER
#include "bool.h"
#else
#include <stdbool.h>
#endif
#include <stddef.h>
char *keystore_get_key(const char *nick);
bool keystore_store_key(const char *nick, const char *key);
bool keystore_delete_nick(const char *nick);
#include <glib.h>
void keystore_secure_free(void *ptr, size_t size);
char *keystore_get_key(const char *nick);
gboolean keystore_store_key(const char *nick, const char *key);
gboolean keystore_delete_nick(const char *nick);
#endif

View File

@ -1,54 +0,0 @@
/*
Copyright (c) 2010 Samuel Lidén Borell <samuel@kodafritt.se>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include "misc.h"
void secure_erase(void *ptr, size_t size) {
// "volatile" prevents this code from being optimized away
volatile char* volptr = ptr;
while (size--) *volptr++ = 0;
}
/**
* Re-allocates a string with the native allocator.
*/
char *import_glib_string(gchar *gstr) {
size_t size;
char *native;
if (g_mem_is_system_malloc()) return gstr;
size = strlen(gstr)+1;
native = malloc(size);
memcpy(native, gstr, size);
secure_erase(gstr, size);
g_free(gstr);
return native;
}

View File

@ -1,36 +0,0 @@
/*
Copyright (c) 2010 Samuel Lidén Borell <samuel@kodafritt.se>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#ifndef MISC_H
#define MISC_H
void secure_erase(void *ptr, size_t size);
#ifdef __G_LIB_H__
char *import_glib_string(gchar *gstr);
#endif
#endif

View File

@ -1,6 +1,7 @@
/*
Copyright (c) 2010-2011 Samuel Lidén Borell <samuel@kodafritt.se>
Copyright (c) 2015 <the.cypher@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -22,56 +23,84 @@
*/
#include "config.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
// #pragma GCC visibility push(default)
#include "hexchat-plugin.h"
#define HEXCHAT_MAX_WORDS 32
// #pragma GCC visibility pop
//#define EXPORT __attribute((visibility("default")))
//#define EXPORT
#include "fish.h"
#include "dh1080.h"
#include "keystore.h"
#include "irc.h"
static const char plugin_name[] = "FiSHLiM";
static const char plugin_desc[] = "Encryption plugin for the FiSH protocol. Less is More!";
static const char plugin_version[] = "0.0.16";
static const char plugin_version[] = "0.1.0";
static const char usage_setkey[] = "Usage: SETKEY [<nick or #channel>] <password>, sets the key for a channel or nick";
static const char usage_delkey[] = "Usage: DELKEY <nick or #channel>, deletes the key for a channel or nick";
static const char usage_keyx[] = "Usage: KEYX [<nick>], performs DH1080 key-exchange with <nick>";
static const char usage_topic[] = "Usage: TOPIC+ <topic>, sets a new encrypted topic for the current channel";
static const char usage_notice[] = "Usage: NOTICE+ <nick or #channel> <notice>";
static const char usage_msg[] = "Usage: MSG+ <nick or #channel> <message>";
static hexchat_plugin *ph;
static GHashTable *pending_exchanges;
/**
* Returns the path to the key store file.
*/
gchar *get_config_filename() {
return g_build_filename(hexchat_get_info(ph, "configdir"), "addon_fishlim.conf", NULL);
gchar *get_config_filename(void) {
char *filename_fs, *filename_utf8;
filename_utf8 = g_build_filename(hexchat_get_info(ph, "configdir"), "addon_fishlim.conf", NULL);
filename_fs = g_filename_from_utf8 (filename_utf8, -1, NULL, NULL, NULL);
g_free (filename_utf8);
return filename_fs;
}
/**
* Appends data to a string. Returns true if there was sufficient memory.
* Frees *s and returns false if an error occurs.
*/
static bool append(char **s, size_t *length, const char *data) {
size_t datalen = strlen(data);
char *extended = realloc(*s, *length + datalen + 1);
if (!extended) {
free(*s);
return false;
}
memcpy(extended + *length, data, datalen + 1);
*s = extended;
*length += datalen;
return true;
static inline gboolean irc_is_query (const char *name) {
const char *chantypes = hexchat_list_str (ph, NULL, "chantypes");
return strchr (chantypes, name[0]) == NULL;
}
static hexchat_context *find_context_on_network (const char *name) {
hexchat_list *channels;
hexchat_context *ret = NULL;
int id;
if (hexchat_get_prefs(ph, "id", NULL, &id) != 2)
return NULL;
channels = hexchat_list_get(ph, "channels");
if (!channels)
return NULL;
while (hexchat_list_next(ph, channels)) {
int chan_id = hexchat_list_int(ph, channels, "id");
const char *chan_name = hexchat_list_str(ph, channels, "channel");
if (chan_id == id && chan_name && hexchat_nickcmp (ph, chan_name, name) == 0) {
ret = (hexchat_context*)hexchat_list_str(ph, channels, "context");
break;
}
};
hexchat_list_free(ph, channels);
return ret;
}
int irc_nick_cmp(const char *a, const char *b) {
return hexchat_nickcmp (ph, a, b);
}
/*static int handle_debug(char *word[], char *word_eol[], void *userdata) {
hexchat_printf(ph, "debug incoming: ");
@ -87,26 +116,26 @@ static bool append(char **s, size_t *length, const char *data) {
*/
static int handle_outgoing(char *word[], char *word_eol[], void *userdata) {
const char *own_nick;
// Encrypt the message if possible
/* Encrypt the message if possible */
const char *channel = hexchat_get_info(ph, "channel");
char *encrypted = fish_encrypt_for_nick(channel, word_eol[1]);
if (!encrypted) return HEXCHAT_EAT_NONE;
// Display message
/* Display message */
own_nick = hexchat_get_info(ph, "nick");
hexchat_emit_print(ph, "Your Message", own_nick, word_eol[1], NULL);
// Send message
/* Send message */
hexchat_commandf(ph, "PRIVMSG %s :+OK %s", channel, encrypted);
free(encrypted);
g_free(encrypted);
return HEXCHAT_EAT_HEXCHAT;
}
/**
* Called when a channel message or private message is received.
*/
static int handle_incoming(char *word[], char *word_eol[], void *userdata) {
static int handle_incoming(char *word[], char *word_eol[], hexchat_event_attrs *attrs, void *userdata) {
const char *prefix;
const char *command;
const char *recipient;
@ -114,78 +143,171 @@ static int handle_incoming(char *word[], char *word_eol[], void *userdata) {
const char *peice;
char *sender_nick;
char *decrypted;
char *message;
size_t w;
size_t ew;
size_t uw;
size_t length;
char prefix_char = 0;
GString *message;
if (!irc_parse_message((const char **)word, &prefix, &command, &w))
return HEXCHAT_EAT_NONE;
// Topic (command 332) has an extra parameter
/* Topic (command 332) has an extra parameter */
if (!strcmp(command, "332")) w++;
// Look for encrypted data
/* Look for encrypted data */
for (ew = w+1; ew < HEXCHAT_MAX_WORDS-1; ew++) {
const char *s = (ew == w+1 ? word[ew]+1 : word[ew]);
if (*s && (s[1] == '+' || s[1] == 'm')) { prefix_char = *(s++); }
else { prefix_char = 0; }
if (strcmp(s, "+OK") == 0 || strcmp(s, "mcps") == 0) goto has_encrypted_data;
}
return HEXCHAT_EAT_NONE;
has_encrypted_data: ;
// Extract sender nick and recipient nick/channel
/* Extract sender nick and recipient nick/channel */
sender_nick = irc_prefix_get_nick(prefix);
recipient = word[w];
// Try to decrypt with these (the keys are searched for in the key store)
/* Try to decrypt with these (the keys are searched for in the key store) */
encrypted = word[ew+1];
decrypted = fish_decrypt_from_nick(recipient, encrypted);
if (!decrypted) decrypted = fish_decrypt_from_nick(sender_nick, encrypted);
// Check for error
/* Check for error */
if (!decrypted) goto decrypt_error;
// Build unecrypted message
message = NULL;
length = 0;
if (!append(&message, &length, "RECV")) goto decrypt_error;
/* Build unecrypted message */
message = g_string_sized_new (100); /* TODO: more accurate estimation of size */
g_string_append (message, "RECV");
if (attrs->server_time_utc)
{
GTimeVal tv = { (glong)attrs->server_time_utc, 0 };
char *timestamp = g_time_val_to_iso8601 (&tv);
g_string_append (message, " @time=");
g_string_append (message, timestamp);
g_free (timestamp);
}
for (uw = 1; uw < HEXCHAT_MAX_WORDS; uw++) {
if (word[uw][0] != '\0' && !append(&message, &length, " ")) goto decrypt_error;
if (word[uw][0] != '\0')
g_string_append_c (message, ' ');
if (uw == ew) {
// Add the encrypted data
/* Add the encrypted data */
peice = decrypted;
uw++; // Skip "OK+"
uw++; /* Skip "OK+" */
if (ew == w+1) {
// Prefix with colon, which gets stripped out otherwise
if (!append(&message, &length, ":")) goto decrypt_error;
/* Prefix with colon, which gets stripped out otherwise */
g_string_append_c (message, ':');
}
if (prefix_char) {
g_string_append_c (message, prefix_char);
}
} else {
// Add unencrypted data (for example, a prefix from a bouncer or bot)
/* Add unencrypted data (for example, a prefix from a bouncer or bot) */
peice = word[uw];
}
if (!append(&message, &length, peice)) goto decrypt_error;
g_string_append (message, peice);
}
free(decrypted);
g_free(decrypted);
// Simulate unencrypted message
//hexchat_printf(ph, "simulating: %s\n", message);
hexchat_command(ph, message);
/* Simulate unencrypted message */
/* hexchat_printf(ph, "simulating: %s\n", message->str); */
hexchat_command(ph, message->str);
free(message);
free(sender_nick);
g_string_free (message, TRUE);
g_free(sender_nick);
return HEXCHAT_EAT_HEXCHAT;
decrypt_error:
free(decrypted);
free(sender_nick);
g_free(decrypted);
g_free(sender_nick);
return HEXCHAT_EAT_NONE;
}
static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
const char *dh_message = word[4];
const char *dh_pubkey = word[5];
hexchat_context *query_ctx;
const char *prefix;
gboolean cbc;
char *sender, *secret_key, *priv_key = NULL;
if (!*dh_message || !*dh_pubkey || strlen(dh_pubkey) != 181)
return HEXCHAT_EAT_NONE;
if (!irc_parse_message((const char**)word, &prefix, NULL, NULL) || !prefix)
return HEXCHAT_EAT_NONE;
sender = irc_prefix_get_nick(prefix);
query_ctx = find_context_on_network(sender);
if (query_ctx)
hexchat_set_context(ph, query_ctx);
dh_message++; /* : prefix */
if (*dh_message == '+' || *dh_message == '-')
dh_message++; /* identify-msg */
cbc = g_strcmp0 (word[6], "CBC") == 0;
if (!strcmp(dh_message, "DH1080_INIT")) {
char *pub_key;
if (cbc) {
hexchat_print(ph, "Recieved key exchange for CBC mode which is not supported.");
goto cleanup;
}
hexchat_printf(ph, "Received public key from %s, sending mine...", sender);
if (dh1080_generate_key(&priv_key, &pub_key)) {
hexchat_commandf(ph, "quote NOTICE %s :DH1080_FINISH %s", sender, pub_key);
g_free(pub_key);
} else {
hexchat_print(ph, "Failed to generate keys");
goto cleanup;
}
} else if (!strcmp (dh_message, "DH1080_FINISH")) {
char *sender_lower = g_ascii_strdown(sender, -1);
/* FIXME: Properly respect irc casing */
priv_key = g_hash_table_lookup(pending_exchanges, sender_lower);
g_hash_table_steal(pending_exchanges, sender_lower);
g_free(sender_lower);
if (cbc) {
hexchat_print(ph, "Recieved key exchange for CBC mode which is not supported.");
goto cleanup;
}
if (!priv_key) {
hexchat_printf(ph, "Recieved a key exchange response for unknown user: %s", sender);
goto cleanup;
}
} else {
/* Regular notice */
g_free(sender);
return HEXCHAT_EAT_NONE;
}
if (dh1080_compute_key(priv_key, dh_pubkey, &secret_key)) {
keystore_store_key(sender, secret_key);
hexchat_printf(ph, "Stored new key for %s", sender);
g_free(secret_key);
} else {
hexchat_print(ph, "Failed to create secret key!");
}
cleanup:
g_free(sender);
g_free(priv_key);
return HEXCHAT_EAT_ALL;
}
/**
* Command handler for /setkey
*/
@ -193,27 +315,27 @@ static int handle_setkey(char *word[], char *word_eol[], void *userdata) {
const char *nick;
const char *key;
// Check syntax
/* Check syntax */
if (*word[2] == '\0') {
hexchat_printf(ph, "%s\n", usage_setkey);
return HEXCHAT_EAT_HEXCHAT;
}
if (*word[3] == '\0') {
// /setkey password
/* /setkey password */
nick = hexchat_get_info(ph, "channel");
key = word_eol[2];
} else {
// /setkey #channel password
/* /setkey #channel password */
nick = word[2];
key = word_eol[3];
}
// Set password
/* Set password */
if (keystore_store_key(nick, key)) {
hexchat_printf(ph, "Stored key for %s\n", nick);
} else {
hexchat_printf(ph, "\00305Failed to store key in blow.ini\n", nick, key);
hexchat_printf(ph, "\00305Failed to store key in addon_fishlim.conf\n");
}
return HEXCHAT_EAT_HEXCHAT;
@ -225,24 +347,173 @@ static int handle_setkey(char *word[], char *word_eol[], void *userdata) {
static int handle_delkey(char *word[], char *word_eol[], void *userdata) {
const char *nick;
// Check syntax
/* Check syntax */
if (*word[2] == '\0' || *word[3] != '\0') {
hexchat_printf(ph, "%s\n", usage_delkey);
return HEXCHAT_EAT_HEXCHAT;
}
nick = word_eol[2];
nick = g_strstrip (word_eol[2]);
// Delete the given nick from the key store
/* Delete the given nick from the key store */
if (keystore_delete_nick(nick)) {
hexchat_printf(ph, "Deleted key for %s\n", nick);
} else {
hexchat_printf(ph, "\00305Failed to delete key in blow.ini!\n", nick);
hexchat_printf(ph, "\00305Failed to delete key in addon_fishlim.conf!\n");
}
return HEXCHAT_EAT_HEXCHAT;
}
static int handle_keyx(char *word[], char *word_eol[], void *userdata) {
const char *target = word[2];
hexchat_context *query_ctx = NULL;
char *pub_key, *priv_key;
int ctx_type;
if (*target)
query_ctx = find_context_on_network(target);
else {
target = hexchat_get_info(ph, "channel");
query_ctx = hexchat_get_context (ph);
}
if (query_ctx) {
hexchat_set_context(ph, query_ctx);
ctx_type = hexchat_list_int(ph, NULL, "type");
}
if ((query_ctx && ctx_type != 3) || (!query_ctx && !irc_is_query(target))) {
hexchat_print(ph, "You can only exchange keys with individuals");
return HEXCHAT_EAT_ALL;
}
if (dh1080_generate_key(&priv_key, &pub_key)) {
g_hash_table_replace (pending_exchanges, g_ascii_strdown(target, -1), priv_key);
hexchat_commandf(ph, "quote NOTICE %s :DH1080_INIT %s", target, pub_key);
hexchat_printf(ph, "Sent public key to %s, waiting for reply...", target);
g_free(pub_key);
} else {
hexchat_print(ph, "Failed to generate keys");
}
return HEXCHAT_EAT_ALL;
}
/**
* Command handler for /topic+
*/
static int handle_crypt_topic(char *word[], char *word_eol[], void *userdata) {
const char *target;
const char *topic = word_eol[2];
char *buf;
if (!*topic) {
hexchat_print(ph, usage_topic);
return HEXCHAT_EAT_ALL;
}
if (hexchat_list_int(ph, NULL, "type") != 2) {
hexchat_printf(ph, "Please change to the channel window where you want to set the topic!");
return HEXCHAT_EAT_ALL;
}
target = hexchat_get_info(ph, "channel");
buf = fish_encrypt_for_nick(target, topic);
if (buf == NULL) {
hexchat_printf(ph, "/topic+ error, no key found for %s", target);
return HEXCHAT_EAT_ALL;
}
hexchat_commandf(ph, "TOPIC %s +OK %s", target, buf);
g_free(buf);
return HEXCHAT_EAT_ALL;
}
/**
* Command handler for /notice+
*/
static int handle_crypt_notice(char *word[], char *word_eol[], void *userdata)
{
const char *target = word[2];
const char *notice = word_eol[3];
char *buf;
if (!*target || !*notice) {
hexchat_print(ph, usage_notice);
return HEXCHAT_EAT_ALL;
}
buf = fish_encrypt_for_nick(target, notice);
if (buf == NULL) {
hexchat_printf(ph, "/notice+ error, no key found for %s.", target);
return HEXCHAT_EAT_ALL;
}
hexchat_commandf(ph, "quote NOTICE %s :+OK %s", target, buf);
hexchat_emit_print(ph, "Notice Sent", target, notice);
g_free(buf);
return HEXCHAT_EAT_ALL;
}
/**
* Command handler for /msg+
*/
static int handle_crypt_msg(char *word[], char *word_eol[], void *userdata)
{
const char *target = word[2];
const char *message = word_eol[3];
hexchat_context *query_ctx;
char *buf;
if (!*target || !*message) {
hexchat_print(ph, usage_msg);
return HEXCHAT_EAT_ALL;
}
buf = fish_encrypt_for_nick(target, message);
if (buf == NULL) {
hexchat_printf(ph, "/msg+ error, no key found for %s", target);
return HEXCHAT_EAT_ALL;
}
hexchat_commandf(ph, "PRIVMSG %s :+OK %s", target, buf);
query_ctx = find_context_on_network(target);
if (query_ctx) {
hexchat_set_context(ph, query_ctx);
/* FIXME: Mode char */
hexchat_emit_print(ph, "Your Message", hexchat_get_info(ph, "nick"),
message, "", "");
}
else {
hexchat_emit_print(ph, "Message Send", target, message);
}
g_free(buf);
return HEXCHAT_EAT_ALL;
}
static int handle_crypt_me(char *word[], char *word_eol[], void *userdata) {
const char *channel = hexchat_get_info(ph, "channel");
char *buf;
buf = fish_encrypt_for_nick(channel, word_eol[2]);
if (!buf)
return HEXCHAT_EAT_NONE;
hexchat_commandf(ph, "PRIVMSG %s :\001ACTION +OK %s \001", channel, buf);
hexchat_emit_print(ph, "Your Action", hexchat_get_info(ph, "nick"),
word_eol[2], NULL);
g_free(buf);
return HEXCHAT_EAT_ALL;
}
/**
* Returns the plugin name version information.
*/
@ -271,14 +542,25 @@ int hexchat_plugin_init(hexchat_plugin *plugin_handle,
/* Register commands */
hexchat_hook_command(ph, "SETKEY", HEXCHAT_PRI_NORM, handle_setkey, usage_setkey, NULL);
hexchat_hook_command(ph, "DELKEY", HEXCHAT_PRI_NORM, handle_delkey, usage_delkey, NULL);
hexchat_hook_command(ph, "KEYX", HEXCHAT_PRI_NORM, handle_keyx, usage_keyx, NULL);
hexchat_hook_command(ph, "TOPIC+", HEXCHAT_PRI_NORM, handle_crypt_topic, usage_topic, NULL);
hexchat_hook_command(ph, "NOTICE+", HEXCHAT_PRI_NORM, handle_crypt_notice, usage_notice, NULL);
hexchat_hook_command(ph, "MSG+", HEXCHAT_PRI_NORM, handle_crypt_msg, usage_msg, NULL);
hexchat_hook_command(ph, "ME", HEXCHAT_PRI_NORM, handle_crypt_me, NULL, NULL);
/* Add handlers */
hexchat_hook_command(ph, "", HEXCHAT_PRI_NORM, handle_outgoing, NULL, NULL);
hexchat_hook_server(ph, "NOTICE", HEXCHAT_PRI_NORM, handle_incoming, NULL);
hexchat_hook_server(ph, "PRIVMSG", HEXCHAT_PRI_NORM, handle_incoming, NULL);
//hexchat_hook_server(ph, "RAW LINE", HEXCHAT_PRI_NORM, handle_debug, NULL);
hexchat_hook_server(ph, "TOPIC", HEXCHAT_PRI_NORM, handle_incoming, NULL);
hexchat_hook_server(ph, "332", HEXCHAT_PRI_NORM, handle_incoming, NULL);
hexchat_hook_server(ph, "NOTICE", HEXCHAT_PRI_HIGHEST, handle_keyx_notice, NULL);
hexchat_hook_server_attrs(ph, "NOTICE", HEXCHAT_PRI_NORM, handle_incoming, NULL);
hexchat_hook_server_attrs(ph, "PRIVMSG", HEXCHAT_PRI_NORM, handle_incoming, NULL);
/* hexchat_hook_server(ph, "RAW LINE", HEXCHAT_PRI_NORM, handle_debug, NULL); */
hexchat_hook_server_attrs(ph, "TOPIC", HEXCHAT_PRI_NORM, handle_incoming, NULL);
hexchat_hook_server_attrs(ph, "332", HEXCHAT_PRI_NORM, handle_incoming, NULL);
if (!dh1080_init())
return 0;
pending_exchanges = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
hexchat_printf(ph, "%s plugin loaded\n", plugin_name);
/* Return success */
@ -286,6 +568,9 @@ int hexchat_plugin_init(hexchat_plugin *plugin_handle,
}
int hexchat_plugin_deinit(void) {
g_clear_pointer(&pending_exchanges, g_hash_table_destroy);
dh1080_deinit();
hexchat_printf(ph, "%s plugin unloaded\n", plugin_name);
return 1;
}

View File

@ -25,7 +25,8 @@
#ifndef PLUGIN_HEXCHAT_H
#define PLUGIN_HEXCHAT_H
gchar *get_config_filename();
gchar *get_config_filename(void);
int irc_nick_cmp (const char *, const char *);
#endif

View File

@ -1,91 +0,0 @@
/*
Copyright (c) 2010 Samuel Lidén Borell <samuel@kodafritt.se>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#include <glib.h>
#include <stdio.h>
#include <string.h>
#include "fish.h"
// We can't use the HexChat plugin API from here...
gchar *get_config_filename() {
const gchar *homedir = g_get_home_dir();
return g_build_filename(homedir, ".xchat2", "blow.ini", NULL);
}
static int decrypt(int nick_count, char *nicks[]) {
char encrypted[8192];
while (fgets(encrypted, sizeof(encrypted), stdin)) {
char *msg;
for (int i = 0; i < nick_count; i++) {
msg = fish_decrypt_from_nick(nicks[i], encrypted);
if (msg) goto success;
}
fprintf(stderr, "None of the recipients were found in the key store!\n");
return 1;
success:
fprintf(stderr, "Decrypted text >>>%s<<<\n", msg);
}
return 0;
}
static int encrypt(int nick_count, char *nicks[]) {
char message[8192];
while (fgets(message, sizeof(message), stdin)) {
// Remove newline character
char *newline = strchr(message, '\n');
if (newline) *newline = '\0';
bool error = false;
for (int i = 0; i < nick_count; i++) {
char *encrypted = fish_encrypt_for_nick(nicks[i], message);
if (encrypted) {
fprintf(stderr, "Encrypted [%s]: >>>%s<<<\n", nicks[i], encrypted);
} else {
error = true;
}
}
if (error) {
fprintf(stderr, "Some of the recipients were't found in the key store!\n");
return 1;
}
}
return 0;
}
int main(int argc, char *argv[]) {
if (argc < 2) {
fprintf(stderr, "usage: %s [-e] nick...\n", argv[0]);
return 2;
}
if (strcmp(argv[1], "-e") == 0) {
return encrypt(argc-2, &argv[2]);
} else {
return decrypt(argc-1, &argv[1]);
}
}

View File

@ -1,69 +0,0 @@
/* HexChat
* Copyright (c) 2011-2012 Berke Viktor.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <windows.h>
#include "hexchat-plugin.h"
static hexchat_plugin *ph; /* plugin handle */
static void
launch_tool ()
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory (&si, sizeof (si));
si.cb = sizeof (si);
ZeroMemory (&pi, sizeof (pi));
if (!CreateProcess ( NULL, "gtk2-prefs.exe", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
{
hexchat_print (ph, "Error launching the GTK+ Preference Tool! Maybe the executable is missing?");
}
CloseHandle (pi.hProcess);
CloseHandle (pi.hThread);
}
int
hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
ph = plugin_handle;
*plugin_name = "GTKPref";
*plugin_desc = "GTK+ Preference Tool Launcher";
*plugin_version = "1.0";
hexchat_hook_command (ph, "GTKPREF", HEXCHAT_PRI_NORM, launch_tool, 0, 0);
hexchat_command (ph, "MENU -ietc\\gtkpref.png ADD \"Settings/GTK+ Preferences\" \"GTKPREF\"");
return 1; /* return 1 for success */
}
int
hexchat_plugin_deinit (void)
{
hexchat_command (ph, "MENU DEL \"Settings/GTK+ Preferences\"");
return 1;
}

View File

@ -1,18 +0,0 @@
include "..\..\src\makeinc.mak"
all: gtkpref.obj gtkpref.def
link $(LDFLAGS) $(LIBS) /dll /out:xcgtkpref.dll /def:gtkpref.def gtkpref.obj
gtkpref.def:
echo EXPORTS > gtkpref.def
echo hexchat_plugin_init >> gtkpref.def
echo hexchat_plugin_deinit >> gtkpref.def
gtkpref.obj: gtkpref.c makefile.mak
cl $(CFLAGS) $(GLIB) /I.. gtkpref.c
clean:
del *.obj
del *.dll
del *.exp
del *.lib

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@ -1,734 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* X-Tray is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define _WIN32_IE 0x0601
#include <windows.h>
#include <stdio.h>
#include <commctrl.h>
#include <tchar.h>
#include "hexchat-plugin.h"
#include "utility.h"
#include "hextray.h"
#include "hexchat.h"
#include "callbacks.h"
#include "resource.h"
#include "sdTray.h"
#include "sdAlerts.h"
HWND g_hPrefTabEvents;
HWND g_hPrefTabSettings;
HWND g_hPrefTabAlerts;
HWND g_hPrefTabAbout;
bool g_bCanQuit;
int g_iIsActive = 1;
BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
{
TCHAR szTitle[10];
GetWindowText(hWnd, szTitle, 9);
if(_tcsstr(szTitle, _T("HexChat [")))
{
g_hXchatWnd = hWnd;
return false;
}
return true;
}
/***********************************************************************************************/
/******* our HexChat event call back, get the name and info for each event and save it *********/
/******* for our alerts later ******************************************************************/
/***********************************************************************************************/
int event_cb(char *word[], void *userdata)
{
int iEvent = (int)userdata;
if(iEvent > 10 && iEvent != 21)
return HEXCHAT_EAT_NONE;
/***************************************************************************************/
/***** if the window is minimized or if we're allowed to show alerts when its not **/
/***** and if the option to show the specified alert is true and if we're even **/
/***** allowed to show alerts at all then we show them (a bit confusing but it works) **/
/***************************************************************************************/
if(((g_iIsActive == 0) || !(g_dwPrefs & (1<<PREF_OSBWM))) && (g_dwPrefs & (1<<PREF_AMAE)) && (g_dwPrefs & (1<<iEvent)))
{
/*********************************/
/*********** Our Buffers *********/
/*********************************/
char szInfo[512];
char szName[64];
DWORD dwInfoFlags;
int iTime = g_iTime*1000;
char *szTemp = NULL;
if(g_dwPrefs & (1<<PREF_KAOI))
{
iTime = 0;
}
switch(iEvent)
{
case CHAN_HILIGHT:
_snprintf(szInfo, 512, "%s:\r\n%s", word[1], word[2]);
_snprintf(szName, 64, "Highlight: %s", hexchat_get_info (ph, "channel"));
dwInfoFlags = NIIF_INFO;
break;
case CHAN_MESSAGE:
_snprintf(szInfo, 512, "%s:\r\n%s", word[1], word[2]);
_snprintf(szName, 64, "Channel Message: %s", hexchat_get_info (ph, "channel"));
dwInfoFlags = NIIF_INFO;
break;
case CHAN_TOPIC_CHANGE:
_snprintf(szInfo, 512, "%s has changed the topic to %s", word[1], word[2]);
_snprintf(szName, 64, "Topic Change: %s", word[3]);
dwInfoFlags = NIIF_INFO;
break;
case CHAN_INVITE:
_snprintf(szInfo, 512, "%s has invited you into %s", word[1], word[2]);
_snprintf(szName, 64, "Invite");
dwInfoFlags = NIIF_INFO;
break;
case CHAN_KICKED:
_snprintf(szInfo, 512, "Kicked from %s by %s:\r\n%s", word[2], word[3], word[4]);
_snprintf(szName, 64, "Kick");
dwInfoFlags = NIIF_WARNING;
break;
case CHAN_BANNED:
_snprintf(szInfo, 512, "Cannot join %s You are banned.", word[1]);
_snprintf(szName, 64, "Banned");
dwInfoFlags = NIIF_WARNING;
break;
case CTCP_GENERIC:
_snprintf(szInfo, 512, "%s:\r\nCTCP %s", word[2], word[1]);
_snprintf(szName, 64, "CTCP");
dwInfoFlags = NIIF_INFO;
break;
case PMSG_RECEIVE:
_snprintf(szInfo, 512, "%s:\r\n%s", word[1], word[2]);
_snprintf(szName, 64, "Private Message");
dwInfoFlags = NIIF_INFO;
break;
case SERV_DISCONNECT:
_snprintf(szInfo, 512, "Disconnected\r\nError: %s", word[1]);
_snprintf(szName, 64, "Disconnect");
dwInfoFlags = NIIF_ERROR;
break;
case SERV_KILLED:
_snprintf(szInfo, 512, "Killed(%s(%s))", word[1], word[2]);
_snprintf(szName, 64, "Server Admin has killed you");
dwInfoFlags = NIIF_ERROR;
break;
case SERV_NOTICE:
_snprintf(szInfo, 512, "Notice:\r\n%s: %s", word[1], word[2]);
_snprintf(szName, 64, "Notice");
dwInfoFlags = NIIF_INFO;
break;
case 11:
_snprintf(szInfo, 512, ":\r\n%s: %s", word[1], word[2]);
_snprintf(szName, 64, "Notice");
dwInfoFlags = NIIF_INFO;
break;
}
/**************************************************************************************/
/***** Use windows instead of balloons, and if its a window should we keep it open ****/
/***** indefinitely? ****/
/**************************************************************************************/
szTemp = hexchat_strip_color(szInfo);
if(g_dwPrefs & (1<<PREF_UWIOB))
{
sdSystemAlert((HINSTANCE)g_hInstance, IDD_ALERT, szTemp, szName, iTime);
}
else
{
ShowBalloon(g_hXchatWnd, 1, szTemp, szName, iTime, dwInfoFlags);
}
free(szTemp);
}
if(g_dwPrefs & (1<<PREF_BLINK) && (g_dwPrefs & (1<<iEvent)))
{
BlinkIcon(g_hXchatWnd, 1, g_hIcons[0], g_hIcons[(iEvent+1)], 700, 5);
}
/***********************************/
/***** pass the events to HexChat **/
/***********************************/
return HEXCHAT_EAT_NONE;
}
int command_cb(char *word[], char *word_eol[], void *userdata)
{
char szInfo[512];
char *szTemp = NULL;
int iTime = g_iTime*1000;
_snprintf(szInfo, 512, word_eol[2]);
szTemp = hexchat_strip_color(szInfo);
if(g_dwPrefs & (1<<PREF_KAOI))
{
iTime = 0;
}
if(((g_iIsActive == 0) || !(g_dwPrefs & (1<<PREF_OSBWM))) && (g_dwPrefs & (1<<PREF_AMAE)))
{
if(g_dwPrefs & (1<<PREF_UWIOB))
{
sdSystemAlert((HINSTANCE)g_hInstance, IDD_ALERT, szTemp, "Alert", iTime);
}
else
{
ShowBalloon(g_hXchatWnd, 1, szTemp, "Alert", iTime, NIIF_INFO);
}
}
free(szTemp);
return HEXCHAT_EAT_ALL;
}
LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch(msg)
{
case WM_CLOSE:
{
if((g_dwPrefs & (1<<PREF_MIOC)) && (g_bCanQuit == false))
{
/*******************************************/
/**** to autoaway or not to autoaway... ***/
/*******************************************/
if(g_dwPrefs & (1<<PREF_AOM))
{
hexchat_globally_away(g_szAway);
}
/**************************************************/
/**** Win32 API call to hide the window and **/
/**** save the fact that its minimized for later **/
/**************************************************/
g_iIsActive = 0;
ShowWindow(hWnd, SW_HIDE);
return 0;
}
else
{
if(g_hPrefDlg != NULL)
{
DestroyWindow(g_hPrefDlg);
}
StopBlink(hWnd, 1, g_hIcons[0]);
if(sdAlertNum())
{
sdCloseAlerts();
HoldClose();
return 0;
}
}
}
break;
case WM_SIZE:
{
/******************************************/
/***** User wants to minimize HexChat, ****/
/***** are we allowed to go to tray? ******/
/******************************************/
if((g_dwPrefs & (1<<PREF_TOT)) && (wparam == SIZE_MINIMIZED))
{
/*******************************************/
/**** to autoaway or not to autoaway... ***/
/*******************************************/
if(g_dwPrefs & (1<<PREF_AOM))
{
hexchat_globally_away(g_szAway);
}
/**************************************************/
/**** Win32 API call to hide the window and **/
/**** save the fact that its minimized for later **/
/**************************************************/
g_iIsActive = 0;
ShowWindow(hWnd, SW_HIDE);
}
}
break;
/**********************************/
/*** user clicked the tray icon ***/
/**********************************/
case WM_TRAYMSG:
{
switch(lparam)
{
case WM_LBUTTONDOWN:
{
if(!g_iIsActive)
{
/*********************************************************/
/*** 0: its hiden, restore it and show it, if autoaway ***/
/*** is on, set us as back ***/
/*********************************************************/
SendMessage(hWnd, WM_SYSCOMMAND, SC_RESTORE, 0);
SetForegroundWindow(hWnd);
g_iIsActive = 1;
if(g_dwPrefs & (1<<PREF_AOM))
{
hexchat_globally_back();
}
}
else
{
SendMessage(hWnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
}
}
break;
case WM_RBUTTONDOWN:
{
/******************************************/
/*** user wants to see the menu find out **/
/*** where the mouse is and show it **/
/******************************************/
POINT pt;
int iRet;
GetCursorPos(&pt);
SetForegroundWindow(hWnd);
ModifyMenu(g_hTrayMenu, 2, (MF_POPUP | MF_BYPOSITION), (UINT)setServerMenu(), _T("Away"));
Sleep(175);
iRet = TrackPopupMenuEx(g_hTrayMenu, (TPM_RETURNCMD | TPM_LEFTALIGN), pt.x, pt.y, hWnd, NULL);
/***********************************/
/*** nRet is the users selection, **/
/*** process it **/
/***********************************/
sdTrayProc(hWnd, iRet);
}
break;
}
}
break;
default:
{
/*****************************************************/
/*** the taskbar has been restarted, re-add our icon */
/*****************************************************/
if(msg == RegisterWindowMessage(_T("TaskbarCreated")))
{
char szVersion[64];
_snprintf(szVersion, 64, "HexChat [%s]", hexchat_get_info(ph, "version"));
AddIcon(g_hXchatWnd, 1, g_hIcons[0], szVersion, (NIF_ICON | NIF_MESSAGE | NIF_TIP), WM_TRAYMSG);
}
}
break;
}
return CallWindowProc(g_hOldProc, hWnd, msg, wparam, lparam);
}
/****************************************************/
/*** process messages from the tray menu ************/
/****************************************************/
LRESULT CALLBACK sdTrayProc(HWND hWnd, int msg)
{
switch(msg)
{
case ACT_EXIT:
{
g_bCanQuit = true;
PostMessage(hWnd, WM_CLOSE, 0, 0);
}
break;
case ACT_RESTORE:
{
/*************************************************/
/** user wants us to restore the HexChat window **/
/** and of autoaway is on, set as back ******** **/
/*************************************************/
SendMessage(g_hXchatWnd, WM_SYSCOMMAND, SC_RESTORE, 0);
SetForegroundWindow(hWnd);
if((!g_iIsActive) && (g_dwPrefs & (1<<PREF_AOM)))
{
hexchat_globally_back();
g_iIsActive = 1;
}
}
break;
case ACT_SETTINGS:
{
ShowWindow(g_hPrefDlg, SW_SHOW);
}
break;
case ACT_AWAY:
{
hexchat_globally_away(g_szAway);
}
break;
case ACT_BACK:
{
hexchat_globally_back();
}
break;
default:
{
if(msg > 0)
{
hexchat_set_context(ph, hexchat_find_server(msg-1));
if(!hexchat_get_info(ph, "away"))
{
hexchat_away(g_szAway);
}
else
{
hexchat_back();
}
}
}
break;
}
return 1;
}
int CALLBACK PrefProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch(msg)
{
case WM_INITDIALOG:
{
TCITEM tci1;
TCITEM tci2;
TCITEM tci3;
TCITEM tci4;
tci1.mask = TCIF_TEXT;
tci1.pszText = _T("Settings");
tci1.cchTextMax = strlen("Settings");
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_INSERTITEM, 0, (LPARAM)&tci1);
tci2.mask = TCIF_TEXT;
tci2.pszText = _T("Alerts");
tci2.cchTextMax = strlen("Alerts");
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_INSERTITEM, 1, (LPARAM)&tci2);
tci3.mask = TCIF_TEXT;
tci3.pszText = _T("Events");
tci3.cchTextMax = strlen("Events");
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_INSERTITEM, 2, (LPARAM)&tci3);
tci4.mask = TCIF_TEXT;
tci4.pszText = _T("About");
tci4.cchTextMax = strlen("About");
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_INSERTITEM, 3, (LPARAM)&tci4);
/***********************************************************************************/
/***********************************************************************************/
/***********************************************************************************/
g_hPrefTabSettings = CreateDialog((HINSTANCE)g_hInstance,
MAKEINTRESOURCE(IDD_SETTINGS),
hWnd,
(DLGPROC)SettingsProc);
SetDialog(g_hPrefTabSettings, IDD_SETTINGS);
g_hPrefTabAlerts = CreateDialog((HINSTANCE)g_hInstance,
MAKEINTRESOURCE(IDD_ALERTS),
hWnd,
(DLGPROC)AlertsProc);
SetDialog(g_hPrefTabAlerts, IDD_ALERTS);
g_hPrefTabEvents = CreateDialog((HINSTANCE)g_hInstance,
MAKEINTRESOURCE(IDD_EVENTS),
hWnd,
(DLGPROC)EventsProc);
SetDialog(g_hPrefTabEvents, IDD_EVENTS);
g_hPrefTabAbout = CreateDialog((HINSTANCE)g_hInstance,
MAKEINTRESOURCE(IDD_ABOUT),
hWnd,
(DLGPROC)AboutProc);
}
break;
case WM_SHOWWINDOW:
{
if(wparam)
{
SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_SETCURSEL, 0, 0);
ShowWindow(g_hPrefTabSettings, SW_SHOW);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
}
}
break;
case WM_NOTIFY:
{
NMHDR *pData = (NMHDR *)lparam;
switch(pData->code)
{
case TCN_SELCHANGE:
{
switch(SendDlgItemMessage(hWnd, IDC_TAB_CONTROL, TCM_GETCURSEL, 0, 0))
{
case 0:
{
ShowWindow(g_hPrefTabSettings, SW_SHOW);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
}
break;
case 1:
{
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_SHOW);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
}
break;
case 2:
{
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabEvents, SW_SHOW);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
}
break;
case 3:
{
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_SHOW);
}
break;
}
}
break;
}
}
break;
case WM_CLOSE:
{
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
ShowWindow(hWnd, SW_HIDE);
return TRUE;
}
break;
case WM_COMMAND:
{
switch(wparam)
{
case IDC_PREF_OK:
{
CheckPrefs(g_hPrefTabEvents, IDD_EVENTS);
CheckPrefs(g_hPrefTabSettings, IDD_SETTINGS);
CheckPrefs(g_hPrefTabAlerts, IDD_ALERTS);
SavePrefs(0);
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
ShowWindow(hWnd, SW_HIDE);
return TRUE;
}
break;
case IDC_PREF_CANCEL:
{
ShowWindow(g_hPrefTabEvents, SW_HIDE);
ShowWindow(g_hPrefTabSettings, SW_HIDE);
ShowWindow(g_hPrefTabAlerts, SW_HIDE);
ShowWindow(g_hPrefTabAbout, SW_HIDE);
ShowWindow(hWnd, SW_HIDE);
return TRUE;
}
break;
case IDC_PREF_APPLY:
{
CheckPrefs(g_hPrefTabEvents, IDD_EVENTS);
CheckPrefs(g_hPrefTabSettings, IDD_SETTINGS);
CheckPrefs(g_hPrefTabAlerts, IDD_ALERTS);
SavePrefs(0);
return FALSE;
}
break;
}
}
break;
case WM_DESTROY:
{
SendMessage(g_hPrefTabEvents, WM_CLOSE, 0, 0);
SendMessage(g_hPrefTabSettings, WM_CLOSE, 0, 0);
SendMessage(g_hPrefTabAbout, WM_CLOSE, 0, 0);
SendMessage(g_hPrefTabAlerts, WM_CLOSE, 0, 0);
}
break;
}
return FALSE;
}
/****************************************************/
/****************************************************/
/****************************************************/
LRESULT CALLBACK AlertsProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch(msg)
{
case WM_CLOSE:
{
DestroyWindow(hWnd);
return TRUE;
break;
}
break;
case WM_COMMAND:
{
switch(LOWORD(wparam))
{
case PREF_AMAE:
{
SetToggle(hWnd, PREF_OSBWM, PREF_AMAE, TRUE);
SetToggle(hWnd, PREF_UWIOB, PREF_AMAE, TRUE);
SetToggle(hWnd, PREF_KAOI, PREF_AMAE, TRUE);
if(IsDlgButtonChecked(hWnd, PREF_AMAE))
{
SetToggle(hWnd, IDC_ALERT_HOTKEY, PREF_UWIOB, TRUE);
SetToggle(hWnd, IDC_ALERT_HOTKEY_TEXT, PREF_UWIOB, TRUE);
SetToggle(hWnd, IDC_ALERT_TIME, PREF_KAOI, FALSE);
SetToggle(hWnd, IDC_ALERT_TIME_TEXT, PREF_KAOI, FALSE);
}
else
{
SetToggle(hWnd, IDC_ALERT_HOTKEY, PREF_AMAE, TRUE);
SetToggle(hWnd, IDC_ALERT_HOTKEY_TEXT, PREF_AMAE, TRUE);
SetToggle(hWnd, IDC_ALERT_TIME, PREF_AMAE, TRUE);
SetToggle(hWnd, IDC_ALERT_TIME_TEXT, PREF_AMAE, TRUE);
}
}
break;
case PREF_UWIOB:
{
SetToggle(hWnd, IDC_ALERT_HOTKEY, PREF_UWIOB, TRUE);
SetToggle(hWnd, IDC_ALERT_HOTKEY_TEXT, PREF_UWIOB, TRUE);
}
break;
case PREF_KAOI:
{
SetToggle(hWnd, IDC_ALERT_TIME, PREF_KAOI, FALSE);
SetToggle(hWnd, IDC_ALERT_TIME_TEXT, PREF_KAOI, FALSE);
}
break;
}
break;
}
}
return FALSE;
}
/****************************************************/
/****************************************************/
/****************************************************/
LRESULT CALLBACK AboutProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
if(msg == WM_CLOSE)
{
DestroyWindow(hWnd);
return true;
}
return FALSE;
}
/*****************************************************/
/** Process the events for our event dialog **********/
/*****************************************************/
LRESULT CALLBACK EventsProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
if(msg == WM_CLOSE)
{
DestroyWindow(hWnd);
return true;
}
return FALSE;
}
/*****************************************************/
/** Process the events for our settings dialog this **/
/** is alot more complicated because options are **/
/** enabled/disabled based on the state of others **/
/*****************************************************/
LRESULT CALLBACK SettingsProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
if(msg == WM_CLOSE)
{
DestroyWindow(hWnd);
return true;
}
return FALSE;
}
/*****************************************************/
/** this is the hotkey message processing function **/
/** this window is always open and ready to be told **/
/** if someone has hit the hotkey, if they did, we **/
/** need to close out all of the tray alerts, for **/
/** this I wrote sdCloseAlerts, more info there **/
/*****************************************************/
LRESULT CALLBACK HotKeyProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
if(msg == WM_CLOSE)
{
DestroyWindow(hWnd);
return true;
}
else if(msg == WM_HOTKEY)
{
sdCloseAlerts();
}
return FALSE;
}

View File

@ -1,37 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* X-Tray is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _H_CALLBACKS_H
#define _H_CALLBACKS_H
int event_cb (char *word[], void *userdata);
int command_cb (char *word[], char *word_eol[], void *userdata);
LRESULT CALLBACK WindowProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
BOOL CALLBACK EnumWindowsProc (HWND hWnd, LPARAM lParam);
LRESULT CALLBACK sdTrayProc (HWND hwnd, int msg);
LRESULT CALLBACK AlertProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK HotKeyProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK EventsProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK AboutProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK AlertsProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
LRESULT CALLBACK SettingsProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
int CALLBACK PrefProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
#endif

View File

@ -1,320 +0,0 @@
/* X-Tray
* Copyright (C) 1998, 2005 Peter Zelezny, Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* X-Tray is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <windows.h>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <tchar.h>
#include "hexchat-plugin.h"
#include "hextray.h"
#include "resource.h"
#include "hexchat.h"
#include "utility.h"
// from util.c of HexChat source code ( slightly modified to fit HexTray Syntax )
char *hexchat_strip_color (char *text)
{
int nc = 0;
int i = 0;
int col = 0;
int len = strlen(text);
char *new_str = (char *)malloc(len + 2);
while (len > 0)
{
if ((col && isdigit(*text) && (nc < 2)) || (col && isdigit(*(text+1)) && (nc < 3) && (*text == ',')))
{
nc++;
if(*text == ',')
{
nc = 0;
}
}
else
{
col = 0;
switch (*text)
{
case '\003': /*ATTR_COLOR: */
{
col = 1;
nc = 0;
}
break;
case '\007': /*ATTR_BEEP: */
case '\017': /*ATTR_RESET: */
case '\026': /*ATTR_REVERSE: */
case '\002': /*ATTR_BOLD: */
case '\037': /*ATTR_UNDERLINE: */
break;
default:
{
new_str[i] = *text;
i++;
}
break;
}
}
text++;
len--;
}
new_str[i] = 0;
return new_str;
}
void check_special_chars (char *cmd)
{
int occur = 0;
int len = strlen (cmd);
int i = 0, j = 0;
char *buf;
if (!len)
return;
buf = (char *)malloc (len + 1);
if (buf)
{
while (cmd[j])
{
switch (cmd[j])
{
case '%':
{
occur++;
switch (cmd[j + 1])
{
case 'R':
buf[i] = '\026';
break;
case 'U':
buf[i] = '\037';
break;
case 'B':
buf[i] = '\002';
break;
case 'C':
buf[i] = '\003';
break;
case 'O':
buf[i] = '\017';
break;
case '%':
buf[i] = '%';
break;
default:
buf[i] = '%';
j--;
break;
}
j++;
}
break;
default:
{
buf[i] = cmd[j];
}
break;
}
j++;
i++;
}
buf[i] = 0;
if (occur)
strcpy (cmd, buf);
free (buf);
}
}
void hexchat_globally_away(TCHAR *tszAway)
{
char szTemp[512];
char szAway[512];
ConvertString(tszAway, szAway, 512);
_snprintf(szTemp, 512, "ALLSERV AWAY %s\0", szAway);
check_special_chars(szTemp);
hexchat_exec(szTemp);
}
void hexchat_away(TCHAR *tszAway)
{
char szTemp[512];
char szAway[512];
ConvertString(tszAway, szAway, 512);
_snprintf(szTemp, 512, szAway);
check_special_chars(szTemp);
hexchat_commandf(ph, "AWAY %s\0", szTemp);
}
void hexchat_globally_back()
{
std::vector<int> xs;
std::vector<int>::iterator xsi;
hexchat_list *xl = hexchat_list_get(ph, "channels");
if(xl)
{
while(hexchat_list_next(ph, xl))
{
xsi = std::find(xs.begin(), xs.end(), hexchat_list_int(ph, xl, "id"));
if((xsi == xs.end()) &&
((strlen(hexchat_list_str(ph, xl, "server")) > 0) ||
(strlen(hexchat_list_str(ph, xl, "channel")) > 0)))
{
xs.push_back(hexchat_list_int(ph, xl, "id"));
hexchat_set_context(ph, (hexchat_context *)hexchat_list_str(ph, xl, "context"));
hexchat_back();
}
}
hexchat_list_free(ph, xl);
}
}
void hexchat_back()
{
if(hexchat_get_info(ph, "away"))
{
hexchat_command(ph, "BACK");
}
}
HMENU setServerMenu()
{
HMENU sTemp = CreateMenu();
TCHAR wszServer[128];
TCHAR wszNick[128];
TCHAR wszMenuEntry[256];
std::vector<int> xs;
std::vector<int>::iterator xsi;
hexchat_list *xl = hexchat_list_get(ph, "channels");
AppendMenu(sTemp, MF_STRING, ACT_AWAY, _T("Set Globally Away"));
AppendMenu(sTemp, MF_STRING, ACT_BACK, _T("Set Globally Back"));
AppendMenu(sTemp, MF_SEPARATOR, 0, NULL);
if(xl)
{
while(hexchat_list_next(ph, xl))
{
xsi = std::find(xs.begin(), xs.end(), hexchat_list_int(ph, xl, "id"));
if( (xsi == xs.end()) &&
((strlen(hexchat_list_str(ph, xl, "server")) > 0) ||
(strlen(hexchat_list_str(ph, xl, "channel")) > 0)))
{
hexchat_set_context(ph, (hexchat_context *)hexchat_list_str(ph, xl, "context"));
xs.push_back(hexchat_list_int(ph, xl, "id"));
char *network = _strdup(hexchat_list_str(ph, xl, "network"));
char *server = _strdup(hexchat_list_str(ph, xl, "server"));
char *nick = _strdup(hexchat_get_info(ph, "nick"));
if(network != NULL)
{
ConvertString(network, wszServer, 128);
}
else
{
ConvertString(server, wszServer, 128);
}
if(server != NULL)
{
ConvertString(nick, wszNick, 128);
_sntprintf(wszMenuEntry, 256, _T("%s @ %s\0"), wszNick, wszServer);
if(!hexchat_get_info(ph, "away"))
{
AppendMenu(sTemp, MF_STRING, (hexchat_list_int(ph, xl, "id") + 1), wszMenuEntry);
}
else
{
AppendMenu(sTemp, (MF_CHECKED | MF_STRING), (hexchat_list_int(ph, xl, "id") + 1), wszMenuEntry);
}
}
free(network);
free(server);
free(nick);
}
}
hexchat_list_free(ph, xl);
}
return sTemp;
}
struct _hexchat_context *hexchat_find_server(int find_id)
{
hexchat_context *xc;
hexchat_list *xl = hexchat_list_get(ph, "channels");
int id;
if(!xl)
return NULL;
while(hexchat_list_next(ph, xl))
{
id = hexchat_list_int(ph, xl, "id");
if(id == -1)
{
return NULL;
}
else if(id == find_id)
{
xc = (hexchat_context *)hexchat_list_str(ph, xl, "context");
hexchat_list_free(ph, xl);
return xc;
}
}
hexchat_list_free(ph, xl);
return NULL;
}
void hexchat_exec(char *command)
{
hexchat_set_context(ph, hexchat_find_context(ph, NULL, NULL));
hexchat_command(ph, command);
}

View File

@ -1,32 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* X-Tray is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _H_XCHAT_H
#define _H_XCHAT_H
void hexchat_exec (char *);
char *hexchat_strip_color (char *);
void hexchat_parse (char *);
struct _hexchat_context *hexchat_find_server (int);
void hexchat_globally_away (TCHAR *);
void hexchat_away (TCHAR *);
void hexchat_globally_back ();
void hexchat_back ();
HMENU setServerMenu ();
#endif

View File

@ -1,246 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* X-Tray is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define _WIN32_IE 0x0601
#include <windows.h>
#include <list>
#include <string>
#include <shobjidl.h>
#include "hexchat-plugin.h"
#include "resource.h"
#include "callbacks.h"
#include "utility.h"
#include "hextray.h"
#include "sdTray.h"
#include "sdAlerts.h"
/*****************************************************/
/**** Don't want to pollute the namespace do we? *****/
/*****************************************************/
std::list<hexchat_hook *> g_vHooks;
/*****************************************************/
/************ Global Identifiers *********************/
/*****************************************************/
WNDPROC g_hOldProc;
hexchat_plugin *ph;
/*****************************************************/
/***************** Resources *************************/
/*****************************************************/
HWND g_hXchatWnd;
HWND g_hHotkeyWnd;
HWND g_hPrefDlg;
HMENU g_hTrayMenu;
HICON g_hIcons[24];
HANDLE g_hInstance;
/*****************************************************/
/***************** Preferences ***********************/
/*****************************************************/
unsigned int g_dwPrefs;
TCHAR g_szAway[512];
int g_iTime;
BOOL WINAPI DllMain(HANDLE hModule, DWORD fdwReason, LPVOID lpVoid)
{
if((fdwReason == DLL_PROCESS_ATTACH) || (fdwReason == DLL_THREAD_ATTACH))
{
g_hInstance = hModule;
}
return TRUE;
}
int hexchat_plugin_init(hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
ph = plugin_handle;
*plugin_name = "HexTray";
*plugin_desc = "Minimize HexChat to the Windows system tray";
*plugin_version = "1.3.0";
char buffer[256];
/***************************************************************************************************************************/
/************************* Initialize our preferences if they don't exist yet **********************************************/
/***************************************************************************************************************************/
if (hexchat_pluginpref_get_int (ph, "settings") == -1)
{
hexchat_pluginpref_set_int (ph, "settings", HT_DEF_SET);
}
if (hexchat_pluginpref_get_int (ph, "aot") == -1)
{
hexchat_pluginpref_set_int (ph, "aot", HT_DEF_AOT);
}
if (hexchat_pluginpref_get_int (ph, "key") == -1)
{
hexchat_pluginpref_set_int (ph, "key", HT_DEF_KEY);
}
if (hexchat_pluginpref_get_int (ph, "mod") == -1)
{
hexchat_pluginpref_set_int (ph, "mod", HT_DEF_MOD);
}
if (hexchat_pluginpref_get_str (ph, "away", buffer) == 0)
{
hexchat_pluginpref_set_str (ph, "away", "");
}
/***************************************************************************************************************************/
/************************* Load our preferences ****************************************************************************/
/***************************************************************************************************************************/
LoadPrefs();
/***************************************************************************************************************************/
/************************* Finds the HexChat window and saves it for later use *********************************************/
/***************************************************************************************************************************/
g_hXchatWnd = (HWND)hexchat_get_info(ph, "win_ptr");
if(g_hXchatWnd == NULL)
{
EnumThreadWindows(GetCurrentThreadId(), EnumWindowsProc, 0);
}
g_hOldProc = (WNDPROC)GetWindowLongPtr(g_hXchatWnd, GWLP_WNDPROC);
SetWindowLongPtr(g_hXchatWnd, GWLP_WNDPROC, (LONG_PTR)WindowProc);
/***************************************************************************************************************************/
/************************* Grab the HexChat Icon, Load our menu, create the window to receive the hotkey messages *********/
/************************* and register the windows message so we know if explorer crashes ***********/
/***************************************************************************************************************************/
g_hTrayMenu = GetSubMenu(LoadMenu((HINSTANCE)g_hInstance, MAKEINTRESOURCE(IDR_TRAY_MENU)), 0);
g_hHotkeyWnd = CreateDialog((HINSTANCE)g_hInstance, MAKEINTRESOURCE(IDD_ALERT), NULL, (DLGPROC)HotKeyProc);
g_hPrefDlg = CreateDialog((HINSTANCE)g_hInstance, MAKEINTRESOURCE(IDD_PREF), g_hXchatWnd, (DLGPROC)PrefProc);
g_hIcons[0] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_XCHAT), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[2] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_HIGHLIGHT), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[5] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_BANNED), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[6] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_KICKED), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[8] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_PMSG), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[10]= (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_SNOTICE), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[11]= (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_DISCONNECTED), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
g_hIcons[22] = (HICON)LoadImage((HINSTANCE)g_hInstance, MAKEINTRESOURCE(ICO_CHANMSG), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
/***************************************************************************************************************************/
/************************* Add our icon to the tray ************************************************************************/
/***************************************************************************************************************************/
char szVersion[64];
_snprintf(szVersion, 64, "HexChat %s", hexchat_get_info(ph, "version"));
AddIcon(g_hXchatWnd, 1, g_hIcons[0], szVersion, (NIF_ICON | NIF_MESSAGE | NIF_TIP), WM_TRAYMSG);
/***************************************************************************************************************************/
/***************************************************************************************************************************/
/***************************************************************************************************************************/
if(g_dwPrefs & (1<<PREF_DNSIT))
{
DWORD dwStyle;
dwStyle = GetWindowLong(g_hXchatWnd, GWL_STYLE);
dwStyle |= (1<<WS_CHILD);
SetWindowLongPtr(g_hXchatWnd, GWL_STYLE, (LONG_PTR)dwStyle);
SetWindowLongPtr(g_hXchatWnd, GWL_HWNDPARENT, (LONG_PTR)g_hHotkeyWnd);
}
/***************************************************************************************************************************/
/************************* Set our hooks and save them for later so we can unhook them *************************************/
/***************************************************************************************************************************/
g_vHooks.push_back(hexchat_hook_print(ph, "Channel Msg Hilight", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_HILIGHT));
g_vHooks.push_back(hexchat_hook_print(ph, "Channel Message", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_MESSAGE));
g_vHooks.push_back(hexchat_hook_print(ph, "Topic Change", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_TOPIC_CHANGE));
g_vHooks.push_back(hexchat_hook_print(ph, "Channel Action Hilight", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_HILIGHT));
g_vHooks.push_back(hexchat_hook_print(ph, "Channel INVITE", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_INVITE));
g_vHooks.push_back(hexchat_hook_print(ph, "You Kicked", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_KICKED));
g_vHooks.push_back(hexchat_hook_print(ph, "Banned", HEXCHAT_PRI_NORM, event_cb, (void *)CHAN_BANNED));
g_vHooks.push_back(hexchat_hook_print(ph, "CTCP Generic", HEXCHAT_PRI_NORM, event_cb, (void *)CTCP_GENERIC));
g_vHooks.push_back(hexchat_hook_print(ph, "Private Message", HEXCHAT_PRI_NORM, event_cb, (void *)PMSG_RECEIVE));
g_vHooks.push_back(hexchat_hook_print(ph, "Private Message to Dialog", HEXCHAT_PRI_NORM, event_cb, (void *)PMSG_RECEIVE));
g_vHooks.push_back(hexchat_hook_print(ph, "Disconnected", HEXCHAT_PRI_NORM, event_cb, (void *)SERV_DISCONNECT));
g_vHooks.push_back(hexchat_hook_print(ph, "Killed", HEXCHAT_PRI_NORM, event_cb, (void *)SERV_KILLED));
g_vHooks.push_back(hexchat_hook_print(ph, "Notice", HEXCHAT_PRI_NORM, event_cb, (void *)SERV_NOTICE));
g_vHooks.push_back(hexchat_hook_command(ph, "tray_alert", HEXCHAT_PRI_NORM, command_cb, "Create an Alert", NULL));
return 1;
}
int hexchat_plugin_deinit(hexchat_plugin *plugin_handle)
{
/******************************************/
/****** Remove the Icon from the tray *****/
/******************************************/
StopBlink(g_hXchatWnd, 1, g_hIcons[0]);
RemoveIcon(g_hXchatWnd, 1);
/*******************************************/
/*******************************************/
/*******************************************/
if(g_dwPrefs & (1<<PREF_DNSIT))
{
DWORD dwStyle;
dwStyle = GetWindowLong(g_hXchatWnd, GWL_STYLE);
dwStyle &= ~(1<<WS_CHILD);
SetWindowLongPtr(g_hXchatWnd, GWL_STYLE, (LONG_PTR)dwStyle);
SetWindowLongPtr(g_hXchatWnd, GWL_HWNDPARENT, NULL);
}
/******************************************/
/****** Unload our resources **************/
/******************************************/
DestroyMenu(g_hTrayMenu);
for(int i = 0; i <= 11; i++)
{
DestroyIcon(g_hIcons[i]);
}
/******************************************/
/****** Remove our window hook ************/
/******************************************/
SetWindowLongPtr(g_hXchatWnd, GWLP_WNDPROC, (LONG_PTR)g_hOldProc);
/******************************************/
/****** Remove our hotkey, and destroy ****/
/****** the window that receives its ****/
/****** messages ****/
/******************************************/
UnregisterHotKey(g_hHotkeyWnd, 1);
DestroyWindow(g_hHotkeyWnd);
DestroyWindow(g_hPrefDlg);
/******************************************/
/************* Clean up Isle 7 ************/
/******************************************/
if(sdAlertNum())
{
sdCloseAlerts();
}
/******************************************/
/****** remove our hexchat_hook_*s **********/
/******************************************/
while(!g_vHooks.empty())
{
if(g_vHooks.back() != NULL)
{
hexchat_unhook(ph, g_vHooks.back());
}
g_vHooks.pop_back();
}
return 1;
}

View File

@ -1,3 +0,0 @@
EXPORTS
hexchat_plugin_init
hexchat_plugin_deinit

View File

@ -1,83 +0,0 @@
/* X-Tray
* Copyright (C) 2005 Michael Hotaling <Mike.Hotaling@SinisterDevelopments.com>
*
* X-Tray is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* X-Tray is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with X-Tray; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _XTRAY_H
#define _XTRAY_H
/******************** Default settings*****************/
#define HT_DEF_SET 13814
#define HT_DEF_AOT 5
#define HT_DEF_KEY 84
#define HT_DEF_MOD 6
/******************** Globals *************************/
extern HWND g_hXchatWnd;
extern HWND g_hHotkeyWnd;
extern HWND g_hPrefDlg;
extern HMENU g_hTrayMenu;
extern HICON g_hIcons[24];
extern HANDLE g_hInstance;
extern unsigned int g_dwPrefs;
extern TCHAR g_szAway[512];
extern int g_iTime;
extern WNDPROC g_hOldProc;
extern struct _hexchat_plugin *ph;
/******************************************************/
/******************** Messages ************************/
#define WM_TRAYMSG WM_APP
/******************************************************/
/********************* Events *************************/
#define CHAN_HILIGHT 1
#define CHAN_INVITE 2
#define CHAN_TOPIC_CHANGE 3
#define CHAN_BANNED 4
#define CHAN_KICKED 5
#define CTCP_GENERIC 6
#define PMSG_RECEIVE 7
#define SERV_KILLED 8
#define SERV_NOTICE 9
#define SERV_DISCONNECT 10
/* new events */
#define CHAN_MESSAGE 21
#define PREF_AOM 11 // away on minimize
#define PREF_TOT 12 // Tray on Taskbar
#define PREF_AMAE 13 // alert me about events
#define PREF_OSBWM 14 // Only Show Balloon When Minimized
#define PREF_UWIOB 15 // Use Window Instead of Balloon
#define PREF_KAOI 16 // Keep alerts open indefinitely
#define PREF_MIOC 17 // Minimize instead of close
#define PREF_BLINK 18 // blink icon
#define PREF_CICO 19 // change icon - not implemented
#define PREF_DNSIT 20 // Do not show in taskbar
/******************************************************/
#endif
#ifdef _WIN64
/* use replacement with the same value, and use SetWindowLongPtr instead
of SetWindowLong. more info:
http://msdn.microsoft.com/en-us/library/ms633591.aspx
http://msdn.microsoft.com/en-us/library/ms644898.aspx */
#define GWL_HWNDPARENT GWLP_HWNDPARENT
#endif

View File

@ -1,131 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<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>
<PropertyGroup Label="Globals">
<ProjectGuid>{3024CF36-85E5-4E00-9608-7002E2C7EF14}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>hextray</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
<TargetName>hchextray</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
<TargetName>hchextray</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;XTRAY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>hextray.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;XTRAY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>hextray.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="bitmaps\sd.bmp" />
<None Include="icons\ban.ico" />
<None Include="icons\disconnect.ico" />
<None Include="icons\highlight.ico" />
<None Include="icons\kick.ico" />
<None Include="icons\message.ico" />
<None Include="icons\sd.ico" />
<None Include="icons\notice.ico" />
<None Include="icons\hexchat.ico" />
<None Include="hextray.def" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="resource.rc" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="callbacks.cpp" />
<ClCompile Include="sdAlerts.cpp" />
<ClCompile Include="sdTray.cpp" />
<ClCompile Include="utility.cpp" />
<ClCompile Include="hexchat.cpp" />
<ClCompile Include="hextray.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="callbacks.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="sdAlerts.h" />
<ClInclude Include="sdTray.h" />
<ClInclude Include="utility.h" />
<ClInclude Include="hexchat.h" />
<ClInclude Include="hextray.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -1,103 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Resource Files\bitmaps">
<UniqueIdentifier>{448b49a5-e68b-451e-bfbc-0855da024b2e}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files\icons">
<UniqueIdentifier>{8345128a-0635-43d6-9115-a85ad9c77ee2}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="hextray.def">
<Filter>Resource Files</Filter>
</None>
<None Include="bitmaps\sd.bmp">
<Filter>Resource Files\bitmaps</Filter>
</None>
<None Include="icons\ban.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\disconnect.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\highlight.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\kick.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\message.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\sd.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\notice.ico">
<Filter>Resource Files\icons</Filter>
</None>
<None Include="icons\hexchat.ico">
<Filter>Resource Files\icons</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="resource.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="callbacks.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sdAlerts.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sdTray.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="utility.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="hexchat.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="hextray.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="callbacks.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="sdAlerts.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="sdTray.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="utility.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="hexchat.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="hextray.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show More