Compare commits

...

623 Commits

Author SHA1 Message Date
b2cd9157d7 Enable updates 2012-11-11 19:08:31 +01:00
07ddde4108 Fix GTK-VS installers 2012-11-11 19:06:22 +01:00
428f479aed Fix 4996 warnings 2012-11-11 18:36:00 +01:00
39b797b7bb Fix WMPA compilation without the WDK 2012-11-11 18:26:31 +01:00
82694d2d29 Hide 4996 warnings in all projects and fix license copy 2012-11-11 18:23:27 +01:00
18c0d7c52b Update translations 2012-11-11 17:38:27 +01:00
bb6a6b7f17 Update translation template 2012-11-11 17:24:46 +01:00
89bbe07080 Disable updates for now 2012-11-11 17:10:16 +01:00
2cc6d05af6 Fix wording for banlist 2012-11-11 17:09:29 +01:00
1784d2b331 Fix date 2012-11-11 16:43:11 +01:00
681ca5e390 Update changelog 2012-11-11 16:30:41 +01:00
b564da6284 Update translations 2012-11-11 16:27:57 +01:00
7911aeb51e Disable one instance code coz it's really buggy 2012-11-11 15:50:31 +01:00
a04fdc50b6 More rebranding 2012-11-11 15:23:48 +01:00
1c0548c4ca Copy-paste fix 2012-11-11 14:39:35 +01:00
348c6ba919 Rebranding 2012-11-11 13:51:50 +01:00
4c1f2b93d0 Update comment 2012-11-10 20:59:51 +01:00
e154ce310d Update translations 2012-11-10 20:38:37 +01:00
1468d35db3 Don't minimize/close to tray via plugin-tray when HexTray is available 2012-11-10 20:28:16 +01:00
488883266c Update changelog 2012-11-10 20:06:15 +01:00
50fabee1ad Exclude SASL plugin from build 2012-11-10 20:04:31 +01:00
ebb157616f Version bump 2012-11-10 19:46:36 +01:00
ec62dc0626 Update translations 2012-11-10 19:36:08 +01:00
05b1b9e43e Update translation template 2012-11-10 19:31:36 +01:00
4756078263 Explode gui_tray_flags 2012-11-10 19:29:12 +01:00
5781cd0c44 Update translations 2012-11-10 18:35:43 +01:00
ed970381fb Eliminate some more warnings and hide less warnings in VS 2012-11-10 18:26:45 +01:00
584b89bb02 Another unused thing 2012-11-10 17:32:18 +01:00
b3f225a70d Comment out one more unused thing 2012-11-10 17:26:50 +01:00
9c70eee4ca Eliminate some unused stuff 2012-11-10 17:20:05 +01:00
f53eadbcab Update translation template 2012-11-10 17:03:30 +01:00
2024b39bac Merge pull request #237 from mikelolasagasti/configure-changes2
Silent build
2012-11-09 13:00:34 -08:00
3fe4bf8392 Use AS_HELP_STRING to format text 2012-11-09 22:00:08 +01:00
1b03947ce5 Silent build 2012-11-09 21:56:37 +01:00
09ccc1fd9d Arg 3 should be email but we don't use that; arg 4 defaults to lowercase arg 1, so it's unnecessary 2012-11-09 21:36:46 +01:00
00604eb722 Rename deps files 2012-11-09 20:39:23 +01:00
cbfdf1df47 Fix project dependencies 2012-11-09 19:33:22 +01:00
cd820abcc1 Update translations 2012-11-09 16:14:55 +01:00
c9cd6fbd1b Add notes about testing translations 2012-11-09 16:12:33 +01:00
e6c64dae1d Update translations 2012-11-07 00:33:13 +01:00
912ea8a534 Disable some stupid warnings without the WDK 2012-11-06 23:47:12 +01:00
cc8a86abb4 Fix spacing once more 2012-11-06 18:13:21 +01:00
ca9661779a Move GTK+ to a separate repo 2012-11-06 18:03:08 +01:00
2c0f050df0 Remove spacing, it wouldn't work anyway 2012-11-05 15:42:48 +01:00
cd92b0e72b Add build notes to 1st level deps 2012-11-05 14:28:21 +01:00
857f436671 win-iconv version bump 2012-11-05 14:27:50 +01:00
d142c74c15 Fix erroneous DCC file names and crash upon aborting 2012-11-05 03:04:08 +01:00
4724443124 Update translations 2012-11-05 01:01:50 +01:00
72c8b7a1fe Get rid of XChat revision 2012-11-05 00:49:46 +01:00
db218817fd Use configdir instead of *xchatdir* 2012-11-04 23:55:36 +01:00
ad16ed3933 Update translations 2012-11-04 23:27:15 +01:00
79fa1a0521 Move build files out of the source tree, make grep usage much easier 2012-11-04 23:26:43 +01:00
83189aadfe Add icon to message boxes 2012-11-04 22:30:26 +01:00
d9bc58cb4c Update translations 2012-11-04 22:07:11 +01:00
aed112150a Update translation template 2012-11-04 21:56:27 +01:00
e3dae6dbd0 Cosmetics 2012-11-04 21:52:17 +01:00
9193754095 Fix missing function 2012-11-04 21:51:43 +01:00
d706c5ccdc Fix another missing var 2012-11-04 21:50:16 +01:00
abbb4897ea Fix missing variable 2012-11-04 21:45:46 +01:00
d0b5d53f92 Some more platform unification 2012-11-04 21:40:59 +01:00
5c9283fc68 Fix for using -d with non-english locale 2012-11-04 21:40:39 +01:00
7873bfe211 Merge pull request #227 from Arnavion/utf8-everywhere
utf8-everywhere part 3
2012-11-04 09:31:46 -08:00
b969665e47 utf8-everywhere: Fixed log_write to use access instead of g_access. 2012-11-04 09:27:15 -08:00
6560e6365a utf8-everywhere: Scrollback-loading code thought the first word of every message was part of the timestamp because of a missing space. 2012-11-04 09:11:41 -08:00
04892cbbef Case tabulation 2012-11-04 17:52:59 +01:00
d7daa8bc3c Case simplification 2012-11-04 17:52:58 +01:00
9a643bfaaa Merge pull request #226 from TingPing/master
Update Python docs
2012-11-04 07:55:33 -08:00
71251252ae Updated get_list docs 2012-11-04 01:53:31 -05:00
594cca99c0 Updated python get_info docs 2012-11-04 01:02:27 -05:00
753a773bba Merge pull request #225 from Arnavion/utf8-everywhere
utf8-everywhere: Fixed crash when passing in a config directory using -d
2012-11-03 22:35:50 -07:00
6602e6a7c5 utf8-everywhere: Fixed crash when passing in a config directory using -d 2012-11-03 22:32:33 -07:00
82031ed6d4 Indentation cosmetics 2012-11-04 06:10:59 +01:00
3c5284f19d Merge pull request #224 from Arnavion/utf8-everywhere
UTF-8 everywhere
2012-11-03 21:48:56 -07:00
c2c23894fc utf8-everywhere: Fixed crash on loading scrollback. 2012-11-03 21:32:52 -07:00
4ec499c241 Eliminate warnings due to missing includes 2012-11-04 04:22:22 +01:00
0e9658f2ab Ignore specific warnings for common and fe-gtk, all should be eliminated at some point 2012-11-04 04:06:44 +01:00
87a8c13e5e Fix tabulation 2012-11-04 04:04:41 +01:00
a978e7b55b utf8-everywhere: Removed unreferenced local variables. 2012-11-03 19:11:09 -07:00
5d9264aff6 Initial commit for utf8 everywhere. 2012-11-03 19:04:02 -07:00
e0b1724158 ReadMe cosmetics 2012-11-04 01:21:23 +01:00
3d0eba7e02 Update translations 2012-11-04 00:53:15 +01:00
28b2d331f3 Update translation template 2012-11-04 00:50:11 +01:00
cef390e47d By default, open dialog window for doubleclick on a nick in the user list 2012-11-04 00:41:25 +01:00
a0e14dfc5f Workaround for marker line option being untickable 2012-11-04 00:31:09 +01:00
c0e65ff0fe Fix spacing 2012-11-04 00:14:17 +01:00
b236af84a4 Installer migrator functions for xchat.conf -> hexchat.conf 2012-11-03 23:54:05 +01:00
0481433d69 Update translations 2012-11-03 21:34:00 +01:00
434368412a Update translation template 2012-11-03 21:31:11 +01:00
cdfc56a80a Merge pull request #223 from mikelolasagasti/basque
Add missing Basque language
2012-11-03 13:27:44 -07:00
c45fbe1bb3 Remove identd text event coz it doesn't work 2012-11-03 21:04:07 +01:00
2846b66284 Add missing Basque language 2012-11-03 20:57:21 +01:00
21b3267e8a Update translations 2012-11-03 19:32:20 +01:00
ec83e04d11 Update translation template 2012-11-03 19:21:48 +01:00
7e1729c7b6 Make CAP messages consistent 2012-11-03 19:17:35 +01:00
1ac033e42a Text event for identd 2012-11-03 19:04:47 +01:00
76f43ce583 Make identd messages consistent with SASL messages 2012-11-03 18:39:11 +01:00
7d664e755e More robust CAP management and CAP multi-prefix support 2012-11-03 18:29:08 +01:00
7c1d2366b1 Fix icon rendering in HexChat (sub)windows 2012-11-03 09:10:38 +01:00
a9c7e40b5b Add text events for CAP ACK/REQ 2012-11-03 07:46:51 +01:00
80fdce76c4 Updated user list icons 2012-11-03 06:39:58 +01:00
9ee3613bad Add export config stub 2012-11-03 06:29:51 +01:00
27391f458f Update translations 2012-11-03 05:30:15 +01:00
d32f32df05 Update translation template 2012-11-03 05:20:39 +01:00
e2908c38a2 Make SASL user name color consistent with other user name colors 2012-11-03 04:53:17 +01:00
58adceb4e9 Provide text events for SASL auth, SASL responses and server capabilities 2012-11-03 04:45:32 +01:00
432f0781c4 Update FAQ according to recent icon file name changes 2012-11-03 03:16:06 +01:00
98ef77406d Varname consolidation for the rest of pixmaps 2012-11-03 02:57:24 +01:00
c65e16fd00 Relocate hexchat.png and hexchat.ico and some more varname cleanup 2012-11-03 02:33:44 +01:00
259ed9644d Relocate version.txt, leave a copy in old place for a while for upgrades to work 2012-11-03 01:58:56 +01:00
c07c888321 Relocate hexchat.desktop 2012-11-03 01:52:46 +01:00
396d74322a Rainbow user list colors and more senseful variable names 2012-11-03 01:42:47 +01:00
58e7e967db Merge pull request #218 from TingPing/usericon
added support for op+3 icons
2012-11-02 15:23:54 -07:00
da43158772 added support for op+3 icons 2012-11-02 00:55:24 -04:00
7bd55c4f43 Merge pull request #212 from blasphemy/malloc
that malloc should have been made bigger when renaming xchat.conf to hex...
2012-10-31 07:37:23 -07:00
bc06dffd5d that malloc should have been made bigger when renaming xchat.conf to hexchat.conf 2012-10-31 01:40:11 -04:00
64f1a43d07 Update translations 2012-10-31 05:39:36 +01:00
7613c796b7 Add another temporary file to gitignore 2012-10-31 05:35:30 +01:00
49d11c26ca Update translation template 2012-10-31 05:34:35 +01:00
5567b9ab27 Raw Log consistency with menu 2012-10-31 05:31:35 +01:00
78b5f5625d Make rawlog text copy behaviour consistent with the main text box
And make it close upon pressing Escape
2012-10-31 05:18:20 +01:00
ea0d3059f4 Eliminate even more warnings and bump warning level to 3
Shouldn't need to go any higher, level 4+ gives insane warnings
2012-10-30 22:13:40 +01:00
cb0f6c8c91 Eliminate some more warnings 2012-10-30 21:25:58 +01:00
284dbfbe3d Supposed fix for identd ipv6 compiler warnings 2012-10-30 20:57:49 +01:00
f6c2698701 Some quickfixes 2012-10-30 13:42:18 +01:00
9ae206e08e Initial conversion of the Perl interface docs to Markdown 2012-10-30 13:39:04 +01:00
2d256315ea Python docs cosmetics 2012-10-30 12:10:46 +01:00
aeb60b72cd Update translation files 2012-10-30 12:01:04 +01:00
75c70a2f94 Update translation template once again 2012-10-30 11:58:43 +01:00
99a288fb47 Typofix 2012-10-30 11:56:27 +01:00
02f58fd515 Update translation template 2012-10-30 11:50:24 +01:00
507af191bd Now some final cleanup (I hope) 2012-10-30 11:47:12 +01:00
a51a69134b Nah, even more rebranding 2012-10-30 11:35:39 +01:00
82936df2af Some final rebranding 2012-10-30 10:42:37 +01:00
012d78b2f6 Plugin doc fixes 2012-10-30 10:38:45 +01:00
29f7a9180c Rebrand get_info(xchatdir) but remain compatible for Perl and Python 2012-10-30 09:59:58 +01:00
66be50f335 Some more fixes 2012-10-30 09:16:21 +01:00
b6c89e7670 Fix Unix compilation 2012-10-30 09:05:48 +01:00
8d6f4d9d40 Some remaining fixes 2012-10-30 08:58:50 +01:00
e681eafa78 Rebranding for the rest of plugin* 2012-10-30 08:42:48 +01:00
97dc13fde7 Rebranding for XCHAT_PLUGIN_HANDLE 2012-10-30 07:46:28 +01:00
45d4fa5801 Rebranding for XCHAT_EAT_* 2012-10-30 07:40:37 +01:00
a5ab455b34 Forgot this one 2012-10-30 07:31:33 +01:00
4b7c7c2bb1 Rebranding for XCHAT_FD_* 2012-10-30 07:25:40 +01:00
a87ad4a6ae Fix D-Bus plugin 2012-10-30 07:22:36 +01:00
91dd079add Rebranding for XCHAT_PRI_* 2012-10-30 07:18:25 +01:00
50a2335276 Remove old unused code 2012-10-30 07:02:28 +01:00
81747d996c Revert "Proof-of-concept compat mode for XChat"
This reverts commit ad16a2bfee.
2012-10-30 06:56:41 +01:00
ad16a2bfee Proof-of-concept compat mode for XChat 2012-10-30 06:56:25 +01:00
56973ae365 Eliminate some fe-gtk warnings 2012-10-30 05:42:59 +01:00
a37bc00b59 Remove unnecessary include 2012-10-30 05:42:02 +01:00
9f55b2a495 Fix Unix compilation 2012-10-30 04:10:41 +01:00
fc98a6d79d Remove hexchat-plugin.h duplicate 2012-10-30 04:07:33 +01:00
c73c9b4b31 Fix plugin function ordering 2012-10-30 03:55:25 +01:00
251fe8250e Update translations 2012-10-30 03:33:15 +01:00
0b90bfbf7b Update L10n howto with some notes 2012-10-30 03:33:08 +01:00
cdc720c97b Add speller strings to translation template 2012-10-30 02:57:49 +01:00
5788ab0c5b Update translation template 2012-10-30 02:38:50 +01:00
9bf00ac214 Don't provide untranslatable strings for translation 2012-10-30 02:28:06 +01:00
8fc9691704 Even more version bumps 2012-10-29 00:56:16 +01:00
2168ef409e Update version number once moar 2012-10-29 00:52:28 +01:00
07cbcfe846 Make HexTray filename consistent with the rest 2012-10-29 00:42:52 +01:00
09c7f2c935 Remove unused var 2012-10-29 00:34:15 +01:00
15c2ff2d54 Convert HexTray to the plugin config API 2012-10-29 00:32:59 +01:00
9a57ca41b1 Use consistent addon config filenames 2012-10-28 23:37:45 +01:00
da54f7cc11 Remove plugin20.html remnant 2012-10-28 23:33:45 +01:00
717bf34816 Merge pull request #204 from TingPing/faq
Removed html docs from spec
2012-10-28 15:30:13 -07:00
f10e98fac0 Removed html docs from spec 2012-10-28 17:28:25 -05:00
16b14ec765 Saner limit 2012-10-28 20:54:08 +01:00
f90f51a898 ChangeLog cosmetics 2012-10-28 16:26:44 +01:00
ab18a31311 Remove last 2 HTML files 2012-10-28 16:22:25 +01:00
18ef7b93ae Add HTML sources, convert them later 2012-10-28 16:20:51 +01:00
da83448c09 Random FAQ cosmetics 2012-10-28 16:08:40 +01:00
9c89cd7817 Fix Python docs 2012-10-28 15:36:28 +01:00
31ed205e6e Cosmetics 2012-10-28 15:35:34 +01:00
24ed6e7d11 Convert XChat changelog to Markdown 2012-10-28 14:44:22 +01:00
edbec158d4 Fix escapes in readme 2012-10-28 14:43:41 +01:00
7b8ffc6ee1 Remove old HTML docs 2012-10-28 14:14:40 +01:00
85da4bd9bb Fix newline 2012-10-28 14:00:27 +01:00
048b17dcbd Fix escapes 2012-10-28 13:58:09 +01:00
474d064c1f Convert plugins.html to Markdown 2012-10-28 13:52:43 +01:00
65fe8bd935 Update links and add placeholder files 2012-10-28 11:01:25 +01:00
1cf9209cd7 Consistency FTW 2012-10-28 10:53:15 +01:00
6a9e7bb4d3 Further doc relocations and conversions 2012-10-28 10:49:44 +01:00
fe6bda343b More hacking cosmetics 2012-10-28 09:58:09 +01:00
52ad256474 Hacking cosmetics 2012-10-28 09:55:45 +01:00
33cd1a2149 Add notes about translating HexChat + typofix 2012-10-28 09:26:43 +01:00
df635db882 Let's see how it works with 2 seconds 2012-10-28 03:13:07 +01:00
4880b2977a Nick box icon requires a restart 2012-10-28 03:09:59 +01:00
85119b9a80 Add option to hide user mode icon in nick box 2012-10-28 03:05:50 +01:00
6cb0c96319 Fix SysInfo displaying garbage for too long lines 2012-10-28 02:25:54 +01:00
6ae224107f Use Consolas as the default font where available 2012-10-28 02:08:36 +01:00
e0f61605de Some more unuseful but fancy eyecandy 2012-10-28 01:54:15 +02:00
3ac5a67215 Update translations 2012-10-28 01:48:15 +02:00
194b21666f Update translation template 2012-10-28 01:42:30 +02:00
3bfd749037 Even more eyecandy 2012-10-28 01:37:01 +02:00
e39a4db309 Add notes about managing text events 2012-10-28 01:06:09 +02:00
9550862cb0 Fix text event argument counts 2012-10-28 01:05:55 +02:00
79b00170ba Even moar polishing 2012-10-28 00:12:53 +02:00
fe1d958838 More polishing for the About dialog 2012-10-28 00:05:40 +02:00
d892b3346e Accidental commit is accidental 2012-10-27 23:46:37 +02:00
90ba33cda3 Merge branch 'master' of https://github.com/hexchat/hexchat 2012-10-27 23:45:13 +02:00
745c0913f6 Redesign the About dialog a'la XChat 2012-10-27 23:44:17 +02:00
6e9c3254fd Merge pull request #196 from TingPing/faq
updated fedora/red hat spec
2012-10-27 13:07:21 -07:00
646c5a8975 fixed dep in spec 2012-10-27 15:15:12 -03:00
b150986402 Update share/misc/hexchat.spec 2012-10-27 14:42:36 -03:00
d33a16ae01 Convert HACKING to Markdown format 2012-10-27 19:31:51 +02:00
68d3552ceb updated spec 2012-10-27 12:28:51 -05:00
29c5385d6e Add manual page 2012-10-27 19:07:59 +02:00
bfdb3729c4 Use Unix EOL for docs 2012-10-27 18:50:06 +02:00
366e76e3a7 Fix color codes for consistency's sake 2012-10-27 18:27:28 +02:00
74abaedffa Don't forget to build make-te before common 2012-10-27 18:12:35 +02:00
c7ca4a5e68 Fix spacing 2012-10-27 18:09:54 +02:00
c494001d50 Ignore generated text even headers 2012-10-27 17:43:39 +02:00
e9c9bd4ebe build: move automake "foreign" option to AM_INIT_AUTOMAKE
This works towards allowing using autoreconf(1) later.
2012-10-27 17:42:40 +02:00
a46df34a2a Remove baked text event headers 2012-10-27 17:39:51 +02:00
b8927e9d1d build: use BUILT_SOURCES to properly order text*.h before libhexcommon.a 2012-10-27 17:25:34 +02:00
6d27fce863 More ignores 2012-10-27 15:57:47 +02:00
7f71933c70 Add make-te binary to gitignore 2012-10-27 15:43:35 +02:00
d15d07212d Change default icons 2012-10-27 13:55:52 +02:00
cd3ade3046 Change default text events 2012-10-27 13:32:04 +02:00
9634e4574f Change default colors 2012-10-27 13:32:02 +02:00
a98dc18d55 Ignore generated config.h properly on Unix 2012-10-27 01:26:32 +02:00
aae8c393ed Update config.rpath by running gettextize 2012-10-27 01:05:41 +02:00
1ecc6b3155 g_str_hash is inconsistent, always recalculate it 2012-10-26 15:06:30 +02:00
e38c6696cd Fix buffer size 2012-10-26 14:44:46 +02:00
d012ca1eb8 Don't error out when libpci is not found 2012-10-26 14:36:45 +02:00
e3be4a0e0a Eliminate some more plugin warnings 2012-10-26 13:38:13 +02:00
46b0fe70eb Add commands for modifying UPD options 2012-10-26 13:32:08 +02:00
89252106da Add configurable delay and check frequency for UPD and eliminate some warnings 2012-10-26 13:00:09 +02:00
bf42c2b60f Fixes after file moves 2012-10-26 01:13:32 +02:00
ef158aadbf Fix doc URLs for Start Menu icons 2012-10-26 01:06:00 +02:00
fb8d1a383d Converting, renaming, relocating 2012-10-26 01:03:52 +02:00
a3c3608b1d Remove unused MSI dependency 2012-10-26 00:37:36 +02:00
5fe1ff1b28 Add hexchat-text to gitignore 2012-10-26 00:35:53 +02:00
359e780f8a Fix FAQ filename 2012-10-26 00:33:22 +02:00
644d24b0d7 Disable spell langs option when spelling is disabled 2012-10-26 00:24:06 +02:00
48452aca09 Merge pull request #186 from TingPing/faq
Fixed some escapes
2012-10-25 15:11:29 -07:00
823331646c Fixed some escapes 2012-10-25 17:07:59 -04:00
7827d93c5d Merge pull request #185 from TingPing/faq
Converted FAQ to markdown and cleaned up.
2012-10-25 13:40:11 -07:00
3538521906 Fixed custom icons path 2012-10-25 17:39:52 -03:00
f359f8f4ba Update faq.md 2012-10-25 17:14:04 -03:00
b1db3cf514 Eliminate compiler warning and update Windows Server name 2012-10-25 22:04:16 +02:00
05407ee466 Update translations 2012-10-25 21:24:31 +02:00
cd380f6744 Update translation template 2012-10-25 21:20:30 +02:00
c5c92a47d1 Fix L10n generation 2012-10-25 21:17:18 +02:00
215325c058 Move SASL passphrase generation code to utils 2012-10-25 21:08:26 +02:00
f50a1bf1dd Reorganize Preferences/Appearance 2012-10-25 20:39:45 +02:00
a8f3fdabde Updated faq.md 2012-10-25 14:27:37 -04:00
21424154a8 Hide "empty" SASL messages during auth 2012-10-25 20:24:20 +02:00
35e6160b71 fixed typo 2012-10-25 14:19:23 -04:00
a626c701a6 Converted FAQ to markdown and cleaned up. 2012-10-25 13:48:30 -04:00
bd6e39ffa9 Typofix 2012-10-25 19:47:20 +02:00
ce3fa431f4 Check for unallocated string 2012-10-25 18:15:35 +02:00
4a5be24804 Merge pull request #184 from blasphemy/spacing
fix alignment (space is off by 1)
2012-10-25 08:05:07 -07:00
36aab9a2b3 fix alignment (space is off by 1) 2012-10-25 10:56:37 -04:00
7871d8ba2f Fix configure script 2012-10-25 16:46:11 +02:00
7cc2dc36e5 Get rid of the SASL plugin 2012-10-25 16:40:26 +02:00
82a903f347 Rename HexTray config file 2012-10-25 16:24:03 +02:00
4f4958878a Built-in SASL support and other CAP fixes 2012-10-25 16:17:21 +02:00
47310229a4 Some more rebranding for consistency's sake 2012-10-25 01:33:23 +02:00
9690fa532d Update migration instructions 2012-10-25 00:54:49 +02:00
9eb32dd16c Update translations 2012-10-25 00:48:44 +02:00
87aa65653b Use own configfile 2012-10-25 00:42:34 +02:00
0003b85ccb Bypass the identify-msg patch as well, breaks SASL 2012-10-25 00:20:21 +02:00
842e74dce8 Quickfix for plugin breakage after the DCC patch 2012-10-25 00:18:02 +02:00
d6dec82d3d Some more rebranding 2012-10-25 00:16:27 +02:00
1a75c8e1be A lot more rebranding 2012-10-24 21:33:02 +02:00
6d356a5e51 Rename libxchatcommon to libhexchatcommon 2012-10-24 20:41:30 +02:00
bbf2ad1793 Fix fe-text compilation - it still segfaults though 2012-10-24 20:41:13 +02:00
d26aa1bf82 Move scrollback lines to Logging 2012-10-24 19:19:06 +02:00
d9b5900525 Add support for ircd-seven identify-msg (author unknown) 2012-10-24 18:52:13 +02:00
464b005c97 Fix compilation on Unix with GLib 2.24 or older 2012-10-24 18:34:07 +02:00
aa917d568f System includes before own includes 2012-10-24 13:13:25 +02:00
bdbb3d14bd Fix error message printing for raw numeric 263 2012-10-24 12:54:02 +02:00
ac9bbc6d99 Merge pull request #180 from Arnavion/fix-filename-encoding
Fix filename encoding error for DCC transfers of files with non-ASCII characters in their name
2012-10-23 12:18:59 -07:00
8902f52eb9 Removed DCC::destfile_fs since it was now the same as DCC::destfile. Fixed usage of g_stat to use GStatBuf instead of OS-native struct stat. 2012-10-22 19:08:36 -07:00
8c7ec909b8 Replaced use of OS file I/O functions which expect filenames in system codepage with GLib's, since GLib's functions work with UTF-8 and GLib handles converting the filename to system codepage for us. 2012-10-22 19:07:28 -07:00
1cc599a0f9 Build DCC file's path using platform's directory separator instead of always using forward slash. 2012-10-22 19:06:18 -07:00
a9fe82a1b8 Fix nick change dialog being barely visible in most cases 2012-10-22 22:27:30 +02:00
332bde3c99 Update translations 2012-10-22 20:46:44 +02:00
06ad3e8286 Update translation template 2012-10-22 20:38:22 +02:00
3a659d8b05 Even more cosmetics, fixes and new options 2012-10-22 20:33:43 +02:00
75169d7181 Add GUI option for compact mode 2012-10-22 20:10:13 +02:00
a23a08460c Use better wording 2012-10-22 20:03:32 +02:00
e05c13a097 More fixes, sorting and cleanup 2012-10-22 20:00:08 +02:00
6daa63f113 Typofix 2012-10-22 19:03:28 +02:00
bc4fb2fd0e Fix user count options 2012-10-22 18:59:45 +02:00
f5338e014a Fix nick box setting 2012-10-22 18:34:31 +02:00
fd47409e76 Fix translations 2012-10-22 17:57:48 +02:00
f11f878fcf Update translations 2012-10-22 17:43:41 +02:00
d444d4dd9d Add Malayalam translation 2012-10-22 17:39:00 +02:00
2c256725e8 Use better wording 2012-10-22 17:23:04 +02:00
ae137af9e3 Update translation template 2012-10-22 17:11:01 +02:00
302a06e2e1 Fix previous, failed attempt at fixing the default folder for DCC transfers 2012-10-22 17:00:48 +02:00
b007592cde Fix DCC accept default value 2012-10-22 16:24:19 +02:00
e6e252e540 Fix default network 2012-10-22 16:14:23 +02:00
107938971c Apparently, auto_indent is not needed anymore 2012-10-22 16:09:11 +02:00
0a511852fe Fix Unix compilation 2012-10-22 15:59:52 +02:00
51ae33cbe8 Variable cleanup for the rest 2012-10-22 15:55:43 +02:00
545b7dc6ff Variable cleanup for irc_* 2012-10-22 14:50:36 +02:00
5c49b45a6d Variable cleanup for input_* 2012-10-22 14:18:20 +02:00
bf27d43052 Variable cleanup for gui_* 2012-10-22 13:49:28 +02:00
87e903cd73 Variable cleanup for flood_* 2012-10-22 12:20:47 +02:00
b563b93414 Variable cleanup for dcc_* 2012-10-22 12:10:55 +02:00
cf8ea26498 Variable cleanup for completion_* 2012-10-22 10:10:19 +02:00
a05817c0eb Variable cleanup for away_* 2012-10-22 09:53:28 +02:00
0e8ac8b7a1 Fix LSB filename 2012-10-22 09:23:32 +02:00
fba30c4cf8 Rebrand xchatprefs 2012-10-22 09:00:35 +02:00
25f2506984 Add missing define for Unix 2012-10-22 08:59:00 +02:00
f98b3a5609 Remove duplicate 2012-10-22 08:54:21 +02:00
c42f8b98df Get rid of platform-specific settings (except for fast DCC), make migrations smoother 2012-10-22 08:51:54 +02:00
4f68ac6cc0 Get rid of ALL gui_tweaks 2012-10-22 08:37:28 +02:00
445e8c006e Learn some grammar 2012-10-22 08:26:18 +02:00
1665443062 Get rid of gui_tweaks 4 2012-10-22 08:24:52 +02:00
6cd5d086bb do_layout is required for dots to appear or disappear 2012-10-22 08:13:09 +02:00
9435851dee Get rid of gui_tweaks 8 2012-10-22 08:00:55 +02:00
02dd0ba560 Get rid of gui_tweaks 16 & 1 2012-10-22 07:24:52 +02:00
2cbae7f6a5 Get rid of gui_tweaks 32 2012-10-22 06:18:32 +02:00
0e88d01caf Get rid of gui_tweaks 64 2012-10-22 06:02:15 +02:00
e361efcf94 Rename tab_* to gui_tab_* 2012-10-22 05:38:52 +02:00
09c94486be Get rid of obsolete values 2012-10-22 05:36:08 +02:00
e5f8aaf8eb Add Windows version check to installer against overly frustrated Win2000 users 2012-10-22 05:13:27 +02:00
a909aa1817 Forgot to add title to changelog 2012-10-22 04:43:55 +02:00
ae95271d3a Change readme icon and add changelog icon as well 2012-10-22 04:40:32 +02:00
26e655daee Omit upcoming release 2012-10-22 04:10:57 +02:00
ef0a7a61b2 Add own changelog 2012-10-22 04:05:01 +02:00
01e8b50b4f EXTRA_DIST cleanup 2012-10-22 04:04:51 +02:00
de39738bbd Add README for people who still can't use Google 2012-10-22 02:34:20 +02:00
cdae8fecdd Update plugin autoload info in the FAQ 2012-10-22 01:37:36 +02:00
feae1450c6 Update translation template 2012-10-21 14:46:30 +02:00
4fd5cf7043 Keep the installer component lists sorted 2012-10-21 14:38:47 +02:00
db4cb3d2f2 Cosmetics 2012-10-21 14:30:10 +02:00
77d3c50da1 Typofix 2012-10-21 14:26:46 +02:00
8404ebf1d4 Even more SysInfo fixes 2012-10-21 14:24:01 +02:00
1e7d7101c6 Some more cleanup for SysInfo 2012-10-21 12:49:55 +02:00
d9dc34499d A LOT of cleanup for SysInfo-Unix 2012-10-21 12:15:41 +02:00
f0b909ea68 Add Mageia support to SysInfo 2012-10-21 09:56:48 +02:00
3d01c78248 First bunch of fixes to SysInfo-Unix, now it works - barely 2012-10-21 09:56:09 +02:00
62c9375bc9 Compilation fixes and integration with HexChat 2012-10-21 08:06:09 +02:00
bc57507a4c Add Arch patches to SysInfo-Unix and rebrand it 2012-10-21 07:15:48 +02:00
187351fa61 Add vanilla X-Sys sources 2012-10-21 06:44:29 +02:00
cb891a9732 Rename WinSys on the code level 2012-10-21 06:40:28 +02:00
c54cd4181b Rename WinSys files 2012-10-21 06:33:33 +02:00
ddbce0b9fe Move warning level to property sheet 2012-10-21 05:57:00 +02:00
df33905ad1 Relocate typedef.h 2012-10-21 04:41:59 +02:00
0ca97e2108 Fix tabulation 2012-10-21 03:51:40 +02:00
125cebb09a Fix Command button on Mac, round 2 2012-10-21 03:47:21 +02:00
8c297f6797 Supposed fix for using Command/Super button instead of Ctrl on Mac 2012-10-21 03:04:53 +02:00
0c04cfed7f Make modifier buttons truly abstract 2012-10-21 03:03:38 +02:00
ef18ded827 Update OS X name 2012-10-21 02:38:06 +02:00
d0268f1cf8 Supposed fix for opening links on Mac 2012-10-21 01:54:56 +02:00
9be155633f Don't show transparency options when compiling w/o Xlib coz they won't work 2012-10-20 23:36:51 +02:00
1418524090 Add note about the way Transifex treats email addresses 2012-10-20 23:28:01 +02:00
c9d3a20f7f Update translations 2012-10-20 20:36:21 +02:00
475bd96afb Update translation template 2012-10-20 20:30:41 +02:00
12456bf063 Use better wording 2012-10-20 20:23:57 +02:00
bfc8a1a1ed Reorganize the Settings menu and fix Search menu offset 2012-10-20 20:18:26 +02:00
29e96d7611 Fix dialog icon in userlist popup and add entry for Ignore 2012-10-20 19:58:41 +02:00
c1bc4303ce Fix TYPE_BOOL vs unsigned int inconsistency 2012-10-20 17:56:38 +02:00
99b68f6e24 Update set variable after English lang code change 2012-10-20 17:12:21 +02:00
6faa4767d8 Finally, update translation files from Transifex 2012-10-20 16:57:02 +02:00
2f2311a9c5 Update L10n howto with additional step required 2012-10-20 16:50:57 +02:00
e5a36abf90 Update translation template 2012-10-20 16:47:47 +02:00
4ee52cb4fa Remove Hebrew file, it fails to import to Transifex and barely contains translations anyway 2012-10-20 16:42:38 +02:00
5374d7cd1f Update translation template 2012-10-20 16:08:20 +02:00
2995b05794 Fix language codes and naming 2012-10-20 16:00:03 +02:00
d90ae8012a Add support for new languages in the language selector 2012-10-20 15:59:22 +02:00
89cf271024 Add new languages to the Unix build script 2012-10-20 15:47:40 +02:00
11d3783195 Add Afrikaans, Asturian, Danish, Gujarati, Hebrew, Indonesian, Kinyarwanda translations from the XChat Translation Project 2012-10-20 15:45:53 +02:00
725d03477f Update bundled ISO 3166 codes 2012-10-20 15:43:35 +02:00
084fa55b81 Update French translation 2012-10-19 23:59:07 +02:00
5915d3b4bd Regenerate L10n once moar (last time I hope) 2012-10-19 22:55:12 +02:00
fb7a6d9206 Update FAQ to reflect L10n changes 2012-10-19 22:11:21 +02:00
627f2220e4 Consistency FTW 2012-10-19 22:00:32 +02:00
5bc8b38826 Remove L10n test string from translations too 2012-10-19 21:59:54 +02:00
033ebcfee1 Remove L10n test string 2012-10-19 21:53:34 +02:00
85779e102c Replace email address 2012-10-19 21:33:16 +02:00
6661efde87 Add tutorial for managing Transifex 2012-10-19 21:31:11 +02:00
e85501bdff Update test strings in repo 2012-10-19 21:27:58 +02:00
1215336b2d Add L10n test string 2012-10-19 21:14:20 +02:00
aa54d0a8c1 Add Transifex config and update translations from the online resource 2012-10-19 20:58:44 +02:00
1f3a1f81c0 Update translations 2012-10-19 20:08:20 +02:00
d5477a81d6 Reorganize the Appearance tab 2012-10-19 19:37:10 +02:00
31242c94de Update Hungarian translation 2012-10-19 00:40:32 +02:00
0fe70aa212 Update translations 2012-10-19 00:38:30 +02:00
ff2f121d8a Add Nynorsk language 2012-10-19 00:34:47 +02:00
3fba4d508d Update Hungarian translation 2012-10-19 00:16:48 +02:00
dd21f8635b Update translations 2012-10-19 00:01:56 +02:00
cd21d1b623 Get rid of saveconf remnants, we save automatically 2012-10-18 23:55:47 +02:00
41e4b3a59c Add notes 2012-10-18 23:26:13 +02:00
3c5100510f Separate correctly the Win32-only code 2012-10-18 23:26:06 +02:00
9abfecf05e Hardcoded dropdown menu for language selection 2012-10-18 22:57:55 +02:00
b686a24d3b Add function for listing subdirs 2012-10-18 20:09:15 +02:00
06226c0799 Update win32 dirent.h implementation and use header instead of static library 2012-10-18 18:24:20 +02:00
e3a21d34b4 Add missing include 2012-10-18 17:54:03 +02:00
5acd848f79 Initial version of language selector GUI 2012-10-18 16:34:40 +02:00
4732505e30 Merge pull request #171 from ujdhesa/patch-1
Update po/sq.po
2012-10-18 01:30:54 -07:00
87522eb03d Update po/sq.po
Substituting more Xchat recurrences
2012-10-18 00:39:50 +03:00
c17005a9fe Merge pull request #170 from ujdhesa/master
Update for Albanian (sq) locale
2012-10-17 10:02:11 -07:00
6cc553f22e Update po/sq.po 2012-10-17 13:36:18 +03:00
d318d78b14 Remove accidentally included .mo file and don't let it ever happen again 2012-10-15 21:26:57 +02:00
1b2affc750 Update Hungarian translation against current HEAD 2012-10-15 21:24:49 +02:00
99022a91d9 Huge commit is huge - update translations 2012-10-15 20:21:20 +02:00
d61a3ff08c Add translation template 2012-10-15 20:21:02 +02:00
98701e3d6b Update .gitignore for L10n 2012-10-15 20:18:00 +02:00
c19fc07b9b Print previous value after /SET 2012-10-15 16:01:26 +02:00
13449c282a Reformat the /SET code 2012-10-15 16:00:07 +02:00
32eeec02ff Remove deprecated .desktop entry 2012-10-15 14:31:27 +02:00
831794e150 Only omit alerts when we're actually away 2012-10-15 13:46:23 +02:00
e8f7653cf0 Add SwiftIRC 2012-10-15 10:40:39 +02:00
c395a929e1 Merge pull request #162 from blasphemy/rebrand
rebrand
2012-10-15 01:27:45 -07:00
a62b033cb5 rebrand 2012-10-14 21:29:13 -04:00
de1a2a7b33 Version bump 2012-10-14 00:58:54 +02:00
bc4d4f6536 Fix misspelled words 2012-10-13 22:55:35 +02:00
84c536e4ea Compatibility for Automake 1.12.4+ 2012-10-13 22:26:35 +02:00
4482f8d1f5 Cosmetics 2012-10-13 20:59:52 +02:00
68e795a595 Accept license agreement by default 2012-10-13 18:55:43 +02:00
c01ee90ef6 Provide builtin defauls for treeview icons 2012-10-13 15:31:25 +02:00
f7013f70a5 By default, use pure white background color and use background color for UI elements 2012-10-13 14:13:58 +02:00
cf78762b69 Some HexChat-Text rebranding work left 2012-10-13 13:05:01 +02:00
b67b223c26 Add option to omit alerts when marked as being away 2012-10-13 12:38:01 +02:00
0ec02c13c7 Make beep consistent with other alerts 2012-10-13 11:53:39 +02:00
05b6e0b330 By default, use <config>/downloads for DCC file transfers when in portable mode 2012-10-13 10:49:29 +02:00
dfd4828ad2 Fix opening folders in portable mode 2012-10-13 10:26:32 +02:00
6f1185c00e get_xdir_fs() cleanup 2012-10-13 10:14:34 +02:00
ca3fa043f0 Save URLs to disk on-the-fly and provide an option for toggling it 2012-10-13 10:03:39 +02:00
d4f3738ca8 This does not belong here 2012-10-13 08:45:41 +02:00
cbd72ff455 Get rid of auto_save, we always want to save 2012-10-13 08:43:57 +02:00
dbef9c9eb4 Speed up Non-BMP filtering 2012-10-13 07:06:38 +02:00
902063d932 Get rid of some hardcoding 2012-10-13 06:17:27 +02:00
d20daad417 Implement /ADDSERVER 2012-10-13 06:03:14 +02:00
de7a4aee31 Make identd check easier to read 2012-10-13 04:25:39 +02:00
b43e567dbf Show user name sent by identd 2012-10-13 04:19:56 +02:00
77fb21c5d5 Merge pull request #142 from RichardHitt/master
Fix "Fix URL Detection"
2012-10-08 13:29:38 -07:00
5f60820eba Fix "Fix URL detection". First-character test in linux should be for
equal, rather than not-equal.  If first character is a slash return
WORD_PATH.
2012-10-08 12:20:11 -07:00
8df11c030c Fix Wikipedia URL detection - URLs inside parentheses won't work 2012-10-07 13:27:44 +02:00
59f32ccb3a Fix URL detection 2012-10-07 03:00:52 +02:00
b4e78e0455 Add SSL port to freenode 2012-10-06 16:49:11 +02:00
86596d080d Add Fusion Latina and IRCHighWay 2012-10-06 16:44:31 +02:00
151bee59f0 Update NSS-WDK patch for NSS 3.13.6 2012-10-06 01:14:51 +02:00
3b8d2aeca8 Fix mpcInfo-xp not using the WDK toolset 2012-10-05 12:21:08 +02:00
003fa2dcc5 Ignore Mono built HTM 2012-10-05 01:17:31 +02:00
89bee16e56 Version bump 2012-10-05 00:41:53 +02:00
2f09db1d4f Fix operator precedence oversight (AND vs OR) 2012-10-05 00:30:35 +02:00
afe16e7bb7 Nasty copy-paste problem 2012-10-05 00:24:21 +02:00
fb2413793c Install SASL plugin by default 2012-10-05 00:16:37 +02:00
aaa19466d6 Add Mono project for HTM 2012-10-04 23:44:55 +02:00
02fd5a2aff Enable timestamps by default and change default format to include seconds 2012-10-04 22:12:14 +02:00
24de2899ec Add libwimp and libpixmap makefiles, don't work yet though 2012-10-04 21:41:20 +02:00
ae2cfa16d9 Add project for generating text events 2012-10-04 21:07:26 +02:00
3b19fe1374 Generate a new upgrade code for vs2012 platform toolset so that both can be installed simultaneously 2012-10-04 20:33:23 +02:00
82debac62d No registry keys for WDKPT 2012-10-04 20:24:16 +02:00
7bbe6d4eab Provide sources for both platform toolset 2012-10-04 20:15:23 +02:00
cc903db727 Add scripts for building the spelling dictionaries SFX 2012-10-04 19:57:15 +02:00
5af19dfb64 Remove unused references 2 (TingPing) 2012-10-04 19:03:09 +02:00
ff6e1ef94a Remove unused references (TingPing) 2012-10-04 19:02:36 +02:00
2ea1b492d5 Merge pull request #102 from Arnavion/allow-configure-libproxy
Allow user to enable or disable libproxy support explicitly
2012-10-04 07:22:04 -07:00
33e0840294 Add support for backslash as drive root for full path logs 2012-10-04 15:42:44 +02:00
df6e3fd953 Add note about special folder 2012-10-04 14:53:55 +02:00
723486913f Fix HTM config dir handling both on Windows and Unix 2012-10-04 14:51:00 +02:00
94c525eee9 Fix for erroneous full path check 2012-10-03 23:18:10 +02:00
e5b230b0cd Fix WinSys compilation without WDK 2012-10-03 21:13:05 +02:00
b797a899c8 Use multiprocessor compilation for GTK+, otherwise it's waaay too slow 2012-10-03 21:00:32 +02:00
288e0ccbdd Fix the remaining path breakages after the downgrade 2012-10-03 20:51:44 +02:00
981c7b9482 Now really finish the reversion 2012-10-03 18:54:15 +02:00
018e32e693 Nuke the remnants of the nonbmp plugin 2012-10-03 18:29:22 +02:00
90db7e85c2 Complete the VS2010 reversion 2012-10-03 18:26:48 +02:00
8131d66da7 Unified copy for xp solution too 2012-10-03 18:23:03 +02:00
f039a4264d Fix solution versions 2012-10-03 17:54:06 +02:00
12c7600024 Get rid of useless .exp files 2012-10-03 16:35:10 +02:00
4b699210bd Move license files to share\doc 2012-10-03 16:31:24 +02:00
73282c2d6c Fix libxml2 path according to VS downgrade 2012-10-03 15:49:06 +02:00
5b8491846d Fix platform toolset for certain projects in legacy solution 2012-10-03 13:52:31 +02:00
da46225034 Revert to VS2010 part4 2012-10-03 13:50:31 +02:00
9fd15ec990 Revert to VS2010 part3 2012-10-03 13:46:24 +02:00
ae602d4428 Revert to VS2010 part2 2012-10-03 13:36:07 +02:00
e2c532c679 Revert to VS2010 part1 2012-10-03 13:29:56 +02:00
822715856e Update GIMPNet name and servers 2012-10-03 11:29:59 +02:00
a3b2a203e7 Update default URL grabber limit 2012-10-02 22:03:15 +02:00
c80858f919 Merge pull request #115 from RichardHitt/master
Fix memory leak related to url grabbing
2012-10-02 13:02:17 -07:00
6e3efe2622 Remove another WDK-only thing 2012-10-02 20:43:14 +02:00
0986891a66 Add NLS to GTK+ 2012-10-02 20:38:08 +02:00
ca65aa7edc Fix copying 2012-10-02 20:11:52 +02:00
3cca76f051 Fix build path 2012-10-02 19:47:07 +02:00
3b38ad4d80 Fix NLS generation 2012-10-02 19:46:57 +02:00
d5b272b0c8 These directives were only required for the WDK 2012-10-02 19:38:07 +02:00
ccd2fd6c77 Update dependency extractor scripts 2012-10-02 19:17:48 +02:00
caa270922f Fix release path for HTM, C# projects don't support property sheets to use a separate xp project instead 2012-10-02 18:47:03 +02:00
1d7773f735 Use explicit project names, output filenames depend on them 2012-10-02 18:40:23 +02:00
e9e0c59065 Fix intl lib name for xp solution 2012-10-02 18:33:30 +02:00
78cbceee4e Remove the last 2 remnants too 2012-10-02 18:29:11 +02:00
63a47f0135 Update old xp copy project too 2012-10-02 18:26:34 +02:00
9b5766c46b Update gitignore to reflect recent changes 2012-10-02 18:22:29 +02:00
de70630cef Oops, wrong find'n'replace 2012-10-02 18:21:16 +02:00
75fa95d3a3 Fix xp deps path 2012-10-02 18:16:18 +02:00
567270d5a7 Remove hardcoding as much as possible 2012-10-02 18:15:49 +02:00
24aad3fecf Move copy part to property sheet part 1 2012-10-02 16:42:06 +02:00
c342b29f77 Use new GTK+ path and fix intl lib name 2012-10-02 16:06:29 +02:00
ab2d0b736c Change platform toolset to Visual Studio 2012 2012-10-02 16:05:20 +02:00
a57a7d3f88 Add XP (WDK) solution as a fallback option 2012-10-02 16:00:13 +02:00
47193043a7 Add Enchant build scripts 2012-10-02 14:35:59 +02:00
149dc70821 Add GTK+ solution and release scripts 2012-10-02 13:53:54 +02:00
42c523bf3c Pango depends on HarfBuzz after 1.30.x 2012-10-02 13:04:56 +02:00
0a68629dae Add Pango solution and release scripts 2012-10-02 12:59:27 +02:00
93039b3305 Remove unistd.h stub 2012-10-02 10:59:46 +02:00
189e4168cb Fix Fontconfig unistd.h inclusion 2012-10-02 10:54:19 +02:00
94ad6dc012 Add cairo solution, release scripts and patches 2012-10-02 10:26:01 +02:00
2d2afd9a59 Add license for libpng releases 2012-10-02 10:12:37 +02:00
f22979bafb Cosmetics 2012-10-02 10:02:57 +02:00
62903cd171 Fix memory leak related to url grabbing 2012-10-01 12:53:25 -07:00
9c3ea36483 Add Pixman solution and release scripts 2012-10-01 16:25:02 +02:00
f618f914cd Use win-iconv for Fontconfig 2012-10-01 15:43:19 +02:00
5a5c1798aa Add Fontconfig release scripts 2012-10-01 14:08:20 +02:00
67c9bdb289 This is not required anymore, Fontconfig depends on libxml2 already 2012-10-01 10:42:01 +02:00
1694825ed8 Expat can be replaced with libxml2, 1 dependency less 2012-10-01 10:40:27 +02:00
77f953364d Add Fontconfig solution 2012-10-01 10:38:44 +02:00
73008387e8 Add GDK-PixBuf solution and release scripts 2012-09-30 22:22:49 +02:00
db88a34c52 Cosmetics 2012-09-30 22:22:26 +02:00
6637e3c922 Add missing includes to distribution 2012-09-30 22:12:02 +02:00
e7e0eda15b Add suffix for GLib DLLs 2012-09-30 21:41:46 +02:00
d6c13e0f89 Add ATK solution and release scripts 2012-09-30 21:41:34 +02:00
f8c7152785 Add GLib solution and release scripts 2012-09-30 20:16:39 +02:00
d168882a32 Add libpng solution and release scripts 2012-09-30 19:33:46 +02:00
b192eecee2 Note to self 2012-09-30 18:08:52 +02:00
b451ebc94f Add libffi build scripts and patch for borked mozilla-build script 2012-09-30 18:04:45 +02:00
5873bf9e5d Add OpenSSL build scripts 2012-09-30 17:20:18 +02:00
ab9b121ff5 Fix path for deps 2012-09-30 16:59:11 +02:00
08634733d2 Move stuff to mozilla-build, OpenSSL and GTK+ don't like spaces 2012-09-30 16:55:32 +02:00
19fdfa14df Add Lua build scripts 2012-09-30 15:45:34 +02:00
70cd723e2c Merge pull request #108 from TingPing/python
Use proper version number for python module attribute
2012-09-29 06:16:48 -07:00
8fc45171c5 Use proper version number for module attribute 2012-09-29 02:55:33 -03:00
ce75a6034f Limit the number of URLs to keep and add GUI options for it 2012-09-29 01:54:11 +02:00
dd7a82e3b2 Enchant depends on GLib 2012-09-29 00:36:08 +02:00
064b020424 Pixman already depends on libpng 2012-09-28 23:04:03 +02:00
b3d00a8dc0 Add gettext-runtime build scripts and patches 2012-09-28 22:27:58 +02:00
179a1db89a Copy-paste is bad 2012-09-28 22:10:20 +02:00
9818573975 Add libxml2 solution and release scripts 2012-09-28 21:01:59 +02:00
cd832c048f Pixman depends on libpng 2012-09-28 20:29:27 +02:00
94289ca5f7 libxml2 depends on win-iconv 2012-09-28 20:06:48 +02:00
5f8ab3ce13 It's actually called libxml2 2012-09-28 19:52:01 +02:00
d3ceaa723d Add FreeType solution and release scripts 2012-09-28 19:41:56 +02:00
50bf1b5959 Add Expat solution and release scripts 2012-09-28 18:53:53 +02:00
f816bd4d71 Add win-iconv build scripts 2012-09-28 18:05:49 +02:00
b783207bca Remove package before creating a new one 2012-09-28 18:05:33 +02:00
7d0a175dc2 Some more zlib cosmetics and x64 build script 2012-09-28 17:19:49 +02:00
a6c7598a2f Fix zlib license file name 2012-09-28 17:17:09 +02:00
2ea5dc60d5 zlib build script cosmetics 2012-09-28 17:16:48 +02:00
a738892ad1 Add zlib build script 2012-09-28 13:41:21 +02:00
00fbf43584 KISS! 2012-09-28 01:48:42 +02:00
a07011007f Save URL lists in config dir by default 2012-09-28 01:04:53 +02:00
2f237427ee Add dependency graph 2012-09-25 17:01:39 +02:00
2c2419f230 Add strlcat() and strlcpy(), might convert to them in the future 2012-09-24 02:39:52 +02:00
3f9c918b86 Allow user to enable or disable libproxy support explicitly using --enable-libproxy or --disable-libproxy 2012-09-24 07:35:50 +08:00
ba0bcc9214 Update Python and Perl descriptions 2012-09-23 23:45:15 +02:00
198e913ea9 Get rid of some useless notes 2012-09-23 23:37:04 +02:00
f586659f00 HexChat does run on Windows 2012-09-23 23:32:25 +02:00
5112e1b669 Add 2 new networks and fix some sorting 2012-09-23 23:17:20 +02:00
60696af03d Fix syntax error, remove extra parenthesis 2012-09-22 22:09:38 +02:00
10e6774f0e Allow full path for logs, actually it can be determined quite reliably 2012-09-22 22:03:42 +02:00
bc7eac560f Force relative path for logs, for full path you can still use symlinks anyway 2012-09-22 20:32:52 +02:00
cc694ad473 Merge pull request #98 from blasphemy/Ignore
no highlights for some more annoying nicks
2012-09-22 09:44:42 -07:00
4d47120863 AC_MSG_RESULT cleanup up part 3 (Arnavion) 2012-09-22 17:36:38 +02:00
f1c978475c AC_MSG_RESULT cleanup part 2 2012-09-22 17:15:57 +02:00
5009ceb190 PKG_CHECK_MODULES displays the output automatically, omit AC_MSG_RESULT (Arnavion) 2012-09-22 16:49:10 +02:00
0515aabc66 Merge pull request #96 from Arnavion/fix-broken-defines
Broken #defines after autoconf + configure due to misbehaving AS_AC_EXPAND macro
2012-09-22 07:12:44 -07:00
55ae7ed0f2 no highlights for some more annoying nicks 2012-09-21 14:59:50 -04:00
241e3bf566 Some rebranding work left 2012-09-20 22:47:44 +02:00
e6a0532fc2 On my system (openSUSE 12.2 / GNU bash, version 4.2.24(1)-release (x86_64-suse-linux-gnu) ), the shell doesn't like that the '=' character in 'if test...' doesn't have spaces around it. This causes the test to always be true, and thus the AS_AC_EXPAND macro only expands once. This led to two #define's in config.h containing broken values: HEXCHATSHAREDIR and DBUS_SERVICES_DIR. 2012-09-20 22:04:14 +08:00
b6ba409bce Open links with just left click by default 2012-09-16 11:53:19 +02:00
12294a3729 Fix indentation and update platform toolset installer 2012-09-16 00:29:22 +02:00
e173eed437 Force 5.x subsystem globally 2012-09-16 00:11:21 +02:00
2fc7047873 Remove "Full" installation option, most people blindly install things they don't need nor know how to use 2012-09-15 23:08:20 +02:00
e3452ce330 Fix filename and generate new product code for the new platform toolset 2012-09-15 22:15:53 +02:00
6942d2b4b1 Update solution to Visual Studio 2012 Express and get rid of mpcInfo 2012-09-15 21:52:47 +02:00
94065e3fe0 Update platform toolset installer too 2012-09-15 20:40:37 +02:00
dc6a9bc5b3 Update platform toolsets for Visual Studio 2012 2012-09-15 20:31:07 +02:00
50d287a12d Disable running WHO after joining channel by default 2012-09-15 01:50:59 +02:00
28b7ba80e9 Move python docs 2012-09-14 17:02:49 +02:00
ce4bb62df7 Merge pull request #94 from TingPing/python
Added Python Documentation
2012-09-14 07:57:23 -07:00
a223437189 Updated Python Docs 2012-09-14 09:01:28 -04:00
8eac2f0147 Added Python Documentation 2012-09-14 08:06:22 -04:00
78419d5ab3 Merge pull request #92 from TingPing/python
Added pluginpref to the python plugin.
2012-09-13 07:28:08 -07:00
eace2397e6 Reorganized if statement. 2012-09-13 02:19:53 -04:00
db4b665cd3 bumped python plugin version. 2012-09-13 02:00:36 -04:00
f7a227c488 Added pluginpref to the python plugin. 2012-09-13 01:56:47 -04:00
4d63830f66 Add EsperNet - the server list really needs a rewrite btw, IFDEFs are ugly 2012-09-09 14:36:21 +02:00
8cf6d493c6 Fix unchecked malloc 2012-09-05 11:44:52 +02:00
6e5c314e61 Don't make a numeric equation between chars (openSUSE) 2012-09-02 18:08:25 +02:00
511e72d936 README cosmetics 2012-09-02 13:32:08 +02:00
279009bb20 Consistency for the other Advanced pane too 2012-09-02 04:46:48 +02:00
d754200b42 Merge pull request #68 from RichardHitt/master
Enhance LASTLOG to use gtk_xtext_search_textentry()
2012-09-01 13:29:11 -07:00
1a102d9bff Some more consistency for variable names 2012-09-01 21:43:19 +02:00
4627b05089 Be consistent in Preferences 2012-09-01 21:40:56 +02:00
4f887a1e53 Consolidate color stripping for messages, topic and scrollback 2012-09-01 21:38:00 +02:00
fb00928c9d Add Chat4all network 2012-09-01 17:01:01 +02:00
c563d70aed Make sure HexChat won't run in portable mode if the user doesn't select it 2012-09-01 16:50:48 +02:00
c1dde82389 Make gtkrc a component so that users can preserve their theme settings between upgrades 2012-09-01 16:32:50 +02:00
a6f9b6d5a4 Add Unifont to the default list of alternative fonts 2012-09-01 16:12:40 +02:00
ed034bf80a Enhance LASTLOG to use gtk_xtext_search_textentry() 2012-08-28 19:10:03 -07:00
b7f5f045c6 Fix linking against gmodule 2012-08-23 16:27:34 +02:00
2ca267d1c8 Merge pull request #43 from flotwig/patch-4
reordered snoo because i dunno my ABC's
2012-08-05 23:38:03 -07:00
868408ff3d reordered snoo because i dunno my ABC's 2012-08-06 00:22:25 -03:00
c707be1f70 Merge pull request #42 from flotwig/patch-3
added Snoonet, 600+ user net
2012-08-05 20:10:51 -07:00
9279a470db fixen snoonet ssl 2012-08-06 00:05:51 -03:00
7bff15a31a Merge pull request #41 from flotwig/patch-2
fixed ban message to reflect the correct channel
2012-08-05 19:54:48 -07:00
3518486a89 added Snoonet, 600+ user net 2012-08-05 23:51:24 -03:00
74c143a8b7 fixed ban message to reflect the correct channel 2012-08-05 23:48:24 -03:00
6b383ec134 Avoid inline declarations 2012-08-01 20:12:47 +02:00
c401817d51 Load custom icons from <config>/icons 2012-08-01 19:49:12 +02:00
ea96ffc154 Fix port number for EntropyNet 2012-07-31 11:44:14 +02:00
27227d54c7 Add Windfyre to the Network List 2012-07-31 11:41:07 +02:00
ec2b68bb98 Add EntropyNet to the Network List 2012-07-31 11:38:08 +02:00
6a5c089728 Remove dead networks from the Network List 2012-07-31 11:33:15 +02:00
08a3bb537b Merge pull request #31 from Joah/master
Update src/common/servlist.c with AlphaChat IRC Network
2012-07-31 01:48:36 -07:00
0242b706e0 Use 6697 for SSL connections by default
http://blog.freenode.net/2011/02/port-6697-irc-via-tlsssl/
2012-07-31 09:20:20 +02:00
8c3cdb8b06 Update src/common/servlist.c
Added the AlphaChat IRC network (http://www.alphachat.net), a ~300 user network that runs ShadowIRCd and Atheme services with leaves in North America, Europe, Australia, and South Africa.
2012-07-30 21:44:00 -03:00
dd1d5f8e6a Add missing include 2012-07-30 18:48:45 +02:00
303038e24f Use a more appropriate icon in a more appropriate size 2012-07-30 18:45:21 +02:00
835820b2f5 Fix compilation on Red Hat (Phr33d0m) 2012-07-30 16:05:34 +02:00
39fe57d15e Merge pull request #24 from tobbi/master
Typo fixes and more translations for German (de-DE)
2012-07-29 23:39:17 -07:00
43e89281ea Several German fixes and some further translations
Typo fixes and more translations
2012-07-29 22:54:35 +03:00
a891ffe420 Merge pull request #18 from luminoso/patch-1
Update src/common/servlist.c
2012-07-29 03:57:51 -07:00
2421fbc4f2 Update src/common/servlist.c
PTlink Portuguese IRC server is dead for a few years and there is a new server for PTnet.
There is also SSL support and one ipv6-only server, but I'm not sure about the best way to add it to this list.
2012-07-27 18:11:45 +02:00
445 changed files with 213710 additions and 136002 deletions

21
.gitignore vendored
View File

@ -7,36 +7,48 @@ Makefile.in
aclocal.m4
autom4te.cache/
compile
confdefs.h
conftest
conftest.c
conftest.err
config.guess
config.h.in
config.h
config.log
config.status
config.sub
configure
configure.tmp
depcomp
install-sh
intl/
libtool
ltmain.sh
m4/
missing
plugins/perl/irc.pm.h
plugins/perl/xchat.pm.h
po/Makefile.in.in
po/POTFILES
po/hexchat.pot
po/remove-potcdate.sed
po/stamp-po
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/textenums.h
src/common/textevents.h
src/fe-gtk/hexchat
src/fe-text/hexchat-text
src/htm/thememan.exe
stamp-h1
*.a
*.o
*.la
*.lo
*.gmo
*.mo
*.po~
# Win32 generated files
plugins/wmpa/wmpa_h.h
@ -44,9 +56,10 @@ plugins/wmpa/wmpa_i.c
src/pixmaps/inline_pngs.h
src/htm/obj/*
win32/build/*
win32/build-xp/*
win32/ipch/*
win32/hexchat.opensdf
win32/hexchat.sdf
win32/hexchat.suo
resource.h
*.opensdf
*.sdf
*.suo
*.user

9
.tx/config Normal file
View File

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

41
.tx/howto.txt Normal file
View File

@ -0,0 +1,41 @@
More info: http://help.transifex.com/features/client/index.html
1) To initialize a new project on Transifex:
# tx init
# tx set --auto-local -r hexchat.main "po\<lang>.po" --source-lang en --source-file po\hexchat.pot --execute
Append 'type = PO' to .tx\config without apostrophes
Push the resources to Transifex
# tx push --source --translation
2) To update online translations:
Regenerate the source file (hexchat.pot) on a Unix machine
# rm po/hexchat.pot && ./autogen.sh && ./configure --enable-nls && make
Push the updated source file to Transifex (this automatically updates all translation files)
# tx push --source
3) To update repo with online translations:
Update local copy with Transifex updates
# tx pull
Update GitHub repo
# git add po/
# git commit
# git push
4) To update just one translation with local changes:
# tx push --translation --language xy
Where xy is the language code

View File

@ -1,136 +0,0 @@
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}}
{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\lang1033\f0\fs20 GNU GENERAL PUBLIC LICENSE\par
\par
Version 2, June 1991\par
\par
Copyright (C) 1989, 1991 Free Software Foundation, Inc. \par
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\par
\par
Everyone is permitted to copy and distribute verbatim copies\par
of this license document, but changing it is not allowed.\par
\par
Preamble\par
\par
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.\par
\par
When we speak of free software, we are referring to freedom, 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 or use pieces of it in new free programs; and that you know you can do these things.\par
\par
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.\par
\par
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.\par
\par
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.\par
\par
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.\par
\par
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.\par
\par
The precise terms and conditions for copying, distribution and modification follow.\par
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\par
\par
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".\par
\par
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.\par
\par
1. You may copy and distribute verbatim copies of the Program's 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 give any other recipients of the Program a copy of this License along with the Program.\par
\par
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.\par
\par
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:\par
\par
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. \par
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. \par
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) \par
\par
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, 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 Program, 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.\par
\par
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 Program.\par
\par
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.\par
\par
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:\par
\par
a) 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; or, \par
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, \par
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) \par
\par
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, 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 executable. However, as a special exception, the source code 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.\par
\par
If distribution of executable or 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 counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.\par
\par
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program 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.\par
\par
5. 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 Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.\par
\par
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program 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 to this License.\par
\par
7. 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 Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program 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 Program.\par
\par
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.\par
\par
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.\par
\par
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.\par
\par
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program 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.\par
\par
9. The Free Software Foundation may publish revised and/or new versions of the 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.\par
\par
Each version is given a distinguishing version number. If the Program 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 Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.\par
\par
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, 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.\par
\par
NO WARRANTY\par
\par
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\par
\par
12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\par
END OF TERMS AND CONDITIONS\par
How to Apply These Terms to Your New Programs\par
\par
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.\par
\par
To do so, attach the following notices to the program. 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.\par
\par
one line to give the program's name and an idea of what it does.\par
Copyright (C) yyyy name of author\par
\par
This program is free software; you can redistribute it and/or\par
modify it under the terms of the GNU General Public License\par
as published by the Free Software Foundation; either version 2\par
of the License, or (at your option) any later version.\par
\par
This program is distributed in the hope that it will be useful,\par
but WITHOUT ANY WARRANTY; without even the implied warranty of\par
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\par
GNU General Public License for more details.\par
\par
You should have received a copy of the GNU General Public License\par
along with this program; if not, write to the Free Software\par
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\par
\par
Also add information on how to contact you by electronic and paper mail.\par
\par
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:\par
\par
Gnomovision version 69, Copyright (C) year name of author\par
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details\par
type `show w'. This is free software, and you are welcome\par
to redistribute it under certain conditions; type `show c' \par
for details.\par
\par
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.\par
\par
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:\par
\par
Yoyodyne, Inc., hereby disclaims all copyright\par
interest in the program `Gnomovision'\par
(which makes passes at compilers) written \par
by James Hacker.\par
\par
signature of Ty Coon, 1 April 1989\par
Ty Coon, President of Vice\par
\par
This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. \par
}

51
HACKING
View File

@ -1,51 +0,0 @@
Just some tips if you're going to help with HexChat code (patches etc):
* Use tabs, not spaces, to indent code.
* Use a tab size of 3 (most editors will let you choose this).
Type :set ts=3 in vim/gvim.
* Try to stick to the same consistant coding style:
void
routine (void)
{
if (function (a, b, c))
{
x = a + 1;
}
}
(vertically aligned braces, a space after if, while, functions etc).
* Don't use "//" C++ style comments, some compilers don't like them.
* When opening a file with unix level functions (open, read/write, close)
as opposed to the C-level functions (fopen, fwrite/fread, fclose), use
the OFLAGS macro. This makes sure it'll work on Win32 aswell as unix e.g:
fh = open ("file", OFLAGS | O_RDONLY);
* Use closesocket() for sockets, and close() for normal files.
* Don't read() from sockets, instead use recv().
* Please provide unified format diffs (run diff -u).
* Call your patch something more meaningfull than hexchat.diff (I get a
million of these files!).
* To make a really nice and clean patch, do something like this:
Have two directories, unpacked from the original archive:
hexchat-2.0.0/
hexchat-2.0.0p1/
Then edit/compile the hexchat-2.0.0p1 directory. When you're done, make
a patch with:
cd hexchat-2.0.0p1
make distclean
cd ..
diff -urN hexchat-2.0.0 hexchat-2.0.0p1 > hexchat-something.diff
If using nmake (Windows) replace "make distclean" with "nmake -f makefile.msc clean"

View File

@ -1,12 +1,13 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = po intl src plugins
SUBDIRS = po intl src plugins man
EXTRA_DIST = autogen.sh HACKING INSTALL.w32 faq.html hexchat.png \
hexchat.desktop hexchat.spec hexchat.ico
EXTRA_DIST = autogen.sh
icon_DATA = hexchat.png
icon_DATA = src/pixmaps/hexchat.png
icondir = $(datadir)/pixmaps
util_DATA = hexchat.desktop
util_DATA = share/misc/hexchat.desktop
utildir = $(datadir)/applications
ACLOCAL_AMFLAGS = -I m4

115
README
View File

@ -1,115 +0,0 @@
HexChat README
~~~~~~~~~~~~~
X-Chat ("xchat") Copyright (c) 1998-2010 By Peter Zelezny.
HexChat ("hexchat") Copyright (c) 2009-2012 By Berke Viktor.
This program is released under the GPL v2 with the additional exemption
that compiling, linking, and/or using OpenSSL is allowed. You may
provide binary packages linked to the OpenSSL libraries, provided that
all other requirements of the GPL are met.
See file COPYING for details.
For building instructions, see http://www.hexchat.org/developers/building
What is it?
~~~~~~~~~~~
HexChat is an IRC client for UNIX operating systems. I.R.C. is Internet
Relay Chat, see http://irchelp.org for more information about IRC in
general. HexChat runs on most BSD and POSIX compliant operating systems.
Requirements:
~~~~~~~~~~~~~
* GTK+ 2.10 (this is available at http://www.gtk.org)
* GLib 2.12 (GTK+ 2.10 requires GLib 2.12)
HexChat is known to work on, at least:
* Windows XP/Vista/7/8
* Linux
* FreeBSD
* OpenBSD
* NetBSD
* Solaris
* AIX
* IRIX
* DEC/Compaq Tru64 UNIX
* HP-UX 10.20 and 11
* MacOS X
Notes for packagers:
~~~~~~~~~~~~~~~~~~~~
If you need your packages to work on i386, you don't need to compile with
--disable-mmx, because it's also checked at run-time.
Python Scripts:
~~~~~~~~~~~~~~~
Scripts for 1.8.x are not compatible, and a brand new interface has be
written. Documentation can be found here: http://xchat.org/docs/.
Consider using the Python interface for your scripts, it's a very nice
API, allows for loading/unloading individual scripts, and gives you
almost all the features of the C-Plugin API.
Perl Scripts:
~~~~~~~~~~~~~
Perl 5.8 or newer is required.
Scripts for 1.8.x are compatible with the following exceptions:
* IRC::command will not interpret %C, %B, %U etc.
* user_list and user_list_short:
If a user has both op and voice, only the op flag will be 1.
* add_user_list/sub_user_list/clear_user_list
These functions do nothing.
* notify_list
Not implemented. Always returns an empty list.
* server_list
Lists servers that are not connected aswell.
* Some print events may have new names and some were added.
* Text printed by scripts must now be UTF8.
* Text passed to scripts (via add_message_handler) will be encoded in UTF8.
Autoloading Scripts and Plugins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The root of your HexChat config is:
* Windows: %APPDATA%\HexChat
* Unix: ~/.config/hexchat
Referred to as <config> from now. HexChat automatically loads, at startup:
* <config>/addons/*.lua Lua scripts
* <config>/addons/*.pl Perl scripts
* <config>/addons/*.py Python scripts
* <config>/addons/*.tcl Tcl scripts
* <config>/addons/*.dll Plugins (Windows)
* <config>/addons/*.so Plugins (Unix)
Control Codes:
~~~~~~~~~~~~~~
%% - A single percentage sign
%C - Control-C (mIRC color code)
%B - Bold Text
%U - Underline Text
%R - Reverse Text
%O - Reset all Text attributes
%XXX - ASCII XXX (where XXX is a decimal 3 digit number)
(Eg: %007 sends a BEEP)
%Cforeground,background will produce a color code, eg: %C03,10
These are now disabled by default (see Settings > Prefs > Input Box).
Instead you can insert the real codes via ctrl-k, ctrl-b and ctrl-o.

View File

@ -26,7 +26,7 @@ AC_DEFUN([AS_AC_EXPAND],
dnl loop until it doesn't change anymore
while true; do
new_full_var="`eval echo $full_var`"
if test "x$new_full_var"="x$full_var"; then break; fi
if test "x$new_full_var" = "x$full_var"; then break; fi
full_var=$new_full_var
done

View File

@ -19,7 +19,7 @@ else
AUTOMAKE="automake-1.9"
ACLOCAL="aclocal-1.9"
else
echo "automake missing or too old. This requires atleast automake 1.9"
echo "automake missing or too old. This requires at least automake 1.9"
exit 1
fi
fi
@ -90,7 +90,7 @@ if test "$?" != "0"; then
exit 4
fi
echo running $AUTOMAKE...
$AUTOMAKE -a --foreign
$AUTOMAKE -a
if test "$?" != "0"; then
echo automake failed, stopping.
exit 5

View File

@ -7,13 +7,12 @@
#define USE_IPV6
#define HAVE_ISO_CODES
#define PACKAGE_NAME "hexchat"
#define PACKAGE_VERSION "2.9.1"
#define XCHAT_REVISION "1521"
#define PACKAGE_VERSION "2.9.4"
#define HEXCHATLIBDIR "."
#define HEXCHATSHAREDIR "."
#define OLD_PERL
#define GETTEXT_PACKAGE "hexchat"
#define PACKAGE_TARNAME "hexchat-2.9.1"
#define PACKAGE_TARNAME "hexchat-2.9.4"
#ifndef USE_IPV6
#define socklen_t int
#endif

View File

@ -2,7 +2,7 @@
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2005 Free Software Foundation, Inc.
# Copyright 1996-2010 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@ -25,7 +25,7 @@
# 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 M$VC,
# All known linkers require a `.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
shrext=.so
@ -35,9 +35,19 @@ host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
# Code taken from libtool.m4's _LT_CC_BASENAME.
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
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
@ -48,13 +58,13 @@ else
wl='-Wl,'
;;
darwin*)
case "$cc_basename" in
case $cc_basename in
xlc*)
wl='-Wl,'
;;
esac
;;
mingw* | pw32* | os2*)
mingw* | cygwin* | pw32* | os2* | cegcc*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
@ -64,9 +74,15 @@ else
;;
newsos6)
;;
linux*)
linux* | k*bsd*-gnu)
case $cc_basename in
icc* | ecc*)
ecc*)
wl='-Wl,'
;;
icc* | ifort*)
wl='-Wl,'
;;
lf95*)
wl='-Wl,'
;;
pgcc | pgf77 | pgf90)
@ -78,12 +94,19 @@ else
como)
wl='-lopt='
;;
*)
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*)
wl='-Wl,'
;;
esac
;;
esac
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
sco3.2v5*)
rdos*)
;;
solaris*)
wl='-Wl,'
@ -91,11 +114,14 @@ else
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
sysv4 | sysv4.2uw2* | sysv4.3*)
wl='-Wl,'
;;
sysv4*MP*)
;;
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
wl='-Wl,'
;;
unicos*)
wl='-Wl,'
;;
@ -104,7 +130,7 @@ else
esac
fi
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
@ -112,7 +138,7 @@ hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
cygwin* | mingw* | pw32*)
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++.
@ -120,6 +146,10 @@ case "$host_os" in
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
;;
@ -127,8 +157,14 @@ 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
aix3* | aix4* | aix5*)
aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
@ -152,7 +188,7 @@ if test "$with_gnu_ld" = yes; then
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32*)
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'
@ -162,9 +198,20 @@ if test "$with_gnu_ld" = yes; then
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* | sysv5*)
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
@ -173,16 +220,23 @@ if test "$with_gnu_ld" = yes; then
ld_shlibs=no
fi
;;
sunos4*)
hardcode_direct=yes
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
ld_shlibs=no
;;
linux*)
*)
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
:
@ -191,10 +245,8 @@ if test "$with_gnu_ld" = yes; then
fi
;;
esac
if test "$ld_shlibs" = yes; then
# 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'
if test "$ld_shlibs" = no; then
hardcode_libdir_flag_spec=
fi
else
case "$host_os" in
@ -208,7 +260,7 @@ else
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
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.
@ -218,13 +270,14 @@ else
# 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].*|aix5*)
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
@ -236,7 +289,7 @@ else
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
hardcode_direct=yes
:
else
# We have old collect2
hardcode_direct=unsupported
@ -244,6 +297,7 @@ else
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
;;
esac
fi
# Begin _LT_AC_SYS_LIBPATH_AIX.
@ -278,7 +332,7 @@ else
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32*)
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
@ -291,7 +345,7 @@ else
if test "$GCC" = yes ; then
:
else
case "$cc_basename" in
case $cc_basename in
xlc*)
;;
*)
@ -314,7 +368,7 @@ else
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd* | kfreebsd*-gnu | dragonfly*)
freebsd* | dragonfly*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
@ -326,24 +380,25 @@ else
# but as the default location of the library.
hardcode_minus_L=yes
;;
hpux10* | hpux11*)
hpux10*)
if test "$with_gnu_ld" = no; then
case "$host_cpu" in
hppa*64*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=no
;;
ia64*)
hardcode_libdir_flag_spec='-L$libdir'
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
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.
@ -366,6 +421,7 @@ else
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'
@ -379,6 +435,9 @@ else
;;
esac
fi
else
ld_shlibs=no
fi
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
@ -397,8 +456,6 @@ else
fi
hardcode_libdir_separator=:
;;
sco3.2v5*)
;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
@ -427,14 +484,11 @@ else
ld_shlibs=yes
fi
;;
sysv4.2uw2*)
hardcode_direct=yes
hardcode_minus_L=no
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
;;
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
;;
sysv5*)
hardcode_libdir_flag_spec=
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'
@ -446,37 +500,55 @@ else
fi
# Check dynamic linker characteristics
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
# 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'
;;
aix4* | aix5*)
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*)
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*)
;;
kfreebsd*-gnu)
;;
freebsd*)
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
case $host_cpu in
ia64*)
shrext=.so
;;
@ -487,8 +559,13 @@ case "$host_os" in
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=
@ -505,41 +582,59 @@ case "$host_os" in
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux*)
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'
;;
sco3.2v5*)
rdos*)
;;
solaris*)
library_names_spec='$libname$shrext'
;;
sunos4*)
library_names_spec='$libname$shrext$versuffix'
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
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
@ -553,6 +648,12 @@ 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"

View File

@ -1,14 +1,17 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT([HexChat],[2.9.1],[http://www.hexchat.org/],[hexchat])
AC_INIT([HexChat],[2.9.4])
AC_PREREQ([2.60])
AC_COPYRIGHT([Copyright (C) 1998-2010 Peter Zelezny])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([configure.in])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.9 dist-bzip2 subdir-objects no-define])
AM_INIT_AUTOMAKE([1.11 dist-bzip2 subdir-objects no-define foreign])
AM_SILENT_RULES([yes])
AC_USE_SYSTEM_EXTENSIONS
AM_MAINTAINER_MODE
@ -26,7 +29,7 @@ GETTEXT_PACKAGE=hexchat
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
ALL_LINGUAS="am az be bg ca cs de el en_GB es et fi fr gl hi hu it ja kn ko lt lv mk ms nb nl no pa pl pt pt_BR ru sk sl sq sr sv th uk vi wa zh_CN zh_TW"
ALL_LINGUAS="af am ast az be bg ca cs da de el en_GB es et eu fi fr gl gu hi hu id it ja kn ko lt lv mk ml ms nb nl no pa pl pt pt_BR ru rw sk sl sq sr sv th uk vi wa zh_CN zh_TW"
AM_GNU_GETTEXT
dnl displaced from acconfig.h
@ -55,11 +58,9 @@ AH_VERBATIM([USING_LINUX],[#undef USING_LINUX])
AH_VERBATIM([socklen_t],[#undef socklen_t])
AH_VERBATIM([USE_DBUS],[#undef USE_DBUS])
AC_DEFINE([XCHAT_REVISION],["1521"],[XChat SVN Revision])
AC_PATH_PROG(sedpath, sed)
if test "_$sedpath" = _; then
AC_MSG_ERROR("Cannot find sed: I need it\!")
AC_MSG_ERROR(Cannot find sed: I need it!)
fi
AC_PATH_PROG(unamepath, uname)
@ -82,108 +83,118 @@ dnl ** configure switches ***********************************************
dnl *********************************************************************
AC_ARG_ENABLE(socks,
[ --enable-socks link with SOCKS5 library (default: no)],
[AS_HELP_STRING([--enable-socks],[link with SOCKS5 library (default: no)])],
socks=$enableval, socks=no)
AC_ARG_ENABLE(ipv6,
[ --enable-ipv6 enable IPv6 (default: no)],
[AS_HELP_STRING([--enable-ipv6],[enable IPv6 (default: no)])],
ipv6=$enableval, ipv6=no)
AC_ARG_ENABLE(xft,
[ --enable-xft enable use of Xft directly (default: no)],
[AS_HELP_STRING([--enable-xft],[enable use of Xft directly (default: no)])],
xft=$enableval, xft=no)
AC_ARG_ENABLE(openssl,
[ --enable-openssl[=PATH] enable use of openSSL],
[AS_HELP_STRING([--enable-openssl[=PATH]],[enable use of openSSL])],
openssl=$enableval, openssl=yes)
AC_ARG_ENABLE(gtkfe,
[ --disable-gtkfe disable building gtk frontend],
[AS_HELP_STRING([--disable-gtkfe],[disable building gtk frontend])],
gtkfe=$enableval, gtkfe=yes)
AC_ARG_ENABLE(textfe,
[ --enable-textfe build the text frontend (default: no)],
[AS_HELP_STRING([--enable-textfe],[build the text frontend (default: no)])],
textfe=$enableval, textfe=no)
dnl AC_ARG_ENABLE(gnome,
dnl [ --disable-gnome disable use of gnome],
dnl [AS_HELP_STRING([--disable-gnome],[disable use of gnome])],
dnl gnome=$enableval, gnome=yes)
AC_ARG_ENABLE(xlib,
[ --disable-xlib disable use of xlib (for non X11 systems)],
[AS_HELP_STRING([--disable-xlib],[disable use of xlib (for non X11 systems)])],
xlib=$enableval, xlib=yes)
AC_ARG_ENABLE(python,
[ --disable-python don't build the python plugin],
[AS_HELP_STRING([--disable-python],[don't build the python plugin])],
python=$enableval, python=yes)
AC_ARG_ENABLE(perl,
[ --disable-perl don't build the perl plugin],
[AS_HELP_STRING([--disable-perl],[don't build the perl plugin])],
perl=$enableval, perl=yes)
AC_ARG_ENABLE(perl_old,
[ --disable-perl_old no backwards compatibility for perl plugin],
[AS_HELP_STRING([--disable-perl_old],[no backwards compatibility for perl plugin])],
perl_old=$enableval, perl_old=yes)
AC_ARG_ENABLE(tcl,
[ --enable-tcl[=PATH] directory with Tcl config file: tclConfig.sh],
[AS_HELP_STRING([--enable-tcl[=PATH]],[directory with Tcl config file: tclConfig.sh])],
tcl=$enableval, tcl=yes)
AC_ARG_ENABLE(plugin,
[ --disable-plugin disable plugin support],
[AS_HELP_STRING([--disable-plugin],[disable plugin support])],
plugin=$enableval, plugin=yes)
AC_ARG_ENABLE(checksum,
[ --disable-checksum disable the Checksum plugin],
[AS_HELP_STRING([--disable-checksum],[disable the Checksum plugin])],
checksum=$enableval, checksum=yes)
AC_ARG_ENABLE(doat,
[ --disable-doat disable the Do At plugin],
[AS_HELP_STRING([--disable-doat],[disable the Do At plugin])],
doat=$enableval, doat=yes)
AC_ARG_ENABLE(fishlim,
[ --disable-fishlim disable the FiSHLiM plugin],
[AS_HELP_STRING([--disable-fishlim],[disable the FiSHLiM plugin])],
fishlim=$enableval, fishlim=yes)
AC_ARG_ENABLE(sasl,
[ --disable-sasl disable the SASL plugin],
sasl=$enableval, sasl=yes)
dnl AC_ARG_ENABLE(sasl,
dnl [AS_HELP_STRING([--disable-sasl],[disable the SASL plugin])],
dnl sasl=$enableval, sasl=yes)
AC_ARG_ENABLE(sysinfo,
[AS_HELP_STRING([--disable-sysinfo],[disable the SysInfo plugin])],
sysinfo=$enableval, sysinfo=yes)
AC_ARG_ENABLE(dbus,
[ --disable-dbus disable DBUS support],
[AS_HELP_STRING([--disable-dbus],[disable DBUS support])],
dbus=$enableval, dbus=yes)
AC_ARG_ENABLE(libnotify,
[ --disable-libnotify disable libnotify support],
[AS_HELP_STRING([--disable-libnotify],[disable libnotify support])],
libnotify=$enableval, libnotify=yes)
AC_ARG_ENABLE(mmx,
[ --disable-mmx disable MMX assembly routines],
[AS_HELP_STRING([--disable-mmx],[disable MMX assembly routines])],
mmx=$enableval, mmx=yes)
AC_ARG_ENABLE(shm,
[ --enable-shm enable use of XShm for fast tinting (default: no)],
[AS_HELP_STRING([--enable-shm],[enable use of XShm for fast tinting (default: no)])],
shm=$enableval, shm=no)
AC_ARG_ENABLE(spell,
[ --enable-spell=type enable spelling type: none static libsexy gtkspell],
[AS_HELP_STRING([--enable-spell=type],[enable spelling type: none static libsexy gtkspell])],
spell=$enableval, spell=static)
AC_ARG_ENABLE(ntlm,
[ --enable-ntlm enable Microsoft's NTLM auth (libntlm) library support (default: no)],
[AS_HELP_STRING([--enable-ntlm],[enable Microsoft's NTLM auth (libntlm) library support (default: no)])],
ntlm=$enableval, ntlm=no)
AC_ARG_ENABLE(libproxy,
[AS_HELP_STRING([--disable-libproxy],[disable libproxy support (default: auto)])],
libproxy=$enableval, libproxy=auto)
dnl *********************************************************************
dnl ** GLIB *************************************************************
dnl *********************************************************************
AM_PATH_GLIB_2_0(2.12.0, glib=yes, glib=no)
if test "$glib" = no; then
AC_MSG_ERROR("Cannot find glib")
AC_MSG_ERROR(Cannot find GLib!)
fi
COMMON_CFLAGS="$GLIB_CFLAGS"
COMMON_LIBS="$GLIB_LIBS"
COMMON_LIBS="$COMMON_LIBS -lgmodule-2.0"
dnl *********************************************************************
dnl ** GTK **************************************************************
@ -460,14 +471,20 @@ dnl *********************************************************************
dnl ** LIBPROXY *********************************************************
dnl *********************************************************************
PKG_CHECK_MODULES([LIBPROXY], [libproxy-1.0], [libproxy=yes], [
AC_MSG_RESULT(no)
libproxy=no
])
if test "x$libproxy" = "xyes" ; then
if test "x$libproxy" = "xyes" -o "x$libproxy" = "xauto" ; then
PKG_CHECK_MODULES([LIBPROXY], [libproxy-1.0], [
COMMON_LIBS="$COMMON_LIBS $LIBPROXY_LIBS"
COMMON_CFLAGS="$COMMON_CFLAGS $LIBPROXY_CFLAGS"
AC_DEFINE(USE_LIBPROXY)
libproxy=yes
], [
if test "x$libproxy" = "xyes" ; then
AC_MSG_ERROR(Cannot find libproxy!)
fi
libproxy=no
])
else
libproxy=no
fi
dnl *********************************************************************
@ -562,14 +579,29 @@ dnl *********************************************************************
dnl ** SASL *************************************************************
dnl *********************************************************************
if test "$sasl" != "no"; then
AC_MSG_CHECKING(for plugin interface used by SASL)
sasl=no
dnl if test "$sasl" != "no"; then
dnl AC_MSG_CHECKING(for plugin interface used by SASL)
dnl sasl=no
dnl if test "$plugin" = yes; then
dnl sasl=yes
dnl AC_MSG_RESULT([yes])
dnl else
dnl AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for SASL])
dnl fi
dnl fi
dnl *********************************************************************
dnl ** SYSINFO **********************************************************
dnl *********************************************************************
if test "$sysinfo" != "no"; then
AC_MSG_CHECKING(for plugin interface used by SysInfo)
if test "$plugin" = yes; then
sasl=yes
AC_MSG_RESULT([yes])
PKG_CHECK_MODULES(LIBPCI, libpci >= 3.0.0, [sysinfo=yes], [sysinfo=no])
else
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for SASL])
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for SysInfo])
sysinfo=no
fi
fi
@ -579,7 +611,6 @@ dnl #######################################################################
if test "x$dbus" = "xyes" ; then
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60 dbus-glib-1 >= 0.60 gthread-2.0], dbus=yes, [
AC_MSG_RESULT(no)
dbus=no
])
AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool, no)
@ -590,9 +621,8 @@ if test "x$dbus" = "xyes" ; then
COMMON_LIBS="$COMMON_LIBS $DBUS_LIBS"
COMMON_CFLAGS="$COMMON_CFLAGS $DBUS_CFLAGS"
AC_DEFINE(USE_DBUS)
AS_AC_EXPAND(DATADIR, $datadir)
DBUS_SERVICES_DIR="$DATADIR/dbus-1/services"
AS_AC_EXPAND(DBUS_SERVICES_DIR, "$datadir/dbus-1/services")
AC_SUBST(DBUS_SERVICES_DIR)
AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir for DBUS is])
fi
@ -604,7 +634,6 @@ dnl *********************************************************************
if test "x$libnotify" = "xyes" ; then
PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= 0.4, [], [
AC_MSG_RESULT(no)
libnotify=no
])
if test "$libnotify" != "no" ; then
@ -620,7 +649,6 @@ dnl *********************************************************************
if test "$spell" = "gtkspell" ; then
PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, [], [
AC_MSG_RESULT(no)
spell=no
])
if test "$spell" != "no" ; then
@ -631,15 +659,15 @@ if test "$spell" = "gtkspell" ; then
fi
if test "$spell" = "libsexy" ; then
PKG_CHECK_MODULES([LIBSEXY], [libsexy >= 0.1.8], libsexy=yes, AC_MSG_RESULT(no))
if test "$libsexy" = "yes" ; then
PKG_CHECK_MODULES([LIBSEXY], [libsexy >= 0.1.8], [
libsexy=yes
GUI_LIBS="$GUI_LIBS $LIBSEXY_LIBS"
GUI_CFLAGS="$GUI_CFLAGS $LIBSEXY_CFLAGS"
AC_DEFINE(USE_LIBSEXY)
else
], [
dnl use builtin static one
spell="static"
fi
])
fi
if test "$spell" = "static" ; then
@ -649,7 +677,7 @@ if test "$spell" = "static" ; then
GUI_CFLAGS="$GUI_CFLAGS -I/usr/include/libxml2"
LIBS="$LIBS -lxml2"
], [
AC_MSG_ERROR("Cannot find libxml2")
AC_MSG_ERROR(Cannot find libxml2!)
])
fi
@ -669,7 +697,8 @@ AM_CONDITIONAL(DO_PLUGIN, test "x$plugin" = "xyes")
AM_CONDITIONAL(DO_CHECKSUM, test "x$checksum" = "xyes")
AM_CONDITIONAL(DO_DOAT, test "x$doat" = "xyes")
AM_CONDITIONAL(DO_FISHLIM, test "x$fishlim" = "xyes")
AM_CONDITIONAL(DO_SASL, test "x$sasl" = "xyes")
dnl AM_CONDITIONAL(DO_SASL, test "x$sasl" = "xyes")
AM_CONDITIONAL(DO_SYSINFO, test "x$sysinfo" = "xyes")
AM_CONDITIONAL(USE_DBUS, test "x$dbus" = "xyes")
AM_CONDITIONAL(DO_GCONF, test "x$GCONFTOOL" != "xno")
@ -843,7 +872,7 @@ AC_TRY_COMPILE(
AC_PATH_PROG(gdkpixbufcsourcepath, gdk-pixbuf-csource)
AC_SUBST(gdkpixbufcsourcepath)
if test "$gtkfe" != no -a "_$gdkpixbufcsourcepath" = _; then
AC_MSG_ERROR("Cannot find gdk-pixbuf-csource: Install GTK+ 2.0\!")
AC_MSG_ERROR(Cannot find gdk-pixbuf-csource: Install GTK+ 2.0!)
fi
dnl if we don't have this, use g_snprintf instead
@ -909,10 +938,10 @@ test "x$exec_prefix" = xNONE && exec_prefix="$prefix"
AC_DEFINE_UNQUOTED(PREFIX, "${prefix}")
HEXCHATLIBDIR=`eval echo ${libdir}/hexchat`
AS_AC_EXPAND(HEXCHATLIBDIR, "${libdir}/hexchat")
AC_DEFINE_UNQUOTED(HEXCHATLIBDIR, "$HEXCHATLIBDIR")
HEXCHATSHAREDIR=`eval echo ${datadir}`
AS_AC_EXPAND(HEXCHATSHAREDIR, "$datadir")
AC_DEFINE_UNQUOTED(HEXCHATSHAREDIR, "$HEXCHATSHAREDIR")
dnl for plugins/xxx/Makefile.am
@ -934,10 +963,12 @@ plugins/tcl/Makefile
plugins/checksum/Makefile
plugins/doat/Makefile
plugins/fishlim/Makefile
plugins/sasl/Makefile
plugins/sysinfo/Makefile
intl/Makefile
po/Makefile.in
man/Makefile
])
dnl plugins/sasl/Makefile
echo
echo HexChat $VERSION
@ -960,6 +991,7 @@ echo Plugin interface ...... : $plugin
echo NLS/gettext ........... : $USE_NLS
echo IPv6 support .......... : $ipv6
echo MS Proxy NTLM \(ISA\) ... : $have_ntlm
echo libproxy support ...... : $libproxy
echo
echo Perl .................. : $perl
echo Python ................ : $python
@ -968,7 +1000,8 @@ echo
echo Checksum .............. : $checksum
echo Do At ................. : $doat
echo FiSHLiM ............... : $fishlim
echo SASL .................. : $sasl
dnl echo SASL .................. : $sasl
echo SysInfo ............... : $sysinfo
echo
echo The binary will be installed in $prefix/bin
echo

569
faq.html
View File

@ -1,569 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<title>HexChat FAQ</title>
<style type="text/css">
<!--
body {
font-family: sans-serif;
background-color: #FFFBF0;
}
h2 { color: #336701;
background-color: #F4F0E5;
}
h3 { color: #005A9C;
background-color: #F0EAE1;
}
a:link { color: blue; }
p { margin: 3% }
-->
</style>
</head>
<body>
<h1>HexChat 2.9 Frequently Asked Questions</h1>
<h2>1. Section One: Compiling and Installing.</h2>
<p>
<a href="#q11">1. I get this error: /bin/sh: no: command not found</a>
<br><br>
<a href="#q12">2. How do I compile HexChat on my Sun OS system?</a>
<br><br>
</p>
<h2>2. Section Two: Using HexChat.</h2>
<p>
<a href="#q21">1. How do I enable identd in HexChat? (How do I get rid of the ~ in front of my username?)</a>
<br><br>
<a href="#q22">2. How do I auto join more than one channel with keys?</a>
<br><br>
<a href="#q23">3. How do I autoconnect and join a channel when HexChat loads?</a>
<br><br>
<a href="#q24">4. How do I cut and paste in HexChat?</a>
<br><br>
<a href="#q25">5. How do I connect through a proxy?</a>
<br><br>
<a href="#q26">6. How do I show @ and + in front of nicknames that are Op and Voice when they talk?</a>
<br><br>
<a href="#q27">7. How do I change the Op and Voice userlist icons and Tree View icons?</a>
<br><br>
<a href="#q28">8. How do I set different ban types?</a>
<br><br>
<a href="#q29">9. Why can't I see accented-letters/umlauts/upper-ascii-chars in HexChat?</a>
<br><br>
<a href="#q210">10. Why does the timestamp overlap some nicknames?</a>
<br><br>
<a href="#q211">11. How do I turn on Conference mode where I will not see join or part messages?</a>
<br><br>
<a href="#q212">12. How can I run the /dccserver command?</a>
<br><br>
<a href="#q213">13. Why doesn't DCC send work behind a router (IPNat/ADSL)?</a>
<br><br>
<a href="#q214">14. How do I execute multiple commands in one line?</a>
<br><br>
<a href="#q215">15. How do I enable Emacs key bindings in HexChat?</a>
<br><br>
<a href="#q216">16. I get this error: "Unknown file type abc.yz. Maybe you need to install the Perl or Python plugin?"</a>
<br><br>
<a href="#q217">17. How do I play sound files on certain events?</a>
<br><br>
<a href="#q218">18. How do I auto-load scripts at startup?</a>
<br><br>
<a href="#q219">19. How do I minimize HexChat to the System Tray (Notification Area)?</a>
<br><br>
<a href="#q220">20. Can I select and copy text with the time stamps?</a>
<br><br>
<a href="#q221">21. What's the deal with opening URLs in HexChat on Linux/Unix?</a>
<br><br>
<a href="#q222">22. Where are the log files saved to?</a>
<br><br>
<a href="#q223">23. How do I rotate log files every so often?</a>
<br><br>
<a href="#q224">24. How do I enable graphical smilies (emoticons)?</a>
<br><br>
<a href="#q225">25. Where did the Real Name field go?</a>
<br><br>
<a href="#q226">26. How do I migrate my settings from XChat?</a>
<br><br>
</p>
<h2>3. Section Three: Contributions, Development and Bugs.</h2>
<p>
<a href="#q31">1. Why does HexChat leak so much memory?</a>
<br><br>
<a href="#q32">2. My copy of HexChat crashes, what can I do?</a>
<br><br>
<a href="#q33">3. Can I write a new language translation for HexChat?</a>
</p>
<br><br>
<h2>1. Section One: Compiling and Installing.</h2>
<br><h3><a name="q11">1. I get this error: /bin/sh: no: command not found</a></h3>
<p>
If you get an error something like:
</p>
<blockquote><pre>
Making all in po
make[2]: Entering directory `/home/zed/xchat/files/xchat-1.8.7/po'
file=./`echo ca | sed 's,.*/,,'`.gmo \
&amp;&amp; rm -f $file &amp;&amp; PATH=../src:$PATH no -o $file ca.po
/bin/sh: no: command not found
make[2]: *** [ca.gmo] Error 127
make[2]: Leaving directory `/home/zed/xchat/files/xchat-1.8.7/po'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/zed/xchat/files/xchat-1.8.7'
make: *** [all-recursive-am] Error 2
</pre></blockquote>
<p>
It means you don't have GNU gettext installed. There are two solutions:
</p>
<ul>
<li>Install GNU gettext and try again.</li>
<li>Use <i>./configure --disable-nls</i>. This will disable foreign
language support and all menus and GUI will be in English only.</li>
</ul>
<br><h3><a name="q12">2. How do I compile HexChat on my Sun OS system?</a></h3>
<p>
HexChat uses GNU gettext which in turn requires gmake, either install that
and or use ./configure --disable-nls with Sun's own make.
</p>
<br><h2>2. Section Two: Using HexChat.</h2>
<br><h3><a name="q21">1. How do I enable identd in HexChat?</a></h3>
<p>
<u>UNIX:</u><br>
Identd isn't actually apart of HexChat. You will need to download and install
your own ident server. Most distributions, including Fedora, come with an
ident server program called oidentd. Make sure it is enabled in
/etc/xinetd.conf or read you distribution's documentation.
As an alternative, you can try this experimental identd server: <a href="http://xchat.org/auth/">xchat_auth</a>
<br><br><u>WINDOWS:</u><br>
The win32 version of HexChat comes with a built-in identd server. It is
enabled by default, but can be disabled with <i>/set identd 0</i>.
</p>
<br><h3><a name="q22">2. How do I auto join more than one channel with keys?</a></h3>
<p>
In the Server list's channel column enter multiple channels and separate
them by commas, eg: "#linux,#warez,#chat". Do not put spaces between the
channels. If the channels also have keys (passwords), then the syntax is:
"#channel1,#channel2,#channel3 key1,key2,key3"
</p>
<p>
Example: If you want to join #abc and #talk without keys, but #linux with
a key of "secret", you would enter: "#linux,#abc,#talk secret".
</p>
<br><h3><a name="q23">3. How do I autoconnect and join a channel when HexChat loads?</a></h3>
<p>
In the Server list, select the Network you want to auto-connect to, click Edit
and turn ON the "Auto connect to this network at startup" checkbox.
</p>
<br><h3><a name="q24">4. How do I cut and paste in HexChat?</a></h3>
<p>
It's exactly the same as any other X application. You simply mark the text
you want, and then press middle mouse button to paste (if you only have a
2 button mouse, press left and right buttons at once).
</p>
<br><h3><a name="q25">5. How do I connect through a proxy?</a></h3>
<p>
Go to the menus, Settings -> Preferences -> Network Setup and fill in the requested
information there. Authentication (using a username and password) is
only supported for HTTP and Socks5.
</p>
<br><h3><a name="q26">6. How do I show @ and + in front of nicknames that are Op and Voice when they talk?</a></h3>
<p>
To display @ and + characters next to nicknames as they talk, do the following:
</p>
<p>
In the menus, open up Settings -> Advanced -> Text Events. Find the
<i>Channel Message</i> event in the list. The $3 code can be inserted to
print the user's mode-character (e.g. @ or +). For example, you might want
to change the default:
<br><br>%C18%H&lt;%H$4$1%H>%H%O$t$2<br><br>To:
<br><br>%C18%H&lt;%H$4<b>$3</b>$1%H>%H%O$t$2
<br><br>Don't forget to press Enter, so the changes take effect in the
list at the top of the window.
</p>
<br><h3><a name="q27">7. How do I change the Op and Voice userlist icons and Tree View icons?</a></h3>
<p>
<u>Unix/Linux</u>
<br>The default icons are hard coded (compiled) in. You can override them by creating
some PNG files in ${PREFIX}/share/hexchat. ${PREFIX} is usually /usr, so that
would translate to /usr/share/hexchat. If you compiled from source tarball without
specifying a prefix, it will be /usr/local instead.
<br>
<br>
<u>Windows</u>
<br>Your own custom icons can be placed in C:\Program Files\HexChat\Icons. Image format
may be PNG or ICO. PNG support on Windows 2000 may require installing GDI+, but it's
standard on XP or newer.
</p>
<blockquote>
<table border="1" cellpadding="3" rules="all">
<tr bgcolor="#dddddd"><td>Name</td><td>Description</td></tr>
<tr><td>op.png</td><td>Userlist: Op</td></tr>
<tr><td>hop.png</td><td>Userlist: Half-Op</td></tr>
<tr><td>voice.png</td><td>Userlist: Voice</td></tr>
<tr><td>red.png</td><td>Userlist: Owner</td></tr>
<tr><td>purple.png</td><td>Userlist: Founder</td></tr>
<tr><td></td><td></td></tr>
<tr><td>server.png</td><td>Tree: Server</td></tr>
<tr><td>channel.png</td><td>Tree: Channel</td></tr>
<tr><td>dialog.png</td><td>Tree: Dialog/Query</td></tr>
<tr><td>util.png</td><td>Tree: Utility (Channel List, DCC etc)</td></tr>
<tr><td></td><td></td></tr>
<tr><td>message.png</td><td>Tray: Message</td></tr>
<tr><td>highlight.png</td><td>Tray: Highlighted Message</td></tr>
<tr><td>fileoffer.png</td><td>Tray: DCC</td></tr>
<tr><td></td><td></td></tr>
<tr><td>hexchat.png</td><td>Main HexChat icon</td></tr>
</table>
</blockquote>
<br><b>Tree View icons</b>: Type <b>/set tab_icons 1</b> to enable them and then restart HexChat.
<br>
<br><h3><a name="q28">8. How do I set different ban types?</a></h3>
<p>
Three ways:
</p>
<ul>
<li>
Right click the nickname in the userlist, and choose a ban type from the
"Kick/Ban" submenu.
</li>
<li>
You can also do it manually:
/ban &lt;nick> &lt;ban type>
where the &lt;ban type> is a number from 0 to 3.
</li>
<li>
/set irc_ban_type &lt;ban type>
sets the default ban type to use for all bans. The different types are:
<ul>
<li>0 *!*@*.host</li>
<li>1 *!*@domain</li>
<li>2 *!*user@*.host</li>
<li>3 *!*user@domain</li>
</ul>
</li>
</ul>
<br><h3><a name="q29">9. Why can't I see accented-letters/umlauts/upper-ascii-chars in HexChat?</a></h3>
<p>
Refer to <a href="http://xchat.org/encoding/">http://xchat.org/encoding/</a>.<br>
Note: Log files are always written in UTF-8/Unicode.
</p>
<br><h3><a name="q210">10. Why does the timestamp overlap some nicknames?</a></h3>
<p>
Some networks allow very long nicknames (up to 32 letters). It can be annoying to have
the separator bar move too far to the right, just for one long nick. Therefore, it has
a set limit for the distance it will move to the right. If you use a large font, you
may need to adjust this distance. It is set in pixels, for example:
</p>
<blockquote><pre>
/set text_max_indent 320
</pre></blockquote>
<p>
Once you adjust this setting high enough, overlapping timestamps and nicknames should
not occur. The adjustment will not take effect immediately, a restart may be needed.
</p>
<br><h3><a name="q211">11. How do I turn on Conference mode where I will not see join or part messages?</a></h3>
<p>
Right-click on the tab you want to change. In the submenu of the channel
name, there's a toggle-item "Show join/part messages", simply turn this off.
</p><p>If you want to turn this option on globally, type:</p>
<blockquote><pre>/set irc_conf_mode 1</pre></blockquote>
<p>Then all channels you join after setting this will start with "Show join/part messages" turned off.</p>
<br><h3><a name="q212">12. How can I run the /dccserver command?</a></h3>
<p>
In short you can not do this (easily). This is a mIRC only proprietary feature
that is quite nonstandard. There is no code for doing this, mainly because
/dccserver runs on port 59 which in turn would require running HexChat as
root. Why do you need this anyway? Just use normal DCC.
<br><br>
Unofficial unix <a href="http://dfx.at/xchat/">patches are available here</a>.
<br><br><u><b>Update</b></u>: DCC Server feature has been added in the official Windows release 2.4.1b.
</p>
<br><h3><a name="q213">13. Why doesn't DCC send work behind a router (IPNat/ADSL)?</a></h3>
<p>
If you are behind a IP-NAT or ADSL router, you will most likely have
an address like 192.168.0.1. This address is not usable on the Internet, and
must be translated.
</p><p>
When offering a DCC file, HexChat will tell the receiver your address. If it says
192.168.0.1, the receiver will not be able to connect. One way to make it send
your "real" address is to enable the "Get my IP from IRC Server" option in HexChat.
This option is available in Preferences -> File Transfers. When you turn it
ON, you will have to re-login to the server before it'll take effect.
</p><p>
You will also need to forward some ports for use in DCC send. You may pick almost
any port range you wish, for example, in HexChat set:
</p>
<pre> <b>First DCC send port</b>: 4990
<b>Last DCC send port</b>: 5000
</pre>
<p>
This will allow you to send up to ten files at the same time, which should be plenty
for most people. Lastly, configure your router/modem to forward ports 4990-5000 to
your PC's address. You'll have to consult your router/modem's manual on how to do this.
</p>
<br><h3><a name="q214">14. How do I execute multiple commands in one line?</a></h3>
<p>
There are three ways to do this:
</p>
<ul>
<li>/LOAD -e &lt;textfile>, where &lt;textfile> is a full pathname to a file
containing commands on each line.</li>
<li>
Separate your commands with CTRL-SHIFT-u-a (CTRL-SHIFT-a on older GTK+ and Windows). This will appear as a little box with numbers on it.</li>
<li>You can create two UserCommands, with the same name, and then execute
the UserCommand. It will be executed in the same order as it's written
in the UserCommands GUI.</li>
</ul>
<br><h3><a name="q215">15. How do I enable Emacs key bindings in HexChat?</a></h3>
<p>
The standard Emacs key bindings, such as CTRL-w, CTRL-u etc, are supported by
GTK+ 2.0, but normally disabled. If you run Gnome 2, you can re-enable them in
your Gnome menu under: Preferences -> Keyboard Shortcuts.
</p>
<p>
<i>Note</i>: This doesn't work in the latest Gnome (2.8 and newer). In this case, you need
to run "gconf-editor", and directly change the key /desktop/gnome/interface/gtk_key_theme
from "Default" to "Emacs". Then you need to re-start HexChat.
</p>
<p>
If you don't use Gnome 2, but still want Emacs key bindings, it's beyond the
scope of this document. You might find some hints here:
<a href="http://www.gtk.org/gtk-2.4.0-notes.html">GTK+ 2.4.0 release notes</a>.
</p>
<br><h3><a name="q216">16. I get this error: "Unknown file type abc.yz. Maybe you need to install the Perl or Python plugin?"</a></h3>
<p>
If you get this error when trying to load a Perl or Python script, it means
the plugin for running those scripts isn't loaded.
</p>
<ul>
<li>The Perl, Python and TCL plugins come with HexChat in the same archive.</li>
<li>During ./configure, it will check for Perl, Python and TCL libs and headers, you should check if it failed there.</li>
<li>The plugins directory can be found by issuing the shell command
<pre>hexchat -p</pre>
</li>
<li>All *.so files are auto-loaded at startup (*.dll on Windows).</li>
<li>If you downloaded a binary package, maybe the packager decided to exclude the Perl or Python plugins.</li>
</ul>
<br><h3><a name="q217">17. How do I play sound files on certain events?</a></h3>
<p>
In the menus, go to: Settings > Preferences > Sound.
Select the event you want to make a sound on, then type in a
sound filename (or use the Browse button).
</p>
<br><h3><a name="q218">18. How do I auto-load scripts at startup?</a></h3>
<p>
You just have to place the scripts into HexChat's data directory. HexChat
will auto-load scripts if they have the right extension .e.g If a filename
ends in .pl, it will be loaded as a Perl script.
This data directory is different on each platform:
<br><br>
<u>Windows</u>
<br><br>
It depends on your version of Windows and where it stores the
<i><b>Application Data</b></i> folder. On Windows XP it is usually:
<br><br>
C:\Documents and Settings\<i><b>username</b></i>\Application Data\HexChat\
<br><b>or simply:</b>
<br>
C:\Program Files\HexChat\Plugins\
<br><br><br>
<u>UNIX</u>
<br><br>
~/.config/hexchat/
Where "~" represents your home directory i.e.: $HOME/.config/hexchat/
</p>
<br><h3><a name="q219">19. How do I minimize HexChat to the System Tray (Notification Area)?</a></h3>
<p>
There are two plugins available that allow this:
<br>Unix: <a href="http://www.blight.tk/">SysTray Plugin</a>
<br>Windows: <a href="http://www.sinisterdevelopments.com/">xTray</a>
</p>
<p>
Note that HexChat 2.8.0+ has its own tray feature, but you can disable it
in <b>Settings &gt; Preferences &gt; Alerts</b> and still run these plugins, if you prefer.
</p>
<br><h3><a name="q220">20. Can I select and copy text with the time stamps?</a></h3>
<p>
Yes, but this requires at least HexChat 2.6.3. Simply hold down SHIFT while marking
the text and the time stamps will be included.
</p>
<br><h3><a name="q221">21. What's the deal with opening URLs in HexChat on Unix/Linux?</a></h3>
<p>
Right-clicking on a URL and selecting <i>Open Link in Browser</i> will open the link
in your "preferred browser". In Gnome, your preferred browser can be changed in System > Preferences > More Preferences > Preferred Applications.
<br><br>
<b><u>Notes for 2.8.0 or newer:</u></b>
<br><br>
Everything should just work automatically without any changes from you. Here's how the current
logic works:
</p>
<ul>
<li>First, it tries to run xdg-open, which is a universal URL handler from freedesktop.org. Most modern Linux desktops will have this now, or in the near future.</li>
<li>If xdg-open doesn't exist, it will try to detect a running Gnome or KDE desktop. This is done via the environment variables GNOME_DESKTOP_SESSION_ID and KDE_FULL_SESSION.</li>
<li>If Gnome is detected, it will execute: gnome-open &lt;url></li>
<li>If KDE is detected, it will execute: kfmclient exec &lt;url></li>
</ul>
<p>
<b><u>Notes for 2.6.8 or older:</u></b>
<br><br>
If you're not using Gnome, e.g KDE or some other desktop environment, you're fresh out of luck!
<br><u>Note for Debian and Ubuntu</u>: Integration with Gnome is broken on this distro! Please set
<i>sensible-browser</i> instead. We have no control over what the Debian packagers do, so complain
to them for this screw up. Example:
<i>sudo update-alternatives --set x-www-browser /usr/bin/firefox</i>
<br><br>
<b><u>More details</u></b>
<br><br>
While holding down CTRL you can single left-click a URL to open it in your preferred browser. If you really want to change this to plain left-click you can type: <b>/set gui_url_mod 0</b>, provided you have HexChat 2.6.6 or newer.
<br><br>
You can also add more items to the right-click menu in HexChat: <b>Settings &gt; Advanced &gt; URL Handlers</b>.
<br>For example, you could add an entry like <b>!firefox -a firefox -remote 'openURL(%s,new-tab)'</b>
<br>But this kind of messing around shouldn't be necessary, it just works automatically in Gnome, KDE and Windows with 2.8.0+!
</p>
<br><h3><a name="q222">22. Where are the log files saved to?</a></h3>
<p>
<u>UNIX</u>
<br>
<br>~/.hexchat/logs/
<br>where ~ represents your home directory.
<br>
<br>
<br><u>Windows</u>
<br>
<br><b>Windows XP/2000</b>: C:\Documents and Settings\<i><b>username</b></i>\Application Data\HexChat\logs
<br><b>Windows Vista/7</b>: C:\Users\<i><b>username</b></i>\AppData\Roaming\HexChat\logs
</p>
<br><h3><a name="q223">23. How do I rotate log files every so often?</a></h3>
<p>
Requires: 2.6.1+
<br><br>
By default settings, no rotation occurs, your log files will just keep getting larger.
<br><br>
Go to <b>Settings</b> &gt; <b>Preferences</b> &gt; <b>Logging</b> and change the log filename to any one of these:
</p>
<blockquote>
<table border="1" cellpadding="6" rules="all">
<tr><td><b>Setting</b></td><td><b>Example filename that would be written</b></td></tr>
<tr><td>%Y-%m-%d/%n-%c.log&nbsp;</td><td>2006-12-30/FreeNode-#channel.log</td></tr>
<tr><td>%n/%Y-%m-%d/%c.log</td><td>FreeNode/2006-12-30/#channel.log</td></tr>
<tr><td>%n/%c.log</td><td>FreeNode/#channel.log (no rotation)</td></tr>
</table>
</blockquote>
<p>
%Y, %m and %d represents the current year, month and day respectively. %n is the
network name, e.g. "FreeNode" or "UnderNet", and finally, %c is the channel. In these
examples, a new log filename and folder would be created after midnight.
<br><br>
You can find more possibilities at <a href="http://xchat.org/docs/log/">http://xchat.org/docs/log/</a>.
</p>
<br><h3><a name="q224">24. How do I enable graphical smilies (emoticons)?</a></h3>
<p>
This feature is only available in the official Windows HexChat release. You have to
TICK this feature during installation. If you didn't do this, you can simply run
the installer again, and TICK the "<b>Eye Candy Theme</b>" when given the option.
</p><p>
If you want to use the graphical theme, but disable it just for smilies (i.e leave
it ON for things like Join/Part, Modes etc only), type this command and restart:
<br><br>
<b>/set text_emoticons off</b>
</p>
<br><h3><a name="q225">25. Where did the Real Name field go?</a></h3>
<p>
The real name field is now removed from the Network List. This is in order to avoid
alienating newcomers (some might be afraid of their personal data).
</p>
<p>
The network-specific real name can still be set via the GUI. If you want to modify
the global real name, just issue the following command:
</p>
<blockquote><pre>
/set irc_real_name Stewie Griffin
</pre></blockquote>
<br><h3><a name="q226">26. How do I migrate my settings from XChat?</a></h3>
<p>
<u>UNIX:</u><br />
Copy <i>~/.xchat2</i> to <i>~/.config/hexchat</i><br />
Rename <i>~/.config/hexchat/xchatlogs</i> to <i>~/.config/hexchat/logs</i><br />
Move all your 3rd party scripts/plugins to <i>~/.config/hexchat/addons</i><br />
Rename <i>~/.config/hexchat/plugin_*.conf</i> to <i>~/.config/hexchat/addon_*.conf</i><br />
<br/>
<u>WINDOWS:</u><br>
Copy <i>%APPDATA%\X-Chat 2</i> to <i>%APPDATA%\HexChat</i><br />
Rename <i>%APPDATA%\HexChat\xchatlogs</i> to <i>%APPDATA%\HexChat\logs</i><br />
Move all your 3rd party scripts/plugins to <i>%APPDATA%\HexChat\addons</i><br />
Rename <i>%APPDATA%\HexChat\plugin_*.conf</i> to <i>%APPDATA%\HexChat\addon_*.conf</i><br />
</p>
<br><h2>3. Section Three: Contributions, Development and Bugs.</h2>
<br><h3><a name="q31">1. Why does HexChat leak so much memory?</a></h3>
<p>
The simple answer is, it doesn't! There are some GTK+ pixmap based themes around that
leak a lot of memory. Please try using a different theme and see if that resolves the
problem. HexChat itself only allocates about 40kb of memory through malloc()!
</p>
<br><h3><a name="q32">2. My copy of HexChat crashes, what can I do?</a></h3>
<p>
Firstly, make sure it's the latest stable version of HexChat. Stable versions have
an EVEN middle number, e.g.: 2.8.0 or 2.8.1. Often late fixes are placed in this
directory: <a href="http://xchat.org/files/source/2.8/patches/">2.8.x patches</a>
</p><p>
If you still experience crashes, you should consider running it through GDB. This
will help us find a fix quickly, and it's easy to do! See <a href="http://xchat.org/gdb/">here</a>.
</p>
<br><h3><a name="q33">3. Can I write a new language translation for HexChat?</a></h3>
<p>
You sure can, but I don't accept translations directly. They must be done through the
<a href="http://translationproject.org/domain/xchat.html">Translation Project</a>.
All the relevant information should be on that page.
</p>
</body>
</html>

View File

@ -1,141 +0,0 @@
%define _default_patch_fuzz 2
%define gconf_version 2.14
Summary: A popular and easy to use graphical IRC (chat) client
Name: hexchat
Version: 2.8.8
Release: 0%{?dist}
Epoch: 1
Group: Applications/Internet
License: GPLv2+
URL: http://www.hexchat.org
Source: https://github.com/downloads/hexchat/hexchat/hexchat-%{version}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Patches 0-9 reserved for official xchat.org patches
BuildRequires: perl perl(ExtUtils::Embed) python-devel openssl-devel pkgconfig, tcl-devel
BuildRequires: GConf2-devel
BuildRequires: dbus-devel >= 0.60, dbus-glib-devel >= 0.60
BuildRequires: glib2-devel >= 2.10.0, gtk2-devel >= 2.10.0, bison >= 1.35
BuildRequires: gettext /bin/sed
BuildRequires: libtool
BuildRequires: libsexy-devel
BuildRequires: desktop-file-utils >= 0.10
# For gconftool-2:
Requires(post): GConf2 >= %{gconf_version}
Requires(preun): GConf2 >= %{gconf_version}
# Ensure that a compatible libperl is installed
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Provides: hexchat-perl = %{epoch}:%{version}-%{release}
Obsoletes: hexchat-perl < %{epoch}:%{version}-%{release}
Provides: hexchat-python = %{epoch}:%{version}-%{release}
Obsoletes: hexchat-python < %{epoch}:%{version}-%{release}
%description
HexChat is an easy to use graphical IRC chat client for the X Window System.
It allows you to join multiple IRC channels (chat rooms) at the same time,
talk publicly, private one-on-one conversations etc. Even file transfers
are possible.
This includes the plugins to run the Perl and Python scripts.
%package tcl
Summary: Tcl script plugin for HexChat
Group: Applications/Internet
Requires: %{name} = %{epoch}:%{version}-%{release}
%description tcl
This package contains the HexChat plugin providing the Tcl scripting interface.
%prep
%setup -q
%build
# Remove CVS files from source dirs so they're not installed into doc dirs.
find . -name CVS -type d | xargs rm -rf
export CFLAGS="$RPM_OPT_FLAGS $(perl -MExtUtils::Embed -e ccopts)"
export LDFLAGS=$(perl -MExtUtils::Embed -e ldopts)
%configure --disable-textfe \
--enable-gtkfe \
--enable-openssl \
--enable-python \
--enable-tcl=%{_libdir} \
--enable-ipv6 \
--enable-spell=libsexy \
--enable-shm
# gtkspell breaks Input Method commit with ENTER
make %{?_smp_mflags}
%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
# Get rid of libtool archives
%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/hexchat/plugins/*.la
# Install the .desktop file properly
%{__rm} -f $RPM_BUILD_ROOT%{_datadir}/applications/hexchat.desktop
desktop-file-install --vendor="" \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
--add-category=IRCClient \
--add-category=GTK hexchat.desktop
%find_lang %{name}
# do not Provide plugins .so
%define _use_internal_dependency_generator 0
%{__cat} << \EOF > %{name}.prov
#!%{_buildshell}
%{__grep} -v %{_docdir} - | %{__find_provides} $* \
| %{__sed} '/\.so\(()(64bit)\)\?$/d'
EOF
%define __find_provides %{_builddir}/%{name}-%{version}/%{name}.prov
%{__chmod} +x %{__find_provides}
%post
# Install schema
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule /etc/gconf/schemas/apps_hexchat_url_handler.schemas >& /dev/null || :
%pre
if [ "$1" -gt 1 ]; then
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/apps_hexchat_url_handler.schemas >& /dev/null || :
fi
%preun
if [ "$1" -eq 0 ]; then
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-uninstall-rule /etc/gconf/schemas/apps_hexchat_url_handler.schemas >& /dev/null || :
fi
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(-,root,root)
%doc README ChangeLog
%doc plugins/plugin20.html plugins/perl/hexchat-perl.html
%{_bindir}/hexchat
%dir %{_libdir}/hexchat
%dir %{_libdir}/hexchat/plugins
%{_libdir}/hexchat/plugins/perl.so
%{_libdir}/hexchat/plugins/python.so
%{_datadir}/applications/hexchat.desktop
%{_datadir}/pixmaps/*
%{_sysconfdir}/gconf/schemas/apps_hexchat_url_handler.schemas
%{_datadir}/dbus-1/services/org.hexchat.service.service
%files tcl
%defattr(-,root,root)
%{_libdir}/hexchat/plugins/tcl.so

1
man/Makefile.am Normal file
View File

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

55
man/hexchat.1 Normal file
View File

@ -0,0 +1,55 @@
.TH HEXCHAT "1" "November 2012" "HexChat 2.9.4" "User Commands"
.SH NAME
HexChat \- manual page for HexChat 2.9.4
.SH DESCRIPTION
.SS "Usage:"
.IP
hexchat [OPTION...]
.SS "Help Options:"
.TP
\fB\-h\fR, \fB\-\-help\fR
Show help options
.TP
\fB\-\-help\-all\fR
Show all help options
.TP
\fB\-\-help\-gtk\fR
Show GTK+ Options
.SS "Application Options:"
.TP
\fB\-a\fR, \fB\-\-no\-auto\fR
Don't auto connect to servers
.TP
\fB\-d\fR, \fB\-\-cfgdir\fR=\fIPATH\fR
Use a different config directory
.TP
\fB\-n\fR, \fB\-\-no\-plugins\fR
Don't auto load any plugins
.TP
\fB\-p\fR, \fB\-\-plugindir\fR
Show plugin auto\-load directory
.TP
\fB\-u\fR, \fB\-\-configdir\fR
Show user config directory
.TP
\fB\-\-url\fR=\fIURL\fR
Open an irc://server:port/channel URL
.TP
\fB\-c\fR, \fB\-\-command\fR=\fICOMMAND\fR
Execute command:
.TP
\fB\-e\fR, \fB\-\-existing\fR
Open URL or execute command in an existing HexChat
.TP
\fB\-\-minimize\fR=\fIlevel\fR
Begin minimized. Level 0=Normal 1=Iconified 2=Tray
.TP
\fB\-v\fR, \fB\-\-version\fR
Show version information
.TP
\fB\-\-display\fR=\fIDISPLAY\fR
X display to use
.SH AUTHOR
This manual page was written by Davide Puricelli <evo@debian.org> for the Debian GNU/Linux system (but
may be used by others).

View File

@ -1,9 +1,7 @@
# temp. solution while mailcheck & xdcc arn't in SUBDIRS
EXTRA_DIST = plugin20.html Make.plugin plugin-conf.in \
xdcc/xdcc.c \
xdcc/Makefile.am
EXTRA_DIST = Make.plugin plugin-conf.in xdcc/xdcc.c xdcc/Makefile.am
noinst_HEADERS = xchat-plugin.h
# noinst_HEADERS = hexchat-plugin.h
if DO_PYTHON
pythondir = python
@ -17,9 +15,9 @@ if DO_TCL
tcldir = tcl
endif
if DO_SASL
sasldir = sasl
endif
#if DO_SASL
#sasldir = sasl
#endif
if DO_DOAT
doatdir = doat
@ -33,5 +31,9 @@ if DO_CHECKSUM
checksumdir = checksum
endif
if DO_SYSINFO
sysinfodir = sysinfo
endif
#SUBDIRS = . $(pythondir) $(perldir) mailcheck xdcc
SUBDIRS = . $(pythondir) $(perldir) $(tcldir) $(sasldir) $(doatdir) $(fishlimdir) $(checksumdir)
SUBDIRS = . $(pythondir) $(perldir) $(tcldir) $(doatdir) $(fishlimdir) $(checksumdir) $(sysinfodir)

View File

@ -1,9 +1,7 @@
EXTRA_DIST = INSTALL LICENSE README
libdir = $(hexchatlibdir)/plugins
lib_LTLIBRARIES = checksum.la
checksum_la_SOURCES = checksum.c
checksum_la_LDFLAGS = -avoid-version -module
checksum_la_LIBADD =
INCLUDES = $(COMMON_CFLAGS) -I$(srcdir)/..
AM_CPPFLAGS = $(COMMON_CFLAGS) -I$(srcdir)/../../src/common

View File

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{5EF7F47D-D09C-43C4-BF64-B28B11A0FF91}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>checksum</RootNamespace>
<ProjectName>checksum</ProjectName>
</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>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</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-xp.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-xp.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<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>
</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>
</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>
</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;CHECKSUM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</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>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="checksum.c" />
</ItemGroup>
<ItemGroup>
<None Include="checksum.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,23 @@
<?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="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>
</ItemGroup>
<ItemGroup>
<ClCompile Include="checksum.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="checksum.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -46,15 +46,15 @@
#include <sys/stat.h>
#include "xchat-plugin.h"
#include "hexchat-plugin.h"
#define BUFSIZE 32768
#define DEFAULT_LIMIT 256 /* default size is 256 MiB */
static xchat_plugin *ph; /* plugin handle */
static const char name[] = "Checksum";
static const char desc[] = "Calculate checksum for DCC file transfers";
static const char version[] = "3.1";
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
@ -68,6 +68,7 @@ sha256_hash_string (unsigned char hash[SHA256_DIGEST_LENGTH], char outputBuffer[
outputBuffer[64] = 0;
}
#if 0
static void
sha256 (char *string, char outputBuffer[65])
{
@ -85,6 +86,7 @@ sha256 (char *string, char outputBuffer[65])
}
outputBuffer[64] = 0;
}
#endif
static int
sha256_file (char *path, char outputBuffer[65])
@ -129,25 +131,25 @@ set_limit (char* size)
if (buffer > 0 && buffer < INT_MAX)
{
if (xchat_pluginpref_set_int (ph, "limit", buffer))
if (hexchat_pluginpref_set_int (ph, "limit", buffer))
{
xchat_printf (ph, "File size limit has successfully been set to: %d MiB\n", buffer);
hexchat_printf (ph, "File size limit has successfully been set to: %d MiB\n", buffer);
}
else
{
xchat_printf (ph, "File access error while saving!\n");
hexchat_printf (ph, "File access error while saving!\n");
}
}
else
{
xchat_printf (ph, "Invalid input!\n");
hexchat_printf (ph, "Invalid input!\n");
}
}
static int
get_limit ()
{
int size = xchat_pluginpref_get_int (ph, "limit");
int size = hexchat_pluginpref_get_int (ph, "limit");
if (size <= -1 || size >= INT_MAX)
{
@ -162,7 +164,7 @@ get_limit ()
static void
print_limit ()
{
xchat_printf (ph, "File size limit for checksums: %d MiB", get_limit ());
hexchat_printf (ph, "File size limit for checksums: %d MiB", get_limit ());
}
static int
@ -179,21 +181,21 @@ dccrecv_cb (char *word[], void *userdata)
{
sha256_file (word[2], sum); /* word[2] is the full filename */
/* try to print the checksum in the privmsg tab of the sender */
xchat_set_context (ph, xchat_find_context (ph, NULL, word[3]));
xchat_printf (ph, "SHA-256 checksum for %s (local): %s\n", word[1], sum);
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
{
xchat_set_context (ph, xchat_find_context (ph, NULL, word[3]));
xchat_printf (ph, "SHA-256 checksum for %s (local): (size limit reached, no checksum calculated, you can increase it with /CHECKSUM INC)\n", word[1]);
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
{
xchat_printf (ph, "File access error!\n");
hexchat_printf (ph, "File access error!\n");
}
return XCHAT_EAT_NONE;
return HEXCHAT_EAT_NONE;
}
static int
@ -209,24 +211,24 @@ dccoffer_cb (char *word[], void *userdata)
if (buffer.st_size <= (unsigned long long) get_limit () * 1048576)
{
sha256_file (word[3], sum); /* word[3] is the full filename */
xchat_commandf (ph, "quote PRIVMSG %s :SHA-256 checksum for %s (remote): %s", word[2], word[1], sum);
hexchat_commandf (ph, "quote PRIVMSG %s :SHA-256 checksum for %s (remote): %s", word[2], word[1], sum);
}
else
{
xchat_set_context (ph, xchat_find_context (ph, NULL, word[3]));
xchat_printf (ph, "quote PRIVMSG %s :SHA-256 checksum for %s (remote): (size limit reached, no checksum calculated)", word[2], word[1]);
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
{
xchat_printf (ph, "File access error!\n");
hexchat_printf (ph, "File access error!\n");
}
return XCHAT_EAT_NONE;
return HEXCHAT_EAT_NONE;
}
static void
checksum (char *word[], void *userdata)
static int
checksum (char *word[], char *word_eol[], void *userdata)
{
if (!g_ascii_strcasecmp ("GET", word[2]))
{
@ -238,14 +240,16 @@ checksum (char *word[], void *userdata)
}
else
{
xchat_printf (ph, "Usage: /CHECKSUM GET|INC|DEC\n");
xchat_printf (ph, " GET - print the maximum file size (in MiB) to be hashed\n");
xchat_printf (ph, " SET <filesize> - set the maximum file size (in MiB) to be hashed\n");
hexchat_printf (ph, "Usage: /CHECKSUM GET|INC|DEC\n");
hexchat_printf (ph, " GET - print the maximum file size (in MiB) to be hashed\n");
hexchat_printf (ph, " SET <filesize> - set the maximum file size (in MiB) to be hashed\n");
}
return HEXCHAT_EAT_NONE;
}
int
xchat_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
ph = plugin_handle;
@ -254,22 +258,22 @@ xchat_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, char **plugi
*plugin_version = version;
/* this is required for the very first run */
if (xchat_pluginpref_get_int (ph, "limit") == -1)
if (hexchat_pluginpref_get_int (ph, "limit") == -1)
{
xchat_pluginpref_set_int (ph, "limit", DEFAULT_LIMIT);
hexchat_pluginpref_set_int (ph, "limit", DEFAULT_LIMIT);
}
xchat_hook_command (ph, "CHECKSUM", XCHAT_PRI_NORM, checksum, "Usage: /CHECKSUM GET|SET", 0);
xchat_hook_print (ph, "DCC RECV Complete", XCHAT_PRI_NORM, dccrecv_cb, NULL);
xchat_hook_print (ph, "DCC Offer", XCHAT_PRI_NORM, dccoffer_cb, NULL);
hexchat_hook_command (ph, "CHECKSUM", HEXCHAT_PRI_NORM, checksum, "Usage: /CHECKSUM GET|SET", 0);
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);
xchat_printf (ph, "%s plugin loaded\n", name);
hexchat_printf (ph, "%s plugin loaded\n", name);
return 1;
}
int
xchat_plugin_deinit (void)
hexchat_plugin_deinit (void)
{
xchat_printf (ph, "%s plugin unloaded\n", name);
hexchat_printf (ph, "%s plugin unloaded\n", name);
return 1;
}

View File

@ -1,3 +1,3 @@
EXPORTS
xchat_plugin_init
xchat_plugin_deinit
hexchat_plugin_init
hexchat_plugin_deinit

View File

@ -21,14 +21,12 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -45,25 +43,24 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcchecksum</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcchecksum</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CHECKSUM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
@ -78,14 +75,13 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<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);..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>

113
plugins/dns/dns-xp.vcxproj Normal file
View File

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{3786FA8C-3E76-45E3-984E-FCCFF44729C9}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>dns</RootNamespace>
<ProjectName>dns</ProjectName>
</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>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</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-xp.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-xp.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

@ -0,0 +1,35 @@
<?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>
</ItemGroup>
<ItemGroup>
<None Include="dns.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dns.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="thread.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="thread.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
/* XChat Win32 DNS Plugin
/* HexChat Win32 DNS Plugin
* Copyright (C) 2003-2004 Peter Zelezny.
* Copyright (C) 2012 Berke Viktor.
*
@ -37,13 +37,14 @@
#else
#include <winsock2.h>
#endif
#include <io.h>
#else
#include <unistd.h>
#include <netdb.h>
#include <sys/socket.h>
#endif
#include "xchat-plugin.h"
#include "hexchat-plugin.h"
#include "thread.h"
#define HELP "Usage: DNS <nickname|hostname|numerical address>\n"
@ -53,7 +54,7 @@
#define PIPE_WRITE 1
#define MAX_HOSTNAME 128
static xchat_plugin *ph;
static hexchat_plugin *ph;
static thread *active_thread = NULL;
@ -67,7 +68,7 @@ waitline (void *source, char *buf, int bufsize)
{
len = 1;
/* we can't read() here, due to glib's giowin32 */
if (ph->xchat_read_fd (ph, source, buf + i, &len) != 0)
if (ph->hexchat_read_fd (ph, source, buf + i, &len) != 0)
{
return -1;
}
@ -210,19 +211,19 @@ dns_read_cb (int fd, int flags, thread *th, void *source)
case '0': /* got data to show */
waitline (source, buf2, sizeof (buf2));
if (buf2[0] == 0)
xchat_printf(ph, HEAD"\002Numerical\002: %s\n", buf + 1);
hexchat_printf(ph, HEAD"\002Numerical\002: %s\n", buf + 1);
else
xchat_printf(ph, HEAD"\002Canonical\002: %s \002Numerical\002: %s\n", buf2, buf + 1);
hexchat_printf(ph, HEAD"\002Canonical\002: %s \002Numerical\002: %s\n", buf2, buf + 1);
return 1;
case '1': /* failed */
xchat_printf(ph, HEAD"Lookup failed. %s\n", gai_strerrorA (atoi (buf + 1)));
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]);
xchat_hook_timer(ph, 3000, dns_close_pipe, (void *)th->pipe_fd[PIPE_WRITE]);
xchat_hook_timer(ph, 4000, dns_close_pipe, (void *)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;
@ -237,19 +238,19 @@ dns_read_cb (int fd, int flags, thread *th, void *source)
static char *
find_nick_host (char *nick)
{
xchat_list *list;
hexchat_list *list;
char *at;
const char *host;
list = xchat_list_get (ph, "users");
list = hexchat_list_get (ph, "users");
if (!list)
return NULL;
while (xchat_list_next (ph, list))
while (hexchat_list_next (ph, list))
{
if (stricmp (nick, xchat_list_str (ph, list, "nick")) == 0)
if (stricmp (nick, hexchat_list_str (ph, list, "nick")) == 0)
{
host = xchat_list_str (ph, list, "host");
host = hexchat_list_str (ph, list, "host");
if (host)
{
at = strrchr (host, '@');
@ -271,8 +272,8 @@ dns_cmd_cb (char *word[], char *word_eol[], void *ud)
if (!word[2][0])
{
xchat_print (ph, HELP);
return XCHAT_EAT_ALL;
hexchat_print (ph, HELP);
return HEXCHAT_EAT_ALL;
}
th = thread_new ();
@ -281,51 +282,51 @@ dns_cmd_cb (char *word[], char *word_eol[], void *ud)
nickhost = find_nick_host (word[2]);
if (nickhost)
{
xchat_printf (ph, HEAD"Looking up %s (%s)...\n", nickhost, word[2]);
hexchat_printf (ph, HEAD"Looking up %s (%s)...\n", nickhost, word[2]);
th->userdata = strdup (nickhost);
} else
{
xchat_printf (ph, HEAD"Looking up %s...\n", word[2]);
hexchat_printf (ph, HEAD"Looking up %s...\n", word[2]);
th->userdata = strdup (word[2]);
}
if (thread_start (th, thread_function, th))
{
xchat_hook_fd(ph, th->pipe_fd[PIPE_READ],
XCHAT_FD_READ | XCHAT_FD_EXCEPTION | XCHAT_FD_NOTSOCKET,
hexchat_hook_fd(ph, th->pipe_fd[PIPE_READ],
HEXCHAT_FD_READ | HEXCHAT_FD_EXCEPTION | HEXCHAT_FD_NOTSOCKET,
(void *)dns_read_cb, th);
}
}
return XCHAT_EAT_ALL;
return HEXCHAT_EAT_ALL;
}
int
xchat_plugin_deinit (xchat_plugin *plugin_handle)
hexchat_plugin_deinit (hexchat_plugin *plugin_handle)
{
while (active_thread) /* children will set this var to NULL soon... */
{
Sleep (1000);
}
xchat_printf (ph, "DNS plugin unloaded\n");
hexchat_printf (ph, "DNS plugin unloaded\n");
return 1;
}
int
xchat_plugin_init
(xchat_plugin *plugin_handle, char **plugin_name,
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 xchat_* functions */
/* 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;
xchat_hook_command(ph, "DNS", XCHAT_PRI_LOW, dns_cmd_cb, HELP, 0);
xchat_printf (ph, "DNS plugin loaded\n");
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 +1,3 @@
EXPORTS
xchat_plugin_init
xchat_plugin_deinit
hexchat_plugin_init
hexchat_plugin_deinit

View File

@ -21,14 +21,12 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -45,25 +43,24 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcdns</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcdns</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DNS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
@ -78,14 +75,13 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;DNS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>

View File

@ -1,3 +1,4 @@
#include <io.h>
#include <fcntl.h>
#include "thread.h"

View File

@ -1,10 +1,8 @@
EXTRA_DIST =
libdir = $(hexchatlibdir)/plugins
lib_LTLIBRARIES = doat.la
doat_la_SOURCES = doat.c
doat_la_LDFLAGS = -avoid-version -module
doat_la_LIBADD =
INCLUDES = $(COMMON_CFLAGS) -I$(srcdir)/..
AM_CPPFLAGS = $(COMMON_CFLAGS) -I$(srcdir)/../../src/common

View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{4980AF24-9D42-427D-A8E6-0DF3B97C455D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>doat</RootNamespace>
<ProjectName>doat</ProjectName>
</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>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</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-xp.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-xp.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<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>
</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>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<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>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>doat.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="doat.c" />
</ItemGroup>
<ItemGroup>
<None Include="doat.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -11,13 +11,13 @@
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="winsys.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClCompile Include="winsys.cpp">
<ClCompile Include="doat.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="doat.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -8,9 +8,9 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "xchat-plugin.h"
#include "hexchat-plugin.h"
static xchat_plugin *ph;
static hexchat_plugin *ph;
static int
parse_command( char *word[], char *word_eol[], void *userdata ) {
@ -19,7 +19,7 @@ parse_command( char *word[], char *word_eol[], void *userdata ) {
char *str1 = NULL;
char *delimiter = NULL;
xchat_context *ctx = NULL;
hexchat_context *ctx = NULL;
if( word[2] != NULL && word[3] != NULL ) {
for( str1 = word[2]; ; str1 = NULL ) {
@ -52,9 +52,9 @@ parse_command( char *word[], char *word_eol[], void *userdata ) {
/* printf( "channel[%s] server[%s]\n", channel, server );*/
if( (ctx = xchat_find_context( ph, server, channel ) ) != NULL ) {
if( xchat_set_context( ph, ctx ) ) {
xchat_command( ph, word_eol[3] );
if( (ctx = hexchat_find_context( ph, server, channel ) ) != NULL ) {
if( hexchat_set_context( ph, ctx ) ) {
hexchat_command( ph, word_eol[3] );
}
}
@ -67,11 +67,11 @@ parse_command( char *word[], char *word_eol[], void *userdata ) {
}
}
}
return XCHAT_EAT_XCHAT;
return HEXCHAT_EAT_HEXCHAT;
}
int
xchat_plugin_init( xchat_plugin * plugin_handle, char **plugin_name,
hexchat_plugin_init( hexchat_plugin * plugin_handle, char **plugin_name,
char **plugin_desc, char **plugin_version, char *arg ) {
ph = plugin_handle;
@ -79,16 +79,16 @@ xchat_plugin_init( xchat_plugin * plugin_handle, char **plugin_name,
*plugin_version = "1.0001";
*plugin_desc = "Perform an arbitrary command on multiple channels";
xchat_hook_command( ph, "doat", XCHAT_PRI_NORM, parse_command, "DOAT [channel,list,/network] [command], perform a command on multiple contexts", NULL );
hexchat_hook_command( ph, "doat", HEXCHAT_PRI_NORM, parse_command, "DOAT [channel,list,/network] [command], perform a command on multiple contexts", NULL );
xchat_print (ph, "Do At plugin loaded\n");
hexchat_print (ph, "Do At plugin loaded\n");
return 1;
}
int
xchat_plugin_deinit (void)
hexchat_plugin_deinit (void)
{
xchat_print (ph, "Do At plugin unloaded\n");
hexchat_print (ph, "Do At plugin unloaded\n");
return 1;
}

View File

@ -1,3 +1,3 @@
EXPORTS
xchat_plugin_init
xchat_plugin_deinit
hexchat_plugin_init
hexchat_plugin_deinit

View File

@ -21,14 +21,12 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -45,25 +43,24 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcdoat</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcdoat</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
@ -76,14 +73,13 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>

View File

@ -1,5 +1,5 @@
/*
EasyWinampControl - A Winamp "What's playing" plugin for Xchat
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
@ -17,10 +17,10 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "xchat-plugin.h"
#include <windows.h>
#include "hexchat-plugin.h"
static xchat_plugin *ph; /* plugin handle */
static hexchat_plugin *ph; /* plugin handle */
static int enable = 1;
// For example, circularstrstr("winamp", "pwi", 3) would return 5 (the index of p)
@ -98,25 +98,25 @@ static int wcmd_cb(char *word[], char *word_eol[], void *userdata)
HWND hwndWinamp = NULL;
if ((hwndWinamp = FindWindow("Winamp v1.x",NULL)) == NULL) {
xchat_print(ph, "Winamp's window not found - Is winamp really running?\n");
hexchat_print(ph, "Winamp's window not found - Is winamp really running?\n");
}
else {
if (strcmp(word[1], "") == 0)
xchat_print(ph, "Usage: wcmd [command]\n");
hexchat_print(ph, "Usage: wcmd [command]\n");
else if (strcmp(word[2], "next") == 0) {
xchat_print(ph, "Loading next song...\n");
hexchat_print(ph, "Loading next song...\n");
SendMessage (hwndWinamp, WM_COMMAND, 40048, 0);
}
else if (strcmp(word[2], "prev") == 0) {
xchat_print(ph, "Loading previous song...\n");
hexchat_print(ph, "Loading previous song...\n");
SendMessage (hwndWinamp, WM_COMMAND, 40044, 0);
}
else if (strcmp(word[2], "play") == 0) {
xchat_print(ph, "Playin'...\n");
hexchat_print(ph, "Playin'...\n");
SendMessage (hwndWinamp, WM_COMMAND, 40045, 0);
}
else if (strcmp(word[2], "stop") == 0) {
xchat_print(ph, "Winamp stopped!...\n");
hexchat_print(ph, "Winamp stopped!...\n");
SendMessage (hwndWinamp, WM_COMMAND, 40047, 0);
}
else if (strcmp(word[2], "pause") == 0) {
@ -124,7 +124,7 @@ static int wcmd_cb(char *word[], char *word_eol[], void *userdata)
}
}
return XCHAT_EAT_ALL;
return HEXCHAT_EAT_ALL;
}
@ -138,29 +138,29 @@ static int wp_cb(char *word[], char *word_eol[], void *userdata)
char this_title[1024];
if ((hwndWinamp = FindWindow("Winamp v1.x",NULL)) == NULL)
xchat_print(ph, "Winamp's window not found - Is winamp really running?\n");
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 xchat.
// 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) {
xchat_print(ph, "Could not get current song's samplerate... !?\n");
return XCHAT_EAT_ALL;
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) {
xchat_print(ph, "Could not get current song's bitrate... !?\n");
return XCHAT_EAT_ALL;
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) {
xchat_print(ph, "Could not get the number of channels... !?\n");
return XCHAT_EAT_ALL;
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?
xchat_print(ph, "Could not get current song's length... !?\n");
return XCHAT_EAT_ALL;
hexchat_print(ph, "Could not get current song's length... !?\n");
return HEXCHAT_EAT_ALL;
}
else {
minutes = length/60;
@ -172,8 +172,8 @@ static int wp_cb(char *word[], char *word_eol[], void *userdata)
wsprintf(totaltime, "%d:0%d", minutes, seconds);
}
if ((elapsed = SendMessage(hwndWinamp, WM_USER, (WPARAM)0, (LPARAM)105)) == 0) {
xchat_print(ph, "Could not get current song's elapsed time... !?\n");
return XCHAT_EAT_ALL;
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 */
@ -186,46 +186,46 @@ static int wp_cb(char *word[], char *word_eol[], void *userdata)
}
if ((bitrate = SendMessage(hwndWinamp, WM_USER, (WPARAM)1, (LPARAM)126)) == 0) {
xchat_print(ph, "Could not get current song's bitrate... !?\n");
return XCHAT_EAT_ALL;
hexchat_print(ph, "Could not get current song's bitrate... !?\n");
return HEXCHAT_EAT_ALL;
}
GetCurrentSongsName(hwndWinamp, this_title, 1024);
xchat_commandf(ph, "dispcurrsong %d %d %d %s %s %s", samplerate, bitrate, nbchannels, elapsedtime, totaltime, this_title);
hexchat_commandf(ph, "dispcurrsong %d %d %d %s %s %s", samplerate, bitrate, nbchannels, elapsedtime, totaltime, this_title);
}
return XCHAT_EAT_ALL; /* eat this command so xchat and other plugins can't process it */
return HEXCHAT_EAT_ALL; /* eat this command so HexChat and other plugins can't process it */
}
int xchat_plugin_init(xchat_plugin *plugin_handle,
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 xchat_* functions */
/* 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";
xchat_hook_command(ph, "wp", XCHAT_PRI_NORM, wp_cb,
hexchat_hook_command(ph, "wp", HEXCHAT_PRI_NORM, wp_cb,
"Usage: wp", 0);
xchat_hook_command(ph, "wcmd", XCHAT_PRI_NORM, wcmd_cb,
hexchat_hook_command(ph, "wcmd", HEXCHAT_PRI_NORM, wcmd_cb,
"Usage: wcmd [play|pause|stop|prev|next]", 0);
xchat_print(ph, "EasyWinampControl plugin loaded\n");
hexchat_print(ph, "EasyWinampControl plugin loaded\n");
return 1; /* return 1 for success */
}
int xchat_plugin_deinit(void)
int hexchat_plugin_deinit(void)
{
xchat_print(ph, "EasyWinampControl plugin unloaded\n");
hexchat_print(ph, "EasyWinampControl plugin unloaded\n");
return 1;
}

View File

@ -5,8 +5,8 @@ all: ewc.obj ewc.def
ewc.def:
echo EXPORTS > ewc.def
echo xchat_plugin_init >> ewc.def
echo xchat_plugin_deinit >> ewc.def
echo hexchat_plugin_init >> ewc.def
echo hexchat_plugin_deinit >> ewc.def
ewc.obj: ewc.c makefile.mak
cl $(CFLAGS) ewc.c

View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{17E4BE39-76F7-4A06-AD21-EFD0C5091F76}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>exec</RootNamespace>
<ProjectName>exec</ProjectName>
</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>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</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-xp.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-xp.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<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>
</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>
<ItemGroup>
<None Include="exec.def" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="exec.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,23 @@
<?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="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>
</ItemGroup>
<ItemGroup>
<None Include="exec.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClCompile Include="exec.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -23,12 +23,12 @@
#include <windows.h>
#include <time.h>
#include "xchat-plugin.h"
#include "hexchat-plugin.h"
static xchat_plugin *ph; /* plugin handle */
static const char name[] = "Exec";
static const char desc[] = "Execute commands inside HexChat";
static const char version[] = "1.1";
static hexchat_plugin *ph; /* plugin handle */
static char name[] = "Exec";
static char desc[] = "Execute commands inside HexChat";
static char version[] = "1.1";
static int
run_command (char *word[], char *word_eol[], void *userdata)
@ -51,6 +51,8 @@ run_command (char *word[], char *word_eol[], void *userdata)
secattr.nLength = sizeof (secattr);
secattr.bInheritHandle = TRUE;
timeElapsed = 0.0;
if (strlen (word[2]) > 0)
{
strcpy (commandLine, "cmd.exe /c ");
@ -58,8 +60,8 @@ run_command (char *word[], char *word_eol[], void *userdata)
if (!stricmp("-O", word[2]))
{
/*strcat (commandLine, word_eol[3]);*/
xchat_printf (ph, "Printing Exec output to others is not supported yet.\n");
return XCHAT_EAT_XCHAT;
hexchat_printf (ph, "Printing Exec output to others is not supported yet.\n");
return HEXCHAT_EAT_HEXCHAT;
}
else
{
@ -88,7 +90,7 @@ run_command (char *word[], char *word_eol[], void *userdata)
{
/* avoid garbage */
buffer[dwRead] = '\0';
xchat_printf (ph, "%s", buffer);
hexchat_printf (ph, "%s", buffer);
}
}
else
@ -101,22 +103,22 @@ run_command (char *word[], char *word_eol[], void *userdata)
}
/* display a newline to separate things */
xchat_printf (ph, "\n");
hexchat_printf (ph, "\n");
if (timeElapsed >= 10)
{
xchat_printf (ph, "Command took too much time to run, execution aborted.\n");
hexchat_printf (ph, "Command took too much time to run, execution aborted.\n");
}
CloseHandle (readPipe);
CloseHandle (pInfo.hProcess);
CloseHandle (pInfo.hThread);
return XCHAT_EAT_XCHAT;
return HEXCHAT_EAT_HEXCHAT;
}
int
xchat_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
ph = plugin_handle;
@ -124,15 +126,15 @@ xchat_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, char **plugi
*plugin_desc = desc;
*plugin_version = version;
xchat_hook_command (ph, "EXEC", XCHAT_PRI_NORM, run_command, "Usage: /EXEC [-O] - execute commands inside XChat", 0);
xchat_printf (ph, "%s plugin loaded\n", name);
hexchat_hook_command (ph, "EXEC", HEXCHAT_PRI_NORM, run_command, "Usage: /EXEC [-O] - execute commands inside HexChat", 0);
hexchat_printf (ph, "%s plugin loaded\n", name);
return 1; /* return 1 for success */
}
int
xchat_plugin_deinit (void)
hexchat_plugin_deinit (void)
{
xchat_printf (ph, "%s plugin unloaded\n", name);
hexchat_printf (ph, "%s plugin unloaded\n", name);
return 1;
}

View File

@ -1,3 +1,3 @@
EXPORTS
xchat_plugin_init
xchat_plugin_deinit
hexchat_plugin_init
hexchat_plugin_deinit

View File

@ -21,14 +21,12 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -45,18 +43,17 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcexec</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcexec</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
@ -64,7 +61,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;EXEC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -76,7 +73,6 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
@ -84,7 +80,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;EXEC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>

View File

@ -3,7 +3,7 @@ EXTRA_DIST = INSTALL LICENSE README
libdir = $(hexchatlibdir)/plugins
lib_LTLIBRARIES = fishlim.la
fishlim_la_SOURCES = fish.c irc.c keystore.c misc.c plugin_xchat.c
fishlim_la_SOURCES = fish.c irc.c keystore.c misc.c plugin_hexchat.c
fishlim_la_LDFLAGS = -avoid-version -module
fishlim_la_LIBADD =
INCLUDES = $(COMMON_CFLAGS) -I$(srcdir)/..
AM_CPPFLAGS = $(COMMON_CFLAGS) -I$(srcdir)/../../src/common

View File

@ -1,45 +0,0 @@
FiSHLiM
http://fishlim.kodafritt.se/
FiSHLiM is an XChat plugin for FiSH IRC encryption. It's my attempt at making
a simple, lightweight and secure plugin for this encryption protocol.
For installation instructions, see the INSTALL file.
Features
--------
Working:
* Sending/receiving messages
* Topic decryption
* Using unecrypted keys / keys without a password from blow.ini
* Pure protocol-level filtering (works with highlighting, nick coloring etc)
* Partially encrypted messages (i.e. prefixed with nickname by a bouncer)
Not working:
* Key exchange
* Password-protected key storage
* Topic encryption
* Remote exploitation (hopefully!)
* Plaintext content that contain +OK is decrypted twice
Commands
--------
/setkey [nick or #channel] password
Sets the encryption key for the nick or channel to password. The keys
are stored in the configuration file in ~/.xchat2/blow.ini
/delkey nick-or-#channel
Deletes the given nick or channel from the configuration file.

View File

@ -0,0 +1,121 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{3C4F42FC-292A-420B-B63D-C03DFBDD8E4E}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>fishlim</RootNamespace>
<ProjectName>fishlim</ProjectName>
</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>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</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-xp.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-xp.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<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>
</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>
</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>
</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;FISHLIM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;%(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>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="fishlim.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="bool.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="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

@ -0,0 +1,59 @@
<?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>
</ItemGroup>
<ItemGroup>
<None Include="fishlim.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="bool.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="fish.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="irc.h">
<Filter>Header Files</Filter>
</ClInclude>
<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>
</ItemGroup>
<ItemGroup>
<ClCompile Include="fish.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="irc.c">
<Filter>Source Files</Filter>
</ClCompile>
<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>
</ItemGroup>
</Project>

View File

@ -1,4 +1,4 @@
EXPORTS
xchat_plugin_init
xchat_plugin_deinit
xchat_plugin_get_info
hexchat_plugin_init
hexchat_plugin_deinit
hexchat_plugin_get_info

View File

@ -21,14 +21,12 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -45,18 +43,17 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcfishlim</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcfishlim</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
@ -64,7 +61,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -78,7 +75,6 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
@ -86,7 +82,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -107,14 +103,14 @@
<ClInclude Include="irc.h" />
<ClInclude Include="keystore.h" />
<ClInclude Include="misc.h" />
<ClInclude Include="plugin_xchat.h" />
<ClInclude Include="plugin_hexchat.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="fish.c" />
<ClCompile Include="irc.c" />
<ClCompile Include="keystore.c" />
<ClCompile Include="misc.c" />
<ClCompile Include="plugin_xchat.c" />
<ClCompile Include="plugin_hexchat.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -35,7 +35,7 @@
<ClInclude Include="misc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="plugin_xchat.h">
<ClInclude Include="plugin_hexchat.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
@ -52,7 +52,7 @@
<ClCompile Include="misc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="plugin_xchat.c">
<ClCompile Include="plugin_hexchat.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>

View File

@ -29,7 +29,7 @@
#include "fish.h"
#include "misc.h"
#include "keystore.h"
#include "plugin_xchat.h"
#include "plugin_hexchat.h"
static char *keystore_password = NULL;

View File

@ -27,8 +27,8 @@
#include <string.h>
// #pragma GCC visibility push(default)
#include "xchat-plugin.h"
#define XCHAT_MAX_WORDS 32
#include "hexchat-plugin.h"
#define HEXCHAT_MAX_WORDS 32
// #pragma GCC visibility pop
//#define EXPORT __attribute((visibility("default")))
@ -45,14 +45,14 @@ static const char plugin_version[] = "0.0.16";
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 xchat_plugin *ph;
static hexchat_plugin *ph;
/**
* Returns the path to the key store file.
*/
gchar *get_config_filename() {
return g_build_filename(xchat_get_info(ph, "xchatdirfs"), "addon_fishlim.conf", NULL);
return g_build_filename(hexchat_get_info(ph, "configdir"), "addon_fishlim.conf", NULL);
}
/**
@ -74,12 +74,12 @@ static bool append(char **s, size_t *length, const char *data) {
/*static int handle_debug(char *word[], char *word_eol[], void *userdata) {
xchat_printf(ph, "debug incoming: ");
hexchat_printf(ph, "debug incoming: ");
for (size_t i = 1; word[i] != NULL && word[i][0] != '\0'; i++) {
xchat_printf(ph, ">%s< ", word[i]);
hexchat_printf(ph, ">%s< ", word[i]);
}
xchat_printf(ph, "\n");
return XCHAT_EAT_NONE;
hexchat_printf(ph, "\n");
return HEXCHAT_EAT_NONE;
}*/
/**
@ -88,19 +88,19 @@ 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
const char *channel = xchat_get_info(ph, "channel");
const char *channel = hexchat_get_info(ph, "channel");
char *encrypted = fish_encrypt_for_nick(channel, word_eol[1]);
if (!encrypted) return XCHAT_EAT_NONE;
if (!encrypted) return HEXCHAT_EAT_NONE;
// Display message
own_nick = xchat_get_info(ph, "nick");
xchat_emit_print(ph, "Your Message", own_nick, word_eol[1], NULL);
own_nick = hexchat_get_info(ph, "nick");
hexchat_emit_print(ph, "Your Message", own_nick, word_eol[1], NULL);
// Send message
xchat_commandf(ph, "PRIVMSG %s :+OK %s", channel, encrypted);
hexchat_commandf(ph, "PRIVMSG %s :+OK %s", channel, encrypted);
free(encrypted);
return XCHAT_EAT_XCHAT;
return HEXCHAT_EAT_HEXCHAT;
}
/**
@ -121,17 +121,17 @@ static int handle_incoming(char *word[], char *word_eol[], void *userdata) {
size_t length;
if (!irc_parse_message((const char **)word, &prefix, &command, &w))
return XCHAT_EAT_NONE;
return HEXCHAT_EAT_NONE;
// Topic (command 332) has an extra parameter
if (!strcmp(command, "332")) w++;
// Look for encrypted data
for (ew = w+1; ew < XCHAT_MAX_WORDS-1; ew++) {
for (ew = w+1; ew < HEXCHAT_MAX_WORDS-1; ew++) {
const char *s = (ew == w+1 ? word[ew]+1 : word[ew]);
if (strcmp(s, "+OK") == 0 || strcmp(s, "mcps") == 0) goto has_encrypted_data;
}
return XCHAT_EAT_NONE;
return HEXCHAT_EAT_NONE;
has_encrypted_data: ;
// Extract sender nick and recipient nick/channel
sender_nick = irc_prefix_get_nick(prefix);
@ -150,7 +150,7 @@ static int handle_incoming(char *word[], char *word_eol[], void *userdata) {
length = 0;
if (!append(&message, &length, "RECV")) goto decrypt_error;
for (uw = 1; uw < XCHAT_MAX_WORDS; uw++) {
for (uw = 1; uw < HEXCHAT_MAX_WORDS; uw++) {
if (word[uw][0] != '\0' && !append(&message, &length, " ")) goto decrypt_error;
if (uw == ew) {
@ -173,17 +173,17 @@ static int handle_incoming(char *word[], char *word_eol[], void *userdata) {
free(decrypted);
// Simulate unencrypted message
//xchat_printf(ph, "simulating: %s\n", message);
xchat_command(ph, message);
//hexchat_printf(ph, "simulating: %s\n", message);
hexchat_command(ph, message);
free(message);
free(sender_nick);
return XCHAT_EAT_XCHAT;
return HEXCHAT_EAT_HEXCHAT;
decrypt_error:
free(decrypted);
free(sender_nick);
return XCHAT_EAT_NONE;
return HEXCHAT_EAT_NONE;
}
/**
@ -195,13 +195,13 @@ static int handle_setkey(char *word[], char *word_eol[], void *userdata) {
// Check syntax
if (*word[2] == '\0') {
xchat_printf(ph, "%s\n", usage_setkey);
return XCHAT_EAT_XCHAT;
hexchat_printf(ph, "%s\n", usage_setkey);
return HEXCHAT_EAT_HEXCHAT;
}
if (*word[3] == '\0') {
// /setkey password
nick = xchat_get_info(ph, "channel");
nick = hexchat_get_info(ph, "channel");
key = word_eol[2];
} else {
// /setkey #channel password
@ -211,12 +211,12 @@ static int handle_setkey(char *word[], char *word_eol[], void *userdata) {
// Set password
if (keystore_store_key(nick, key)) {
xchat_printf(ph, "Stored key for %s\n", nick);
hexchat_printf(ph, "Stored key for %s\n", nick);
} else {
xchat_printf(ph, "\00305Failed to store key in blow.ini\n", nick, key);
hexchat_printf(ph, "\00305Failed to store key in blow.ini\n", nick, key);
}
return XCHAT_EAT_XCHAT;
return HEXCHAT_EAT_HEXCHAT;
}
/**
@ -227,26 +227,26 @@ static int handle_delkey(char *word[], char *word_eol[], void *userdata) {
// Check syntax
if (*word[2] == '\0' || *word[3] != '\0') {
xchat_printf(ph, "%s\n", usage_delkey);
return XCHAT_EAT_XCHAT;
hexchat_printf(ph, "%s\n", usage_delkey);
return HEXCHAT_EAT_HEXCHAT;
}
nick = word_eol[2];
// Delete the given nick from the key store
if (keystore_delete_nick(nick)) {
xchat_printf(ph, "Deleted key for %s\n", nick);
hexchat_printf(ph, "Deleted key for %s\n", nick);
} else {
xchat_printf(ph, "\00305Failed to delete key in blow.ini!\n", nick);
hexchat_printf(ph, "\00305Failed to delete key in blow.ini!\n", nick);
}
return XCHAT_EAT_XCHAT;
return HEXCHAT_EAT_HEXCHAT;
}
/**
* Returns the plugin name version information.
*/
void xchat_plugin_get_info(const char **name, const char **desc,
void hexchat_plugin_get_info(const char **name, const char **desc,
const char **version, void **reserved) {
*name = plugin_name;
*desc = plugin_desc;
@ -256,37 +256,37 @@ void xchat_plugin_get_info(const char **name, const char **desc,
/**
* Plugin entry point.
*/
int xchat_plugin_init(xchat_plugin *plugin_handle,
int hexchat_plugin_init(hexchat_plugin *plugin_handle,
const char **name,
const char **desc,
const char **version,
char *arg) {
ph = plugin_handle;
/* Send our info to XChat */
/* Send our info to HexChat */
*name = plugin_name;
*desc = plugin_desc;
*version = plugin_version;
/* Register commands */
xchat_hook_command(ph, "SETKEY", XCHAT_PRI_NORM, handle_setkey, usage_setkey, NULL);
xchat_hook_command(ph, "DELKEY", XCHAT_PRI_NORM, handle_delkey, usage_delkey, NULL);
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);
/* Add handlers */
xchat_hook_command(ph, "", XCHAT_PRI_NORM, handle_outgoing, NULL, NULL);
xchat_hook_server(ph, "NOTICE", XCHAT_PRI_NORM, handle_incoming, NULL);
xchat_hook_server(ph, "PRIVMSG", XCHAT_PRI_NORM, handle_incoming, NULL);
//xchat_hook_server(ph, "RAW LINE", XCHAT_PRI_NORM, handle_debug, NULL);
xchat_hook_server(ph, "TOPIC", XCHAT_PRI_NORM, handle_incoming, NULL);
xchat_hook_server(ph, "332", XCHAT_PRI_NORM, handle_incoming, NULL);
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);
xchat_printf(ph, "%s plugin loaded\n", plugin_name);
hexchat_printf(ph, "%s plugin loaded\n", plugin_name);
/* Return success */
return 1;
}
int xchat_plugin_deinit(void) {
xchat_printf(ph, "%s plugin unloaded\n", plugin_name);
int hexchat_plugin_deinit(void) {
hexchat_printf(ph, "%s plugin unloaded\n", plugin_name);
return 1;
}

View File

@ -22,8 +22,8 @@
*/
#ifndef XCHAT_PLUGIN_H
#define XCHAT_PLUGIN_H
#ifndef PLUGIN_HEXCHAT_H
#define PLUGIN_HEXCHAT_H
gchar *get_config_filename();

View File

@ -27,7 +27,7 @@
#include <string.h>
#include "fish.h"
// We can't use the XChat plugin API from here...
// 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);

View File

@ -22,9 +22,9 @@
#include <windows.h>
#include "xchat-plugin.h"
#include "hexchat-plugin.h"
static xchat_plugin *ph; /* plugin handle */
static hexchat_plugin *ph; /* plugin handle */
static void
launch_tool ()
@ -38,7 +38,7 @@ launch_tool ()
if (!CreateProcess ( NULL, "gtk2-prefs.exe", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
{
xchat_print (ph, "Error launching the GTK+ Preference Tool! Maybe the executable is missing?");
hexchat_print (ph, "Error launching the GTK+ Preference Tool! Maybe the executable is missing?");
}
CloseHandle (pi.hProcess);
@ -46,7 +46,7 @@ launch_tool ()
}
int
xchat_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
ph = plugin_handle;
@ -54,16 +54,16 @@ xchat_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, char **plugi
*plugin_desc = "GTK+ Preference Tool Launcher";
*plugin_version = "1.0";
xchat_hook_command (ph, "GTKPREF", XCHAT_PRI_NORM, launch_tool, 0, 0);
xchat_command (ph, "MENU -ietc\\gtkpref.png ADD \"Settings/GTK+ Preferences\" \"GTKPREF\"");
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
xchat_plugin_deinit (void)
hexchat_plugin_deinit (void)
{
xchat_command (ph, "MENU DEL \"Settings/GTK+ Preferences\"");
hexchat_command (ph, "MENU DEL \"Settings/GTK+ Preferences\"");
return 1;
}

View File

@ -5,8 +5,8 @@ all: gtkpref.obj gtkpref.def
gtkpref.def:
echo EXPORTS > gtkpref.def
echo xchat_plugin_init >> gtkpref.def
echo xchat_plugin_deinit >> 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

View File

@ -23,10 +23,10 @@
#include <commctrl.h>
#include <tchar.h>
#include "xchat-plugin.h"
#include "hexchat-plugin.h"
#include "utility.h"
#include "xtray.h"
#include "xchat.h"
#include "hextray.h"
#include "hexchat.h"
#include "callbacks.h"
#include "resource.h"
#include "sdTray.h"
@ -45,7 +45,7 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
TCHAR szTitle[10];
GetWindowText(hWnd, szTitle, 9);
if(_tcsstr(szTitle, _T("XChat [")))
if(_tcsstr(szTitle, _T("HexChat [")))
{
g_hXchatWnd = hWnd;
return false;
@ -55,15 +55,15 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
}
/***********************************************************************************************/
/******* our xchat event call back, get the name and info for each event and save it ***********/
/******* for our alerts later ***********/
/******* 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 XCHAT_EAT_NONE;
return HEXCHAT_EAT_NONE;
/***************************************************************************************/
/***** if the window is minimized or if we're allowed to show alerts when its not **/
@ -90,12 +90,12 @@ int event_cb(char *word[], void *userdata)
{
case CHAN_HILIGHT:
_snprintf(szInfo, 512, "%s:\r\n%s", word[1], word[2]);
_snprintf(szName, 64, "Highlight: %s", xchat_get_info (ph, "channel"));
_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", xchat_get_info (ph, "channel"));
_snprintf(szName, 64, "Channel Message: %s", hexchat_get_info (ph, "channel"));
dwInfoFlags = NIIF_INFO;
break;
case CHAN_TOPIC_CHANGE:
@ -114,7 +114,7 @@ int event_cb(char *word[], void *userdata)
dwInfoFlags = NIIF_WARNING;
break;
case CHAN_BANNED:
_snprintf(szInfo, 512, "Cannot join #%s You are banned.", word[1]);
_snprintf(szInfo, 512, "Cannot join %s You are banned.", word[1]);
_snprintf(szName, 64, "Banned");
dwInfoFlags = NIIF_WARNING;
break;
@ -152,9 +152,9 @@ int event_cb(char *word[], void *userdata)
/**************************************************************************************/
/***** Use windows instead of balloons, and if its a window should we keep it open ****/
/***** indefinately? ****/
/***** indefinitely? ****/
/**************************************************************************************/
szTemp = xchat_strip_color(szInfo);
szTemp = hexchat_strip_color(szInfo);
if(g_dwPrefs & (1<<PREF_UWIOB))
{
@ -174,9 +174,9 @@ int event_cb(char *word[], void *userdata)
}
/***********************************/
/***** pass the events to xchat ****/
/***** pass the events to HexChat **/
/***********************************/
return XCHAT_EAT_NONE;
return HEXCHAT_EAT_NONE;
}
int command_cb(char *word[], char *word_eol[], void *userdata)
@ -186,7 +186,7 @@ int command_cb(char *word[], char *word_eol[], void *userdata)
int iTime = g_iTime*1000;
_snprintf(szInfo, 512, word_eol[2]);
szTemp = xchat_strip_color(szInfo);
szTemp = hexchat_strip_color(szInfo);
if(g_dwPrefs & (1<<PREF_KAOI))
{
@ -207,7 +207,7 @@ int command_cb(char *word[], char *word_eol[], void *userdata)
free(szTemp);
return XCHAT_EAT_ALL;
return HEXCHAT_EAT_ALL;
}
LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
@ -223,7 +223,7 @@ LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
/*******************************************/
if(g_dwPrefs & (1<<PREF_AOM))
{
xchat_globally_away(g_szAway);
hexchat_globally_away(g_szAway);
}
/**************************************************/
@ -256,7 +256,7 @@ LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
case WM_SIZE:
{
/******************************************/
/***** User wants to minimize xChat, ******/
/***** User wants to minimize HexChat, ****/
/***** are we allowed to go to tray? ******/
/******************************************/
if((g_dwPrefs & (1<<PREF_TOT)) && (wparam == SIZE_MINIMIZED))
@ -266,7 +266,7 @@ LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
/*******************************************/
if(g_dwPrefs & (1<<PREF_AOM))
{
xchat_globally_away(g_szAway);
hexchat_globally_away(g_szAway);
}
/**************************************************/
@ -299,7 +299,7 @@ LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
if(g_dwPrefs & (1<<PREF_AOM))
{
xchat_globally_back();
hexchat_globally_back();
}
}
else
@ -344,7 +344,7 @@ LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wparam, LPARAM lparam)
if(msg == RegisterWindowMessage(_T("TaskbarCreated")))
{
char szVersion[64];
_snprintf(szVersion, 64, "HexChat [%s]", xchat_get_info(ph, "version"));
_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);
}
}
@ -369,16 +369,16 @@ LRESULT CALLBACK sdTrayProc(HWND hWnd, int msg)
break;
case ACT_RESTORE:
{
/***********************************************/
/** user wants us to restore the xchat window **/
/** and of autoaway is on, set as back **/
/***********************************************/
/*************************************************/
/** 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)))
{
xchat_globally_back();
hexchat_globally_back();
g_iIsActive = 1;
}
}
@ -390,27 +390,27 @@ LRESULT CALLBACK sdTrayProc(HWND hWnd, int msg)
break;
case ACT_AWAY:
{
xchat_globally_away(g_szAway);
hexchat_globally_away(g_szAway);
}
break;
case ACT_BACK:
{
xchat_globally_back();
hexchat_globally_back();
}
break;
default:
{
if(msg > 0)
{
xchat_set_context(ph, xchat_find_server(msg-1));
hexchat_set_context(ph, hexchat_find_server(msg-1));
if(!xchat_get_info(ph, "away"))
if(!hexchat_get_info(ph, "away"))
{
xchat_away(g_szAway);
hexchat_away(g_szAway);
}
else
{
xchat_back();
hexchat_back();
}
}
}

View File

@ -22,14 +22,14 @@
#include <stdio.h>
#include <tchar.h>
#include "xchat-plugin.h"
#include "xtray.h"
#include "hexchat-plugin.h"
#include "hextray.h"
#include "resource.h"
#include "xchat.h"
#include "hexchat.h"
#include "utility.h"
// from util.c of xchat source code ( slightly modified to fit X-Tray Syntax )
char *xchat_strip_color (char *text)
// 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;
@ -155,7 +155,7 @@ void check_special_chars (char *cmd)
}
}
void xchat_globally_away(TCHAR *tszAway)
void hexchat_globally_away(TCHAR *tszAway)
{
char szTemp[512];
char szAway[512];
@ -163,10 +163,10 @@ void xchat_globally_away(TCHAR *tszAway)
ConvertString(tszAway, szAway, 512);
_snprintf(szTemp, 512, "ALLSERV AWAY %s\0", szAway);
check_special_chars(szTemp);
xchat_exec(szTemp);
hexchat_exec(szTemp);
}
void xchat_away(TCHAR *tszAway)
void hexchat_away(TCHAR *tszAway)
{
char szTemp[512];
char szAway[512];
@ -174,42 +174,42 @@ void xchat_away(TCHAR *tszAway)
ConvertString(tszAway, szAway, 512);
_snprintf(szTemp, 512, szAway);
check_special_chars(szTemp);
xchat_commandf(ph, "AWAY %s\0", szTemp);
hexchat_commandf(ph, "AWAY %s\0", szTemp);
}
void xchat_globally_back()
void hexchat_globally_back()
{
std::vector<int> xs;
std::vector<int>::iterator xsi;
xchat_list *xl = xchat_list_get(ph, "channels");
hexchat_list *xl = hexchat_list_get(ph, "channels");
if(xl)
{
while(xchat_list_next(ph, xl))
while(hexchat_list_next(ph, xl))
{
xsi = std::find(xs.begin(), xs.end(), xchat_list_int(ph, xl, "id"));
xsi = std::find(xs.begin(), xs.end(), hexchat_list_int(ph, xl, "id"));
if((xsi == xs.end()) &&
((strlen(xchat_list_str(ph, xl, "server")) > 0) ||
(strlen(xchat_list_str(ph, xl, "channel")) > 0)))
((strlen(hexchat_list_str(ph, xl, "server")) > 0) ||
(strlen(hexchat_list_str(ph, xl, "channel")) > 0)))
{
xs.push_back(xchat_list_int(ph, xl, "id"));
xchat_set_context(ph, (xchat_context *)xchat_list_str(ph, xl, "context"));
xchat_back();
xs.push_back(hexchat_list_int(ph, xl, "id"));
hexchat_set_context(ph, (hexchat_context *)hexchat_list_str(ph, xl, "context"));
hexchat_back();
}
}
xchat_list_free(ph, xl);
hexchat_list_free(ph, xl);
}
}
void xchat_back()
void hexchat_back()
{
if(xchat_get_info(ph, "away"))
if(hexchat_get_info(ph, "away"))
{
xchat_command(ph, "BACK");
hexchat_command(ph, "BACK");
}
}
@ -222,7 +222,7 @@ HMENU setServerMenu()
std::vector<int> xs;
std::vector<int>::iterator xsi;
xchat_list *xl = xchat_list_get(ph, "channels");
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"));
@ -230,20 +230,20 @@ HMENU setServerMenu()
if(xl)
{
while(xchat_list_next(ph, xl))
while(hexchat_list_next(ph, xl))
{
xsi = std::find(xs.begin(), xs.end(), xchat_list_int(ph, xl, "id"));
xsi = std::find(xs.begin(), xs.end(), hexchat_list_int(ph, xl, "id"));
if( (xsi == xs.end()) &&
((strlen(xchat_list_str(ph, xl, "server")) > 0) ||
(strlen(xchat_list_str(ph, xl, "channel")) > 0)))
((strlen(hexchat_list_str(ph, xl, "server")) > 0) ||
(strlen(hexchat_list_str(ph, xl, "channel")) > 0)))
{
xchat_set_context(ph, (xchat_context *)xchat_list_str(ph, xl, "context"));
xs.push_back(xchat_list_int(ph, xl, "id"));
hexchat_set_context(ph, (hexchat_context *)hexchat_list_str(ph, xl, "context"));
xs.push_back(hexchat_list_int(ph, xl, "id"));
char *network = _strdup(xchat_list_str(ph, xl, "network"));
char *server = _strdup(xchat_list_str(ph, xl, "server"));
char *nick = _strdup(xchat_get_info(ph, "nick"));
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)
{
@ -259,13 +259,13 @@ HMENU setServerMenu()
ConvertString(nick, wszNick, 128);
_sntprintf(wszMenuEntry, 256, _T("%s @ %s\0"), wszNick, wszServer);
if(!xchat_get_info(ph, "away"))
if(!hexchat_get_info(ph, "away"))
{
AppendMenu(sTemp, MF_STRING, (xchat_list_int(ph, xl, "id") + 1), wszMenuEntry);
AppendMenu(sTemp, MF_STRING, (hexchat_list_int(ph, xl, "id") + 1), wszMenuEntry);
}
else
{
AppendMenu(sTemp, (MF_CHECKED | MF_STRING), (xchat_list_int(ph, xl, "id") + 1), wszMenuEntry);
AppendMenu(sTemp, (MF_CHECKED | MF_STRING), (hexchat_list_int(ph, xl, "id") + 1), wszMenuEntry);
}
}
@ -275,24 +275,24 @@ HMENU setServerMenu()
}
}
xchat_list_free(ph, xl);
hexchat_list_free(ph, xl);
}
return sTemp;
}
struct _xchat_context *xchat_find_server(int find_id)
struct _hexchat_context *hexchat_find_server(int find_id)
{
xchat_context *xc;
xchat_list *xl = xchat_list_get(ph, "channels");
hexchat_context *xc;
hexchat_list *xl = hexchat_list_get(ph, "channels");
int id;
if(!xl)
return NULL;
while(xchat_list_next(ph, xl))
while(hexchat_list_next(ph, xl))
{
id = xchat_list_int(ph, xl, "id");
id = hexchat_list_int(ph, xl, "id");
if(id == -1)
{
@ -300,21 +300,21 @@ struct _xchat_context *xchat_find_server(int find_id)
}
else if(id == find_id)
{
xc = (xchat_context *)xchat_list_str(ph, xl, "context");
xc = (hexchat_context *)hexchat_list_str(ph, xl, "context");
xchat_list_free(ph, xl);
hexchat_list_free(ph, xl);
return xc;
}
}
xchat_list_free(ph, xl);
hexchat_list_free(ph, xl);
return NULL;
}
void xchat_exec(char *command)
void hexchat_exec(char *command)
{
xchat_set_context(ph, xchat_find_context(ph, NULL, NULL));
xchat_command(ph, command);
hexchat_set_context(ph, hexchat_find_context(ph, NULL, NULL));
hexchat_command(ph, command);
}

View File

@ -19,14 +19,14 @@
#ifndef _H_XCHAT_H
#define _H_XCHAT_H
void xchat_exec (char *);
char *xchat_strip_color (char *);
void xchat_parse (char *);
struct _xchat_context *xchat_find_server (int);
void xchat_globally_away (TCHAR *);
void xchat_away (TCHAR *);
void xchat_globally_back ();
void xchat_back ();
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

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{3024CF36-85E5-4E00-9608-7002E2C7EF14}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>hextray</RootNamespace>
<ProjectName>hextray</ProjectName>
</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>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</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-xp.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-xp.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;_STL70_;_STATIC_CPPLIB;%(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>
<AdditionalDependencies>ntstc_msvcrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</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;_STL70_;_STATIC_CPPLIB;%(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>
<AdditionalDependencies>ntstc_msvcrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</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

@ -0,0 +1,103 @@
<?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>

View File

@ -23,24 +23,24 @@
#include <string>
#include <shobjidl.h>
#include "xchat-plugin.h"
#include "hexchat-plugin.h"
#include "resource.h"
#include "callbacks.h"
#include "utility.h"
#include "xtray.h"
#include "hextray.h"
#include "sdTray.h"
#include "sdAlerts.h"
/*****************************************************/
/**** Don't want to pollute the namespace do we? *****/
/*****************************************************/
std::list<xchat_hook *> g_vHooks;
std::list<hexchat_hook *> g_vHooks;
/*****************************************************/
/************ Global Identifiers *********************/
/*****************************************************/
WNDPROC g_hOldProc;
xchat_plugin *ph;
hexchat_plugin *ph;
/*****************************************************/
/***************** Resources *************************/
@ -69,23 +69,50 @@ BOOL WINAPI DllMain(HANDLE hModule, DWORD fdwReason, LPVOID lpVoid)
return TRUE;
}
int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
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.2.4";
*plugin_version = "1.3.0";
char buffer[256];
/***************************************************************************************************************************/
/************************* Load our preferances from xTray.ini *************************************************************/
/************************* 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 xChat window and saves it for later use ***********************************************/
/************************* Finds the HexChat window and saves it for later use *********************************************/
/***************************************************************************************************************************/
g_hXchatWnd = (HWND)xchat_get_info(ph, "win_ptr");
g_hXchatWnd = (HWND)hexchat_get_info(ph, "win_ptr");
if(g_hXchatWnd == NULL)
{
@ -96,7 +123,7 @@ int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name, char **pl
SetWindowLongPtr(g_hXchatWnd, GWLP_WNDPROC, (LONG_PTR)WindowProc);
/***************************************************************************************************************************/
/************************* Grab the xChat Icon, Load our menu, create the window to receive the hotkey messages ***********/
/************************* 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);
@ -116,7 +143,7 @@ int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name, char **pl
/************************* Add our icon to the tray ************************************************************************/
/***************************************************************************************************************************/
char szVersion[64];
_snprintf(szVersion, 64, "HexChat %s", xchat_get_info(ph, "version"));
_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);
/***************************************************************************************************************************/
@ -134,25 +161,25 @@ int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name, char **pl
/***************************************************************************************************************************/
/************************* Set our hooks and save them for later so we can unhook them *************************************/
/***************************************************************************************************************************/
g_vHooks.push_back(xchat_hook_print(ph, "Channel Msg Hilight", XCHAT_PRI_NORM, event_cb, (void *)CHAN_HILIGHT));
g_vHooks.push_back(xchat_hook_print(ph, "Channel Message", XCHAT_PRI_NORM, event_cb, (void *)CHAN_MESSAGE));
g_vHooks.push_back(xchat_hook_print(ph, "Topic Change", XCHAT_PRI_NORM, event_cb, (void *)CHAN_TOPIC_CHANGE));
g_vHooks.push_back(xchat_hook_print(ph, "Channel Action Hilight", XCHAT_PRI_NORM, event_cb, (void *)CHAN_HILIGHT));
g_vHooks.push_back(xchat_hook_print(ph, "Channel INVITE", XCHAT_PRI_NORM, event_cb, (void *)CHAN_INVITE));
g_vHooks.push_back(xchat_hook_print(ph, "You Kicked", XCHAT_PRI_NORM, event_cb, (void *)CHAN_KICKED));
g_vHooks.push_back(xchat_hook_print(ph, "Banned", XCHAT_PRI_NORM, event_cb, (void *)CHAN_BANNED));
g_vHooks.push_back(xchat_hook_print(ph, "CTCP Generic", XCHAT_PRI_NORM, event_cb, (void *)CTCP_GENERIC));
g_vHooks.push_back(xchat_hook_print(ph, "Private Message", XCHAT_PRI_NORM, event_cb, (void *)PMSG_RECEIVE));
g_vHooks.push_back(xchat_hook_print(ph, "Private Message to Dialog", XCHAT_PRI_NORM, event_cb, (void *)PMSG_RECEIVE));
g_vHooks.push_back(xchat_hook_print(ph, "Disconnected", XCHAT_PRI_NORM, event_cb, (void *)SERV_DISCONNECT));
g_vHooks.push_back(xchat_hook_print(ph, "Killed", XCHAT_PRI_NORM, event_cb, (void *)SERV_KILLED));
g_vHooks.push_back(xchat_hook_print(ph, "Notice", XCHAT_PRI_NORM, event_cb, (void *)SERV_NOTICE));
g_vHooks.push_back(xchat_hook_command(ph, "tray_alert", XCHAT_PRI_NORM, command_cb, "Create an Alert", NULL));
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 xchat_plugin_deinit(xchat_plugin *plugin_handle)
int hexchat_plugin_deinit(hexchat_plugin *plugin_handle)
{
/******************************************/
/****** Remove the Icon from the tray *****/
@ -204,13 +231,13 @@ int xchat_plugin_deinit(xchat_plugin *plugin_handle)
sdCloseAlerts();
}
/******************************************/
/****** remove our xchat_hook_*s **********/
/****** remove our hexchat_hook_*s **********/
/******************************************/
while(!g_vHooks.empty())
{
if(g_vHooks.back() != NULL)
{
xchat_unhook(ph, g_vHooks.back());
hexchat_unhook(ph, g_vHooks.back());
}
g_vHooks.pop_back();
}

View File

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

View File

@ -19,6 +19,12 @@
#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;
@ -30,7 +36,7 @@ extern unsigned int g_dwPrefs;
extern TCHAR g_szAway[512];
extern int g_iTime;
extern WNDPROC g_hOldProc;
extern struct _xchat_plugin *ph;
extern struct _hexchat_plugin *ph;
/******************************************************/
/******************** Messages ************************/
@ -59,7 +65,7 @@ extern struct _xchat_plugin *ph;
#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 indefinately
#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

View File

@ -20,15 +20,13 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -44,54 +42,52 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
<TargetName>hchextray</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
<TargetName>hchextray</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;XTRAY_EXPORTS;_STL70_;_STATIC_CPPLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;XTRAY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>xtray.def</ModuleDefinitionFile>
<AdditionalDependencies>ntstc_msvcrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>hextray.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;XTRAY_EXPORTS;_STL70_;_STATIC_CPPLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;XTRAY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>xtray.def</ModuleDefinitionFile>
<AdditionalDependencies>ntstc_msvcrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>hextray.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
@ -104,7 +100,7 @@
<None Include="icons\sd.ico" />
<None Include="icons\notice.ico" />
<None Include="icons\hexchat.ico" />
<None Include="xtray.def" />
<None Include="hextray.def" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="resource.rc" />
@ -114,8 +110,8 @@
<ClCompile Include="sdAlerts.cpp" />
<ClCompile Include="sdTray.cpp" />
<ClCompile Include="utility.cpp" />
<ClCompile Include="xchat.cpp" />
<ClCompile Include="xtray.cpp" />
<ClCompile Include="hexchat.cpp" />
<ClCompile Include="hextray.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="callbacks.h" />
@ -123,8 +119,8 @@
<ClInclude Include="sdAlerts.h" />
<ClInclude Include="sdTray.h" />
<ClInclude Include="utility.h" />
<ClInclude Include="xchat.h" />
<ClInclude Include="xtray.h" />
<ClInclude Include="hexchat.h" />
<ClInclude Include="hextray.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -21,7 +21,7 @@
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="xtray.def">
<None Include="hextray.def">
<Filter>Resource Files</Filter>
</None>
<None Include="bitmaps\sd.bmp">
@ -70,10 +70,10 @@
<ClCompile Include="utility.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="xchat.cpp">
<ClCompile Include="hexchat.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="xtray.cpp">
<ClCompile Include="hextray.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
@ -93,10 +93,10 @@
<ClInclude Include="utility.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="xchat.h">
<ClInclude Include="hexchat.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="xtray.h">
<ClInclude Include="hextray.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>

View File

@ -97,7 +97,7 @@ BEGIN
15,103,64,33
GROUPBOX "Special Thanks To:",IDC_STATIC,3,91,89,50
GROUPBOX "Version Information:",IDC_STATIC,101,92,109,49
LTEXT "1.2.4",IDC_STATIC,170,105,33,8,0,WS_EX_RIGHT
LTEXT "1.3.0",IDC_STATIC,170,105,33,8,0,WS_EX_RIGHT
LTEXT "Compiled In: ",IDC_STATIC,110,117,54,8
LTEXT "2012",IDC_STATIC,170,117,33,8,0,WS_EX_RIGHT
LTEXT "Version Number:",IDC_STATIC,110,105,54,8
@ -122,7 +122,7 @@ BEGIN
WS_BORDER | WS_TABSTOP,137,74,61,13
LTEXT "Close all alerts hotkey:",IDC_ALERT_HOTKEY_TEXT,39,75,
76,10
CONTROL "Leave alerts open indefinately",16,"Button",
CONTROL "Leave alerts open indefinitely",16,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,27,88,115,11
CONTROL "Blink Icon to alert me about events",18,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,16,18,127,10
@ -201,7 +201,7 @@ END
3 TEXTINCLUDE
BEGIN
"xtray.h\0"
"hextray.h\0"
END
4 TEXTINCLUDE
@ -219,8 +219,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,2,4,0
PRODUCTVERSION 1,2,4,0
FILEVERSION 1,3,0,0
PRODUCTVERSION 1,3,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -237,12 +237,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "SinisterDevelopments"
VALUE "FileDescription", "HexTray"
VALUE "FileVersion", "1, 2, 4, 0"
VALUE "FileVersion", "1,3,0,0"
VALUE "InternalName", "HexTray"
VALUE "LegalCopyright", "Copyright <20> 2005"
VALUE "OriginalFilename", "hextray.dll"
VALUE "OriginalFilename", "hchextray.dll"
VALUE "ProductName", "HexTray - HexChat Win32 System Tray Plugin"
VALUE "ProductVersion", "1, 2, 4, 0"
VALUE "ProductVersion", "1,3,0,0"
END
END
BLOCK "VarFileInfo"
@ -303,7 +303,7 @@ IDB_SD_LOGO BITMAP "bitmaps\\sd.bmp"
//
// Generated from the TEXTINCLUDE 3 resource.
//
xtray.h
hextray.h
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -21,13 +21,12 @@
#include <commctrl.h>
#include <tchar.h>
#include "xchat-plugin.h"
#include "hexchat-plugin.h"
#include "utility.h"
#include "xtray.h"
#include "hextray.h"
#include "callbacks.h"
#include "resource.h"
TCHAR BACKUP_INI_FILE[] = _T(".\\plugins\\config\\xtray.conf");
struct HOTKEY g_hHotKey;
/* we need to convert ALT and SHIFT modifiers
@ -75,95 +74,11 @@ WORD ModToHotkeyf(WORD modifiers)
void SavePrefs(int iDlg)
{
/**************************************************************************************************/
/********** allocate space for our string, and then set it to the currently logged on user ********/
/**************************************************************************************************/
DWORD dBuff = 257;
TCHAR szUser[257];
GetUserName(szUser, &dBuff);
/**************************************************************************************************/
/*********************** Test if the file exists, If it doesn't, Create It ************************/
/**************************************************************************************************/
TCHAR XTRAY_INI_FILE[1024];
#ifdef UNICODE
char temp[1024];
TCHAR TEMP_INI_FILE[1024];
_snprintf(temp, 1024, "%s\\xtray.conf", xchat_get_info(ph, "xchatdir"));
ConvertString(temp, TEMP_INI_FILE, 1024);
// ok this one is really ugly
// it checks to see if the file exists in two locations
// HexChat default config dir, if that fails it tries hexchat\plugins\config
// if neither one exists it tries to create it in
// HexChat default config dir, if that fails it tries hexchat\plugins\config
// In either case it writes \xFF\xFE to the file ( on creation )
// so that we can save unicode away messages WritePrivateProfile doesn't
// do this for us, though I think it really should
if(FileExists(TEMP_INI_FILE))
{
_tcscpy(XTRAY_INI_FILE, TEMP_INI_FILE);
}
else
{
if(FileExists(BACKUP_INI_FILE))
{
_tcscpy(XTRAY_INI_FILE, BACKUP_INI_FILE);
}
else
{
HANDLE xTemp;
DWORD dwBytesTemp;
if(xTemp = CreateFile(TEMP_INI_FILE, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL))
{
if(GetLastError() != ERROR_ALREADY_EXISTS)
{
WriteFile(xTemp, _T("\xFF\xFE"), 4, &dwBytesTemp, NULL);
}
CloseHandle(xTemp);
}
if(FileExists(TEMP_INI_FILE))
{
_tcscpy(XTRAY_INI_FILE, TEMP_INI_FILE);
}
else
{
HANDLE xBackup;
DWORD dwBytesBackup;
if(xBackup = CreateFile(TEMP_INI_FILE, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL))
{
if(GetLastError() != ERROR_ALREADY_EXISTS)
{
WriteFile(xBackup, _T("\xFF\xFE"), 4, &dwBytesBackup, NULL);
}
CloseHandle(xBackup);
}
if(FileExists(BACKUP_INI_FILE))
{
_tcscpy(XTRAY_INI_FILE, BACKUP_INI_FILE);
}
}
}
}
#else
_tcscpy(XTRAY_INI_FILE, BACKUP_INI_FILE);
#endif
WritePrivateProfileInt(szUser, _T("SETTINGS"), g_dwPrefs, XTRAY_INI_FILE);
WritePrivateProfileInt(szUser, _T("AOT"), g_iTime, XTRAY_INI_FILE);
WritePrivateProfileInt(szUser, _T("KEY"), g_hHotKey.key, XTRAY_INI_FILE);
WritePrivateProfileInt(szUser, _T("MOD"), g_hHotKey.mod, XTRAY_INI_FILE);
WritePrivateProfileString(szUser, _T("AWAY"), g_szAway, XTRAY_INI_FILE);
hexchat_pluginpref_set_int (ph, "settings", g_dwPrefs);
hexchat_pluginpref_set_int (ph, "aot", g_iTime);
hexchat_pluginpref_set_int (ph, "key", g_hHotKey.key);
hexchat_pluginpref_set_int (ph, "mod", g_hHotKey.mod);
hexchat_pluginpref_set_str (ph, "away", (const char*) g_szAway);
}
void LoadPrefs()
@ -171,114 +86,16 @@ void LoadPrefs()
/**************************************************************************************************/
/*********************** Our Settings Section *****************************************************/
/**************************************************************************************************/
DWORD dBuff = 257;
TCHAR szUser[257];
GetUserName(szUser, &dBuff);
/**************************************************************************************************/
/*********************** Test if the file exists, If it doesn't, Create It ************************/
/**************************************************************************************************/
TCHAR XTRAY_INI_FILE[1024];
#ifdef UNICODE
char temp[1024];
TCHAR TEMP_INI_FILE[1024];
_snprintf(temp, 1024, "%s\\xtray.conf", xchat_get_info(ph, "xchatdir"));
ConvertString(temp, TEMP_INI_FILE, 1024);
if(FileExists(TEMP_INI_FILE))
{
_tcscpy(XTRAY_INI_FILE, TEMP_INI_FILE);
}
else
{
if(FileExists(BACKUP_INI_FILE))
{
_tcscpy(XTRAY_INI_FILE, BACKUP_INI_FILE);
}
else
{
HANDLE xTemp;
DWORD dwBytesTemp;
if(xTemp = CreateFile(TEMP_INI_FILE, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL))
{
if(GetLastError() != ERROR_ALREADY_EXISTS)
{
WriteFile(xTemp, _T("\xFF\xFE"), 4, &dwBytesTemp, NULL);
}
CloseHandle(xTemp);
}
if(FileExists(TEMP_INI_FILE))
{
_tcscpy(XTRAY_INI_FILE, TEMP_INI_FILE);
}
else
{
HANDLE xBackup;
DWORD dwBytesBackup;
if(xBackup = CreateFile(TEMP_INI_FILE, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL))
{
if(GetLastError() != ERROR_ALREADY_EXISTS)
{
WriteFile(xBackup, _T("\xFF\xFE"), 4, &dwBytesBackup, NULL);
}
CloseHandle(xBackup);
}
if(FileExists(BACKUP_INI_FILE))
{
_tcscpy(XTRAY_INI_FILE, BACKUP_INI_FILE);
}
}
}
}
#else
_tcscpy(XTRAY_INI_FILE, BACKUP_INI_FILE);
#endif
/**************************************************************************************************/
/*************************** Get the value for each of our preferances ****************************/
/**************************************************************************************************/
g_dwPrefs = GetPrivateProfileInt(szUser, _T("SETTINGS"), 0, XTRAY_INI_FILE);
// backwards compatability
// also allows us to set defaults if its a new installation
// disable topic change, channel message and server notice by default
if(g_dwPrefs == 0)
{
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("HILIGHT"), 1, XTRAY_INI_FILE)<<1);
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("INVITE"), 1, XTRAY_INI_FILE)<<2);
/* g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("TOPIC"), 1, XTRAY_INI_FILE)<<3); */
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("BANNED"), 1, XTRAY_INI_FILE)<<4);
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("KICKED"), 1, XTRAY_INI_FILE)<<5);
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("CTCP"), 1, XTRAY_INI_FILE)<<6);
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("PMSG"), 1, XTRAY_INI_FILE)<<7);
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("KILLED"), 1, XTRAY_INI_FILE)<<8);
/* g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("NOTICE"), 1, XTRAY_INI_FILE)<<9); */
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("DISCONNECT"), 1, XTRAY_INI_FILE)<<10);
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("AOM"), 0, XTRAY_INI_FILE)<<11);
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("TOT"), 1, XTRAY_INI_FILE)<<12);
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("AMAE"), 1, XTRAY_INI_FILE)<<13);
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("OSBWM"), 0, XTRAY_INI_FILE)<<14);
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("UWIOB"), 0, XTRAY_INI_FILE)<<15);
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("KAOI"), 0, XTRAY_INI_FILE)<<16);
g_dwPrefs |= (GetPrivateProfileInt(szUser, _T("MIOC"), 0, XTRAY_INI_FILE)<<17);
}
g_hHotKey.key = GetPrivateProfileInt(szUser, _T("KEY"), 84, XTRAY_INI_FILE);
g_hHotKey.mod = GetPrivateProfileInt(szUser, _T("MOD"), (MOD_CONTROL | MOD_SHIFT), XTRAY_INI_FILE);
g_iTime = GetPrivateProfileInt(szUser, _T("AOT"), 5, XTRAY_INI_FILE);
GetPrivateProfileString(szUser, _T("AWAY"), _T(""), g_szAway, 1024, XTRAY_INI_FILE);
g_dwPrefs = hexchat_pluginpref_get_int (ph, "settings");
g_iTime = hexchat_pluginpref_get_int (ph, "aot");
g_hHotKey.key = hexchat_pluginpref_get_int (ph, "key");
g_hHotKey.mod = hexchat_pluginpref_get_int (ph, "mod");
hexchat_pluginpref_get_str (ph, "away", (char *) g_szAway);
/**************************************************************************************************/
/******************************** Register our hotkey with windows ********************************/
@ -519,20 +336,6 @@ int SetOption(HWND hDialog, unsigned int uiCheckBox, unsigned int uiPref)
return (g_dwPrefs & (1<<uiPref));
}
int WritePrivateProfileIntA(char *szSection, char *szItem, int iData, char *szPath)
{
char szData[33];
itoa(iData, szData, 10);
return WritePrivateProfileStringA(szSection, szItem, szData, szPath);
}
int WritePrivateProfileIntW(wchar_t *wszSection, wchar_t *wszItem, int iData, wchar_t *wszPath)
{
wchar_t wszData[33];
_itow(iData, wszData, 10);
return WritePrivateProfileStringW(wszSection, wszItem, wszData, wszPath);
}
// For cleanup ( Closing windows and the such )
void HoldClose()
{

View File

@ -38,15 +38,6 @@ void ConvertString(const char *in, wchar_t *out, int size);
void ConvertString(const wchar_t *in, char *out, int size);
void ConvertString(const char *in, char *out, int size);
int WritePrivateProfileIntA(char *, char *, int, char *);
int WritePrivateProfileIntW(wchar_t *, wchar_t *, int, wchar_t *);
#ifdef UNICODE
#define WritePrivateProfileInt WritePrivateProfileIntW
#else
#define WritePrivateProfileInt WritePrivateProfileIntA
#endif
struct HOTKEY
{
WORD key;

View File

@ -1,3 +0,0 @@
EXPORTS
xchat_plugin_init
xchat_plugin_deinit

133
plugins/lua/lua-xp.vcxproj Normal file
View File

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{646B4316-C8B8-4DB6-B6AE-E586929E5729}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>lua</RootNamespace>
<ProjectName>lua</ProjectName>
</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>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</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-xp.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-xp.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(LuaOutput)</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(LuaOutput)</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;LUA_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>"$(LuaLib).lib";%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUA_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>"$(LuaLib).lib";%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Link>
<AdditionalDependencies>"$(LuaLib).lib";$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Link>
<AdditionalDependencies>"$(LuaLib).lib";$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(OwnFlags);snprintf=g_snprintf;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<ModuleDefinitionFile>lua.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;$(OwnFlags);snprintf=g_snprintf;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<ModuleDefinitionFile>lua.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="lua.def" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="lua.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,23 @@
<?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="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>
</ItemGroup>
<ItemGroup>
<None Include="lua.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClCompile Include="lua.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -46,9 +46,12 @@
#include <errno.h>
#include <ctype.h>
#include <glib.h>
#ifdef _WIN32
#include <direct.h> /* for getcwd */
#include "../../src/dirent/dirent-win32.h"
#include "../../src/common/typedef.h"
#endif
#if !( defined(_WIN32) || defined(LXC_XCHAT_GETTEXT) )
@ -65,9 +68,9 @@
#define lua_pop(L,n) lua_settop(L, -(n)-1)
#include "xchat-plugin.h"
#include "hexchat-plugin.h"
static xchat_plugin *ph; /* plugin handle */
static hexchat_plugin *ph; /* plugin handle */
#define LXC_STRIP_COLOR 1
#define LXC_STRIP_ATTR 2
@ -76,7 +79,7 @@ static xchat_plugin *ph; /* plugin handle */
/* registered hooks */
struct lxc_hooks {
const char *name;
xchat_hook *hook;
hexchat_hook *hook;
struct lxc_hooks *next;
};
@ -104,7 +107,7 @@ struct lxc_userdata {
struct lxc_cbdata {
lua_State *state;
const char *func;
xchat_hook *hook; /* timer ... */
hexchat_hook *hook; /* timer ... */
struct lxc_userdata *data;
};
@ -175,23 +178,23 @@ static struct {
const char *name;
long value;
} lxc_consts[] = {
{"EAT_NONE", XCHAT_EAT_NONE},
{"EAT_XCHAT", XCHAT_EAT_XCHAT},
{"EAT_PLUGIN", XCHAT_EAT_PLUGIN},
{"EAT_ALL", XCHAT_EAT_ALL},
{"EAT_NONE", HEXCHAT_EAT_NONE},
{"EAT_XCHAT", HEXCHAT_EAT_HEXCHAT},
{"EAT_PLUGIN", HEXCHAT_EAT_PLUGIN},
{"EAT_ALL", HEXCHAT_EAT_ALL},
/* unused until hook_fd is done
{"FD_READ", XCHAT_FD_READ},
{"FD_WRITE", XCHAT_FD_WRITE},
{"FD_EXCEPTION", XCHAT_FD_EXCEPTION},
{"FD_NOTSOCKET", XCHAT_FD_NOTSOCKET},
{"FD_READ", HEXCHAT_FD_READ},
{"FD_WRITE", HEXCHAT_FD_WRITE},
{"FD_EXCEPTION", HEXCHAT_FD_EXCEPTION},
{"FD_NOTSOCKET", HEXCHAT_FD_NOTSOCKET},
*/
{"PRI_HIGHEST", XCHAT_PRI_HIGHEST},
{"PRI_HIGH", XCHAT_PRI_HIGH},
{"PRI_NORM", XCHAT_PRI_NORM},
{"PRI_LOW", XCHAT_PRI_LOW},
{"PRI_LOWEST", XCHAT_PRI_LOWEST},
{"PRI_HIGHEST", HEXCHAT_PRI_HIGHEST},
{"PRI_HIGH", HEXCHAT_PRI_HIGH},
{"PRI_NORM", HEXCHAT_PRI_NORM},
{"PRI_LOW", HEXCHAT_PRI_LOW},
{"PRI_LOWEST", HEXCHAT_PRI_LOWEST},
/* for: clean = xchat.strip(dirty, xchat.STRIP_ALL) */
{"STRIP_COLOR", LXC_STRIP_COLOR},
@ -379,7 +382,7 @@ lxc_load_file(const char *script)
L = lxc_new_state();
state = malloc(sizeof(struct lxc_States));
if (state == NULL) {
xchat_printf(ph, "malloc() failed: %s\n", strerror(errno));
hexchat_printf(ph, "malloc() failed: %s\n", strerror(errno));
lua_close(L);
return 0;
}
@ -391,7 +394,7 @@ lxc_load_file(const char *script)
state->gui = NULL;
if (luaL_loadfile(L, script) || lua_pcall(L, 0, 0, 0)) {
xchat_printf(ph, "Lua plugin: error loading script %s",
hexchat_printf(ph, "Lua plugin: error loading script %s",
lua_tostring(L, -1));
lua_close(L);
free(state);
@ -417,7 +420,7 @@ lxc_autoload_from_path(const char *path)
struct dirent *ent;
char *file;
int len;
/* xchat_printf(ph, "loading from %s\n", path); */
/* hexchat_printf(ph, "loading from %s\n", path); */
dir = opendir(path);
if (dir) {
while ((ent = readdir(dir))) {
@ -425,11 +428,11 @@ lxc_autoload_from_path(const char *path)
if (len > 4 && strcasecmp(".lua", ent->d_name + len - 4) == 0) {
file = malloc(len + strlen(path) + 2);
if (file == NULL) {
xchat_printf(ph, "lxc_autoload_from_path(): malloc failed: %s",
hexchat_printf(ph, "lxc_autoload_from_path(): malloc failed: %s",
strerror(errno));
break;
}
sprintf(file, "%s/%s", path, ent->d_name);
sprintf(file, "%s" G_DIR_SEPARATOR_S "%s", path, ent->d_name);
(void)lxc_load_file((const char *)file);
free(file);
}
@ -449,14 +452,14 @@ void lxc_unload_script(struct lxc_States *state)
lua_gettable(L, LUA_GLOBALSINDEX);
if (lua_type(L, -1) == LUA_TFUNCTION) {
if (lua_pcall(L, 0, 0, 0)) {
xchat_printf(ph, "Lua plugin: error while unloading script %s",
hexchat_printf(ph, "Lua plugin: error while unloading script %s",
lua_tostring(L, -1));
lua_pop(L, 1);
}
}
if (state->gui)
xchat_plugingui_remove(ph, state->gui);
hexchat_plugingui_remove(ph, state->gui);
state->gui = NULL;
hooks = state->hooks;
@ -464,7 +467,7 @@ void lxc_unload_script(struct lxc_States *state)
h = hooks;
hooks = hooks->next;
cb = xchat_unhook(ph, h->hook);
cb = hexchat_unhook(ph, h->hook);
if (cb) {
ud = cb->data;
while (ud) {
@ -493,46 +496,43 @@ static int lxc_cb_load(char *word[], char *word_eol[], void *userdata)
struct stat *st;
if (word_eol[2][0] == 0)
return XCHAT_EAT_NONE;
return HEXCHAT_EAT_NONE;
buf = malloc(PATH_MAX + 1);
if (!buf) {
xchat_printf(ph, "malloc() failed: %s\n", strerror(errno));
return XCHAT_EAT_NONE;
hexchat_printf(ph, "malloc() failed: %s\n", strerror(errno));
return HEXCHAT_EAT_NONE;
}
st = malloc(sizeof(struct stat));
if (!st) {
xchat_printf(ph, "malloc() failed: %s\n", strerror(errno));
hexchat_printf(ph, "malloc() failed: %s\n", strerror(errno));
free(buf);
return XCHAT_EAT_NONE;
return HEXCHAT_EAT_NONE;
}
len = strlen(word[2]);
if (len > 4 && strcasecmp (".lua", word[2] + len - 4) == 0) {
#ifdef WIN32
if (strrchr(word[2], '\\') != NULL)
#else
if (strrchr(word[2], '/') != NULL)
#endif
if (strrchr(word[2], G_DIR_SEPARATOR) != NULL)
strncpy(file, word[2], PATH_MAX);
else {
else
{
if (stat(word[2], st) == 0)
{
xdir = getcwd (buf, PATH_MAX);
snprintf (file, PATH_MAX, "%s/%s", xdir, word[2]);
snprintf (file, PATH_MAX, "%s" G_DIR_SEPARATOR_S "%s", xdir, word[2]);
}
else
{
xdir = xchat_get_info (ph, "xchatdirfs");
snprintf (file, PATH_MAX, "%s/addons/%s", xdir, word[2]);
xdir = hexchat_get_info (ph, "configdir");
snprintf (file, PATH_MAX, "%s" G_DIR_SEPARATOR_S "addons" G_DIR_SEPARATOR_S "%s", xdir, word[2]);
}
}
if (lxc_load_file((const char *)file) == 0) {
free(st);
free(buf);
return XCHAT_EAT_ALL;
return HEXCHAT_EAT_ALL;
}
state = lxc_states;
@ -543,19 +543,19 @@ static int lxc_cb_load(char *word[], char *word_eol[], void *userdata)
lua_pushstring(L, "xchat_register");
lua_gettable(L, LUA_GLOBALSINDEX);
if (lua_pcall(L, 0, 3, 0)) {
xchat_printf(ph, "Lua plugin: error registering script %s",
hexchat_printf(ph, "Lua plugin: error registering script %s",
lua_tostring(L, -1));
lua_pop(L, 1);
free(st);
free(buf);
return XCHAT_EAT_ALL;
return HEXCHAT_EAT_ALL;
}
name = lua_tostring(L, -3);
desc = lua_tostring(L, -2);
vers = lua_tostring(L, -1);
lua_pop(L, 4); /* func + 3 ret value */
state->gui = xchat_plugingui_add(ph, state->file,
state->gui = hexchat_plugingui_add(ph, state->file,
name, desc, vers, NULL
);
@ -565,7 +565,7 @@ static int lxc_cb_load(char *word[], char *word_eol[], void *userdata)
lua_pop(L, 1);
else {
if (lua_pcall(L, 0, 0, 0)) {
xchat_printf(ph,
hexchat_printf(ph,
"Lua plugin: error calling xchat_init() %s",
lua_tostring(L, -1));
lua_pop(L, 1);
@ -573,14 +573,14 @@ static int lxc_cb_load(char *word[], char *word_eol[], void *userdata)
}
free(st);
free(buf);
return XCHAT_EAT_ALL;
return HEXCHAT_EAT_ALL;
}
state = state->next;
}
}
free(st);
free(buf);
return XCHAT_EAT_NONE;
return HEXCHAT_EAT_NONE;
}
static int lxc_cb_unload(char *word[], char *word_eol[], void *userdata)
@ -591,7 +591,7 @@ static int lxc_cb_unload(char *word[], char *word_eol[], void *userdata)
char *file;
if (word_eol[2][0] == 0)
return XCHAT_EAT_NONE;
return HEXCHAT_EAT_NONE;
len = strlen(word[2]);
if (len > 4 && strcasecmp(".lua", word[2] + len - 4) == 0) {
@ -612,26 +612,26 @@ static int lxc_cb_unload(char *word[], char *word_eol[], void *userdata)
prev->next = state->next;
else
lxc_states = state->next;
xchat_printf(ph, "Lua script %s unloaded", file);
hexchat_printf(ph, "Lua script %s unloaded", file);
free(state);
return XCHAT_EAT_ALL;
return HEXCHAT_EAT_ALL;
}
prev = state;
state = state->next;
}
}
return XCHAT_EAT_NONE;
return HEXCHAT_EAT_NONE;
}
static int lxc_cb_lua(char *word[], char *word_eol[], void *userdata)
{
lua_State *L = lxc_new_state();
if (word[2][0] == '\0') {
xchat_printf(ph, "LUA: Usage: /LUA LUA_CODE... execute LUA_CODE");
return XCHAT_EAT_ALL;
hexchat_printf(ph, "LUA: Usage: /LUA LUA_CODE... execute LUA_CODE");
return HEXCHAT_EAT_ALL;
}
if (luaL_loadbuffer(L, word_eol[2], strlen(word_eol[2]), "/LUA")) {
xchat_printf(ph, "LUA: error loading line %s", lua_tostring(L, -1));
hexchat_printf(ph, "LUA: error loading line %s", lua_tostring(L, -1));
lua_pop(L, 1);
}
@ -647,15 +647,15 @@ static int lxc_cb_lua(char *word[], char *word_eol[], void *userdata)
#endif
if (lua_pcall(L, 0, 0, 0)) {
xchat_printf(ph, "LUA: error executing line %s", lua_tostring(L, -1));
hexchat_printf(ph, "LUA: error executing line %s", lua_tostring(L, -1));
lua_pop(L, 1);
}
lua_close(L);
return XCHAT_EAT_ALL;
return HEXCHAT_EAT_ALL;
}
int xchat_plugin_init(xchat_plugin *plugin_handle,
int hexchat_plugin_init(hexchat_plugin *plugin_handle,
char **plugin_name,
char **plugin_desc,
char **plugin_version,
@ -674,17 +674,17 @@ int xchat_plugin_init(xchat_plugin *plugin_handle,
*plugin_desc = LXC_DESC;
*plugin_version = LXC_VERSION;
xchat_hook_command(ph, "LOAD", XCHAT_PRI_NORM, lxc_cb_load, NULL, NULL);
xchat_hook_command(ph, "UNLOAD", XCHAT_PRI_NORM, lxc_cb_unload, NULL, NULL);
xchat_hook_command(ph, "LUA", XCHAT_PRI_NORM, lxc_cb_lua, "Usage: LUA <code>, executes <code> in a new lua state", NULL);
hexchat_hook_command(ph, "LOAD", HEXCHAT_PRI_NORM, lxc_cb_load, NULL, NULL);
hexchat_hook_command(ph, "UNLOAD", HEXCHAT_PRI_NORM, lxc_cb_unload, NULL, NULL);
hexchat_hook_command(ph, "LUA", HEXCHAT_PRI_NORM, lxc_cb_lua, "Usage: LUA <code>, executes <code> in a new lua state", NULL);
xdir = xchat_get_info (ph, "xchatdirfs");
xdir = hexchat_get_info (ph, "configdir");
xsubdir = g_build_filename (xdir, "addons", NULL);
lxc_autoload_from_path (xsubdir);
g_free (xsubdir);
/* put this here, otherwise it's only displayed when a script is autoloaded upon start */
xchat_printf(ph, "Lua interface loaded");
hexchat_printf(ph, "Lua interface loaded");
if (!lxc_states) /* no scripts loaded */
return 1;
@ -695,7 +695,7 @@ int xchat_plugin_init(xchat_plugin *plugin_handle,
lua_pushstring(L, "xchat_register");
lua_gettable(L, LUA_GLOBALSINDEX);
if (lua_pcall(L, 0, 3, 0)) {
xchat_printf(ph, "Lua plugin: error registering script %s",
hexchat_printf(ph, "Lua plugin: error registering script %s",
lua_tostring(L, -1));
lua_pop(L, 1);
state = state->next;
@ -706,7 +706,7 @@ int xchat_plugin_init(xchat_plugin *plugin_handle,
desc = lua_tostring(L, -2);
vers = lua_tostring(L, -1);
lua_pop(L, 4); /* func + 3 ret value */
state->gui = xchat_plugingui_add(ph, state->file, name, desc, vers, NULL);
state->gui = hexchat_plugingui_add(ph, state->file, name, desc, vers, NULL);
lua_pushstring(L, "xchat_init");
lua_gettable(L, LUA_GLOBALSINDEX);
@ -714,7 +714,7 @@ int xchat_plugin_init(xchat_plugin *plugin_handle,
lua_pop(L, 1);
else {
if (lua_pcall(L, 0, 0, 0)) {
xchat_printf(ph, "Lua plugin: error calling xchat_init() %s",
hexchat_printf(ph, "Lua plugin: error calling xchat_init() %s",
lua_tostring(L, -1));
lua_pop(L, 1);
}
@ -724,19 +724,19 @@ int xchat_plugin_init(xchat_plugin *plugin_handle,
return 1;
}
int xchat_plugin_deinit(xchat_plugin *plug_handle)
int hexchat_plugin_deinit(hexchat_plugin *plug_handle)
{
struct lxc_States *state, *st;
state = lxc_states;
while (state) {
lxc_unload_script(state);
xchat_printf(ph, "Lua script %s unloaded", state->file);
hexchat_printf(ph, "Lua script %s unloaded", state->file);
st = state;
state = state->next;
free(st);
}
xchat_printf(plug_handle, "Lua interface unloaded");
hexchat_printf(plug_handle, "Lua interface unloaded");
return 1;
}
@ -801,16 +801,16 @@ static int lxc_run_hook(char *word[], char *word_eol[], void *data)
}
if (lua_pcall(L, 3, 1, 0)) {
xchat_printf(ph, "failed to call callback for '%s': %s",
hexchat_printf(ph, "failed to call callback for '%s': %s",
word[1], lua_tostring(L, -1)
);
lua_pop(L, 1);
return XCHAT_EAT_NONE;
return HEXCHAT_EAT_NONE;
}
if (lua_type(L, -1) != LUA_TNUMBER) {
xchat_printf(ph, "callback for '%s' did not return number...", word[1]);
return XCHAT_EAT_NONE;
hexchat_printf(ph, "callback for '%s' did not return number...", word[1]);
return HEXCHAT_EAT_NONE;
}
i = (int)lua_tonumber(L, -1);
@ -843,7 +843,7 @@ static int lxc_get_userdata(int pos, struct lxc_cbdata *cb)
ud = malloc(sizeof(struct lxc_userdata));
if (!ud) {
xchat_printf(ph, "lxc_get_userdata(): failed to malloc: %s",
hexchat_printf(ph, "lxc_get_userdata(): failed to malloc: %s",
strerror(errno));
if (cb->data != NULL) {
ud = cb->data;
@ -911,7 +911,7 @@ static int lxc_get_userdata(int pos, struct lxc_cbdata *cb)
*/
static int lxc_hook_command(lua_State *L)
{
xchat_hook *hook;
hexchat_hook *hook;
const char *help, *command, *func;
double prio;
struct lxc_hooks *hooks, *h;
@ -924,7 +924,7 @@ static int lxc_hook_command(lua_State *L)
cb = malloc(sizeof(struct lxc_cbdata));
if (!cb) {
xchat_printf(ph, "lxc_hook_command(): failed to malloc: %s",
hexchat_printf(ph, "lxc_hook_command(): failed to malloc: %s",
strerror(errno));
lua_pushboolean(L, 0);
return 1;
@ -939,7 +939,7 @@ static int lxc_hook_command(lua_State *L)
cb->hook = NULL;
if (lua_type(L, 3) == LUA_TNIL)
prio = XCHAT_PRI_NORM;
prio = HEXCHAT_PRI_NORM;
else
prio = luaL_checknumber(L, 3);
@ -956,12 +956,12 @@ static int lxc_hook_command(lua_State *L)
else {
h = malloc(sizeof(struct lxc_hooks));
if (!h) {
xchat_printf(ph, "lxc_hook_command(): failed to malloc: %s",
hexchat_printf(ph, "lxc_hook_command(): failed to malloc: %s",
strerror(errno));
lua_pushboolean(L, 0);
return 1;
}
hook = xchat_hook_command(ph, command, prio, lxc_run_hook, help, cb);
hook = hexchat_hook_command(ph, command, prio, lxc_run_hook, help, cb);
h->hook = hook;
h->name = command;
h->next = NULL;
@ -1014,15 +1014,15 @@ static int lxc_run_print(char *word[], void *data)
}
if (lua_pcall(L, 1, 1, 0)) {
xchat_printf(ph, "failed to call callback for '%s': %s",
hexchat_printf(ph, "failed to call callback for '%s': %s",
word[1], lua_tostring(L, -1));
lua_pop(L, 1);
return 0;
}
if (lua_type(L, -1) != LUA_TNUMBER) {
xchat_printf(ph, "callback for '%s' didn't return number...", word[1]);
return XCHAT_EAT_NONE;
hexchat_printf(ph, "callback for '%s' didn't return number...", word[1]);
return HEXCHAT_EAT_NONE;
}
i = (int)lua_tonumber(L, -1);
lua_pop(L, 1);
@ -1034,7 +1034,7 @@ static int lxc_run_print(char *word[], void *data)
* desc: Registers a function to trap any print events. The event names may
* be any available in the "Advanced > Text Events" window. There are
* also some extra "special" events you may hook using this function,
* see: http://xchat.org/docs/plugin20.html#xchat_hook_print
* see: http://xchat.org/docs/plugin20.html#hexchat_hook_print
* ret: true... or false if something went wrong while registering hook
* args:
* * name (string): the name of the new command
@ -1046,7 +1046,7 @@ static int lxc_run_print(char *word[], void *data)
*/
static int lxc_hook_print(lua_State *L)
{
xchat_hook *hook;
hexchat_hook *hook;
struct lxc_hooks *hooks, *h;
struct lxc_States *st;
struct lxc_cbdata *cb = malloc(sizeof(struct lxc_cbdata));
@ -1064,7 +1064,7 @@ static int lxc_hook_print(lua_State *L)
name = luaL_checkstring(L, 1);
func = luaL_checkstring(L, 2);
if (lua_type(L, 3) == LUA_TNIL)
prio = XCHAT_PRI_NORM;
prio = HEXCHAT_PRI_NORM;
else
prio = luaL_checknumber(L, 3);
@ -1078,12 +1078,12 @@ static int lxc_hook_print(lua_State *L)
else {
h = malloc(sizeof(struct lxc_hooks));
if (!h) {
xchat_printf(ph, "lxc_hook_print(): failed to malloc: %s",
hexchat_printf(ph, "lxc_hook_print(): failed to malloc: %s",
strerror(errno));
lua_pushboolean(L, 0);
return 1;
}
hook = xchat_hook_print(ph, name, prio, lxc_run_print, cb);
hook = hexchat_hook_print(ph, name, prio, lxc_run_print, cb);
h->hook = hook;
h->name = name;
h->next = NULL;
@ -1123,7 +1123,7 @@ static int lxc_hook_print(lua_State *L)
*/
static int lxc_hook_server(lua_State *L)
{
xchat_hook *hook;
hexchat_hook *hook;
struct lxc_hooks *hooks, *h;
struct lxc_States *st;
const char *name, *func;
@ -1131,7 +1131,7 @@ static int lxc_hook_server(lua_State *L)
struct lxc_cbdata *cb = malloc(sizeof(struct lxc_cbdata));
if (!cb) {
xchat_printf(ph, "lxc_hook_server(): failed to malloc: %s",
hexchat_printf(ph, "lxc_hook_server(): failed to malloc: %s",
strerror(errno));
lua_pushnil(L);
return 1;
@ -1143,7 +1143,7 @@ static int lxc_hook_server(lua_State *L)
name = luaL_checkstring(L, 1);
func = luaL_checkstring(L, 2);
if (lua_type(L, 3) == LUA_TNIL)
prio = XCHAT_PRI_NORM;
prio = HEXCHAT_PRI_NORM;
else
prio = luaL_checknumber(L, 3);
@ -1157,12 +1157,12 @@ static int lxc_hook_server(lua_State *L)
else {
h = malloc(sizeof(struct lxc_hooks));
if (!h) {
xchat_printf(ph, "lxc_hook_server(): failed to malloc: %s",
hexchat_printf(ph, "lxc_hook_server(): failed to malloc: %s",
strerror(errno));
lua_pushboolean(L, 0);
return 1;
}
hook = xchat_hook_server(ph, name, prio, lxc_run_hook, cb);
hook = hexchat_hook_server(ph, name, prio, lxc_run_hook, cb);
h->hook = hook;
h->name = name;
h->next = NULL;
@ -1201,7 +1201,7 @@ static unsigned long long lxc_timer_count = 0;
static int lxc_hook_timer(lua_State *L)
{
xchat_hook *hook;
hexchat_hook *hook;
struct lxc_hooks *hooks, *h;
struct lxc_States *st;
double timeout;
@ -1234,7 +1234,7 @@ static int lxc_hook_timer(lua_State *L)
strerror(errno));
return 0;
}
hook = xchat_hook_timer(ph, timeout, lxc_run_timer, cb);
hook = hexchat_hook_timer(ph, timeout, lxc_run_timer, cb);
cb->hook = hook;
h->hook = hook;
h->next = NULL;
@ -1261,7 +1261,7 @@ static int lxc_hook_timer(lua_State *L)
return 1;
}
static void lxc_unhook_timer(lua_State *L, xchat_hook *hook)
static void lxc_unhook_timer(lua_State *L, hexchat_hook *hook)
{
struct lxc_States *state;
struct lxc_hooks *hooks, *h, *prev_hook;
@ -1281,7 +1281,7 @@ static void lxc_unhook_timer(lua_State *L, xchat_hook *hook)
else
state->hooks = hooks->next;
cb = xchat_unhook(ph, h->hook);
cb = hexchat_unhook(ph, h->hook);
if (cb) {
ud = cb->data;
while (ud) {
@ -1317,14 +1317,14 @@ static void lxc_unhook_timer(lua_State *L, xchat_hook *hook)
{
int ret;
struct lxc_cbdata *cb = data;
xchat_hook *hook = cb->hook;
hexchat_hook *hook = cb->hook;
lua_State *L = cb->state;
lua_pushstring(L, cb->func);
lua_gettable(L, LUA_GLOBALSINDEX);
if (lua_pcall(L, 0, 1, 0)) {
xchat_printf(ph, "failed to call timer callback for '%s': %s",
hexchat_printf(ph, "failed to call timer callback for '%s': %s",
cb->func, lua_tostring(L, -1));
lua_pop(L, 1);
lxc_unhook_timer(L, hook);
@ -1332,7 +1332,7 @@ static void lxc_unhook_timer(lua_State *L, xchat_hook *hook)
}
if (lua_type(L, -1) != LUA_TBOOLEAN) {
xchat_printf(ph,
hexchat_printf(ph,
"timer callback for '%s' didn't return a boolean", cb->func);
lua_pop(L, 1);
lxc_unhook_timer(L, hook);
@ -1380,7 +1380,7 @@ static int lxc_unhook(lua_State *L)
else
state->hooks = hooks->next;
cb = xchat_unhook(ph, h->hook);
cb = hexchat_unhook(ph, h->hook);
if (cb) {
ud = cb->data;
while (ud) {
@ -1422,7 +1422,7 @@ static int lxc_event(lua_State *L)
static int lxc_command(lua_State *L)
{
const char *command = luaL_checkstring(L, 1);
xchat_command(ph, command);
hexchat_command(ph, command);
return 0;
}
@ -1437,7 +1437,7 @@ static int lxc_print(lua_State *L)
{
const char *txt = luaL_checkstring(L, 1);
// FIXME? const char *txt = lua_tostring(L, 1);
xchat_print(ph, txt);
hexchat_print(ph, txt);
return 0;
}
@ -1476,19 +1476,19 @@ static int lxc_emit_print(lua_State *L)
}
switch (n-1) {
case 0:
i = xchat_emit_print(ph, event, NULL);
i = hexchat_emit_print(ph, event, NULL);
break;
case 1:
i = xchat_emit_print(ph, event, text[0], NULL);
i = hexchat_emit_print(ph, event, text[0], NULL);
break;
case 2:
i = xchat_emit_print(ph, event, text[0], text[1], NULL);
i = hexchat_emit_print(ph, event, text[0], text[1], NULL);
break;
case 3:
i = xchat_emit_print(ph, event, text[0], text[1], text[2], NULL);
i = hexchat_emit_print(ph, event, text[0], text[1], text[2], NULL);
break;
case 4:
i = xchat_emit_print(ph, event, text[0], text[1], text[2], text[3], NULL);
i = hexchat_emit_print(ph, event, text[0], text[1], text[2], text[3], NULL);
break;
}
lua_pushboolean(L, (i == 0) ? 0 : 1);
@ -1575,7 +1575,7 @@ static int lxc_send_modes(lua_State *L)
if (lua_gettop(L) == 4)
num = luaL_checknumber(L, 4);
xchat_send_modes(ph, targets, i-1, num, sign[0], mode[0]);
hexchat_send_modes(ph, targets, i-1, num, sign[0], mode[0]);
return 0;
}
@ -1598,7 +1598,7 @@ static int lxc_find_context(lua_State *L)
{
const char *srv, *chan;
long ctx;
xchat_context *ptr;
hexchat_context *ptr;
if (lua_type(L, 1) == LUA_TSTRING) {
srv = lua_tostring(L, 1);
@ -1616,7 +1616,7 @@ static int lxc_find_context(lua_State *L)
else
chan = NULL;
ptr = xchat_find_context(ph, srv, chan);
ptr = hexchat_find_context(ph, srv, chan);
ctx = (long)ptr;
#ifdef DEBUG
fprintf(stderr, "find_context(): %#lx\n", (long)ptr);
@ -1628,14 +1628,14 @@ static int lxc_find_context(lua_State *L)
/*
* lua: xchat.get_context()
* desc: Returns the current context for your plugin. You can use this later
* with xchat_set_context.
* with hexchat_set_context.
* ret: context number ... DON'T modifiy
* args: none
*/
static int lxc_get_context(lua_State *L)
{
long ptr;
xchat_context *ctx = xchat_get_context(ph);
hexchat_context *ctx = hexchat_get_context(ph);
ptr = (long)ctx;
#ifdef DEBUG
fprintf(stderr, "get_context(): %#lx\n", ptr);
@ -1654,7 +1654,7 @@ static int lxc_get_context(lua_State *L)
static int lxc_get_info(lua_State *L)
{
const char *id = luaL_checkstring(L, 1);
const char *value = xchat_get_info(ph, id);
const char *value = hexchat_get_info(ph, id);
if (value == NULL)
lua_pushnil(L);
else
@ -1663,7 +1663,7 @@ static int lxc_get_info(lua_State *L)
}
/*
* lua: xchat.get_prefs(name)
* lua: hexchat.get_prefs(name)
* desc: Provides xchat's setting information (that which is available
* through the /set command). A few extra bits of information are
* available that don't appear in the /set list, currently they are:
@ -1684,7 +1684,7 @@ static int lxc_get_prefs(lua_State *L)
* luckily we can store anything in a lua var... this makes the
* xchat lua api more user friendly ;-)
*/
switch (xchat_get_prefs(ph, name, &str, &i)) {
switch (hexchat_get_prefs(ph, name, &str, &i)) {
case 0: /* request failed */
lua_pushnil(L);
break;
@ -1717,8 +1717,8 @@ static int lxc_set_context(lua_State *L)
#ifdef DEBUG
fprintf(stderr, "set_context(): %#lx\n", (long)ctx);
#endif
xchat_context *xc = (void *)(long)ctx;
lua_pushboolean(L, xchat_set_context(ph, xc));
hexchat_context *xc = (void *)(long)ctx;
lua_pushboolean(L, hexchat_set_context(ph, xc));
return 1;
}
@ -1738,7 +1738,7 @@ static int lxc_nickcmp(lua_State *L)
{
const char *n1 = luaL_checkstring(L, 1);
const char *n2 = luaL_checkstring(L, 2);
lua_pushnumber(L, (double)xchat_nickcmp(ph, n1, n2));
lua_pushnumber(L, (double)hexchat_nickcmp(ph, n1, n2));
return 1;
}
@ -1761,8 +1761,8 @@ static int lxc_list_get(lua_State *L)
double num;
time_t date;
long ptr;
const char *const *fields = xchat_list_fields(ph, name);
xchat_list *list = xchat_list_get(ph, name);
const char *const *fields = hexchat_list_fields(ph, name);
hexchat_list *list = hexchat_list_get(ph, name);
if (!list) {
lua_pushnil(L);
@ -1771,14 +1771,14 @@ static int lxc_list_get(lua_State *L)
lua_newtable(L);
/* this is like the perl plugin does it ;-) */
l = 1;
while (xchat_list_next(ph, list)) {
while (hexchat_list_next(ph, list)) {
i = 0;
lua_pushnumber(L, l);
lua_newtable(L);
while (fields[i] != NULL) {
switch (fields[i][0]) {
case 's':
str = xchat_list_str(ph, list, fields [i] + 1);
str = hexchat_list_str(ph, list, fields [i] + 1);
lua_pushstring(L, fields[i]+1);
if (str != NULL)
lua_pushstring(L, str);
@ -1787,20 +1787,20 @@ static int lxc_list_get(lua_State *L)
lua_settable(L, -3);
break;
case 'p':
ptr = (long)xchat_list_str(ph, list, fields [i] + 1);
ptr = (long)hexchat_list_str(ph, list, fields [i] + 1);
num = (double)ptr;
lua_pushstring(L, fields[i]+1);
lua_pushnumber(L, num);
lua_settable(L, -3);
break;
case 'i':
num = (double)xchat_list_int(ph, list, fields[i] + 1);
num = (double)hexchat_list_int(ph, list, fields[i] + 1);
lua_pushstring(L, fields[i]+1);
lua_pushnumber(L, num);
lua_settable(L, -3);
break;
case 't':
date = xchat_list_time(ph, list, fields[i] + 1);
date = hexchat_list_time(ph, list, fields[i] + 1);
lua_pushstring(L, fields[i]+1);
lua_pushnumber(L, (double)date);
lua_settable(L, -3);
@ -1811,7 +1811,7 @@ static int lxc_list_get(lua_State *L)
lua_settable(L, -3);
l++;
}
xchat_list_free(ph, list);
hexchat_list_free(ph, list);
return 1;
}
@ -1826,7 +1826,7 @@ static int lxc_list_get(lua_State *L)
static int lxc_list_fields(lua_State *L)
{
const char *name = luaL_checkstring(L, 1);
const char *const *fields = xchat_list_fields(ph, name);
const char *const *fields = hexchat_list_fields(ph, name);
int i;
lua_newtable(L);
@ -1847,7 +1847,7 @@ static int lxc_list_fields(lua_State *L)
static int lxc_gettext(lua_State *L)
{
#if defined(_WIN32) || defined(LXC_XCHAT_GETTEXT)
lua_pushstring(L, xchat_gettext(ph, luaL_checkstring(L, 1)));
lua_pushstring(L, hexchat_gettext(ph, luaL_checkstring(L, 1)));
#else
const char *dom;
const char *msgid = luaL_checkstring(L, 1);

View File

@ -1,3 +1,3 @@
EXPORTS
xchat_plugin_init
xchat_plugin_deinit
hexchat_plugin_init
hexchat_plugin_deinit

View File

@ -21,14 +21,12 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -45,25 +43,24 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(LuaOutput)</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(LuaOutput)</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUA_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(DepsRoot)\include;..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -71,19 +68,18 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>"$(LuaLib).lib";;dirent-win32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>"$(LuaLib).lib";%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;LUA_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(DepsRoot)\include;..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -91,17 +87,17 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>"$(LuaLib).lib";;dirent-win32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>"$(LuaLib).lib";%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Link>
<AdditionalDependencies>"$(LuaLib).lib";$(DepLibs);dirent-win32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>"$(LuaLib).lib";$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Link>
<AdditionalDependencies>"$(LuaLib).lib";$(DepLibs);dirent-win32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>"$(LuaLib).lib";$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

View File

@ -15,7 +15,7 @@ EXTRA_DIST = mailcheck-config.h.in
# Remember to include this line in your Makefile.am
include @top_srcdir@/plugins/Make.plugin
libdir = $(xchatdir)/plugins
libdir = $(hexchatdir)/plugins
lib_LTLIBRARIES = mailcheck.la
mailcheck_la_SOURCES = mailcheck.c

View File

@ -1,4 +1,4 @@
/* XCHAT 2.0 PLUGIN: Mail checker */
/* HexChat 2.0 plugin: Mail checker */
#include <stdio.h>
#include <stdlib.h>
@ -7,10 +7,10 @@
#include <sys/stat.h>
#include <unistd.h>
#include "xchat-plugin.h"
#include "hexchat-plugin.h"
static xchat_plugin *ph; /* plugin handle */
static hexchat_plugin *ph; /* plugin handle */
static int
mail_items(char *file)
@ -63,7 +63,7 @@ xchat_mail_check (void)
if(size > last_size)
{
xchat_printf(ph,
hexchat_printf(ph,
"-\0033-\0039-\017\tYou have new mail (%d messages, %d bytes total).",
mail_items(maildir), size);
}
@ -78,7 +78,7 @@ static int timeout_cb(void *userdata)
return 1;
}
int xchat_plugin_init(xchat_plugin *plugin_handle,
int hexchat_plugin_init(hexchat_plugin *plugin_handle,
char **plugin_name, char **plugin_desc, char **plugin_version,
char *arg)
{
@ -88,7 +88,7 @@ int xchat_plugin_init(xchat_plugin *plugin_handle,
*plugin_desc = "Checks your mailbox every 30 seconds";
*plugin_version = "0.1";
xchat_hook_timer(ph, 30000, timeout_cb, 0);
hexchat_hook_timer(ph, 30000, timeout_cb, 0);
return 1;
}

View File

@ -117,7 +117,7 @@ char *readLine(FILE *f){
else buffer[pos]=(char)cc;pos++;
}
}
if (buffer[pos]==EOF) xchat_printf(ph,"EOF: %i\n",pos);
if (buffer[pos]==EOF) hexchat_printf(ph,"EOF: %i\n",pos);
return buffer;
}

View File

@ -81,12 +81,12 @@ int str2int(char *text){
int ret=0;
for (i=1;i<=strlen(text);i++){
if ((text[strlen(text)-i]>57)||(text[strlen(text)-i]<48)){
xchat_printf(ph,"invalid char in string: %i",text[strlen(text)-i]);
hexchat_printf(ph,"invalid char in string: %i",text[strlen(text)-i]);
return 255;
}
ret+=((int)text[strlen(text)-i]-48)*iPow(10,i-1);
}
//xchat_printf(ph, "str2int(%s)=%i",text,ret);
//hexchat_printf(ph, "str2int(%s)=%i",text,ret);
//if (DEBUG==1) putlog("int converted");
return ret;
}
@ -135,7 +135,7 @@ static char *tagExtract(char *tag, int tagLen, char* info){
//if (DEBUG==1) putlog("extracting tag");
int pos, len, i;
pos=inStr(tag,tagLen,info);
//xchat_printf(ph,"pos=%i",pos);
//hexchat_printf(ph,"pos=%i",pos);
if (pos==-1) return "";//NULL;
//printf("position of %s = %i\n",info,pos);
len=0;
@ -163,7 +163,7 @@ struct tagInfo readID3V1(char *file){
ret.artist=NULL;
f=fopen(file,"rb");
if (f==NULL){
xchat_print(ph,"file not found while trying to read id3v1");
hexchat_print(ph,"file not found while trying to read id3v1");
//if (DEBUG==1) putlog("file not found while trying to read id3v1");
return ret;
}
@ -174,14 +174,14 @@ struct tagInfo readID3V1(char *file){
//printf("position= %li\n",pos);
for (i=0;i<128;i++) {
c=fgetc(f);
if (c==EOF) {xchat_printf(ph,"read ID3V1 failed\n");fclose(f);return ret;}
if (c==EOF) {hexchat_printf(ph,"read ID3V1 failed\n");fclose(f);return ret;}
tag[i]=(char)c;
}
fclose(f);
//printf("tag readed: \n");
id=substring(tag,0,3);
//printf("header: %s\n",id);
if (strcmp(id,"TAG")!=0){xchat_printf(ph,"no id3 v1 found\n");return ret;}
if (strcmp(id,"TAG")!=0){hexchat_printf(ph,"no id3 v1 found\n");return ret;}
ret.title=subString(tag,3,30,1);
ret.artist=subString(tag,33,30,1);
ret.album=subString(tag,63,30,1);
@ -191,15 +191,15 @@ struct tagInfo readID3V1(char *file){
val=(int)tmp[0];
if (val<0)val+=256;
//xchat_printf(ph, "tmp[0]=%i (%i)",val,tmp[0]);
//hexchat_printf(ph, "tmp[0]=%i (%i)",val,tmp[0]);
if ((val<148)&&(val>=0))
ret.genre=GENRES[val];//#############changed
else {
ret.genre="unknown";
//xchat_printf(ph, "tmp[0]=%i (%i)",val,tmp[0]);
//hexchat_printf(ph, "tmp[0]=%i (%i)",val,tmp[0]);
}
//xchat_printf(ph, "tmp: \"%s\" -> %i",tmp,tmp[0]);
//xchat_printf(ph,"genre \"%s\"",ret.genre);
//hexchat_printf(ph, "tmp: \"%s\" -> %i",tmp,tmp[0]);
//hexchat_printf(ph,"genre \"%s\"",ret.genre);
//if (DEBUG==1) putlog("id3v1 extracted");
return ret;
}
@ -214,7 +214,7 @@ char *extractID3Genre(char *tag){
}
else{
int i;
//xchat_print(ph, "Using 2 criteria");
//hexchat_print(ph, "Using 2 criteria");
for (i=0;i<strlen(tag);i++){
if (tag[i]==')'){ tag=&tag[i]+1;return tag;}
//return tag;
@ -232,10 +232,10 @@ struct tagInfo readID3V2(char *file){
struct tagInfo ret;
f = fopen(file,"rb");
//xchat_printf(ph,"file :%s",file);
//hexchat_printf(ph,"file :%s",file);
if (f==NULL)
{
xchat_print(ph,"file not found whilt trying to read ID3V2");
hexchat_print(ph,"file not found whilt trying to read ID3V2");
//if (DEBUG==1)putlog("file not found while trying to read ID3V2");
return ret;
}
@ -250,29 +250,29 @@ struct tagInfo readID3V2(char *file){
header[i]=(char)c;
}
if (strstr(header,"ID3")==header){
//xchat_printf(ph,"found id3v2\n");
//hexchat_printf(ph,"found id3v2\n");
len=0;
for (i=6;i<10;i++) len+=(int)header[i]*iPow(256,9-i);
//char *tag=(char*)malloc(sizeof(char)*len);
tag=(char*) calloc(len,sizeof(char)); //malloc(sizeof(char)*len);
for (i=0;i<len;i++){c=fgetc(f);tag[i]=(char)c;}
//xchat_printf(ph,"tag length: %i\n",len);
//xchat_printf(ph,"tag: %s\n",tag);
//hexchat_printf(ph,"tag length: %i\n",len);
//hexchat_printf(ph,"tag: %s\n",tag);
fclose(f);
ret.comment=tagExtract(tag,len,"COMM");
//xchat_printf(ph,"Comment: %s\n",ret.comment);
//hexchat_printf(ph,"Comment: %s\n",ret.comment);
ret.genre=tagExtract(tag,len,"TCON");
//if (strcmp(ret.genre,"(127)")==0) ret.genre="unknown";
//xchat_printf(ph, "ret.genre = %s",ret.genre);
//hexchat_printf(ph, "ret.genre = %s",ret.genre);
if ((ret.genre!=NULL)&&(ret.genre[0]=='(')) ret.genre=extractID3Genre(ret.genre);
//xchat_printf(ph,"genre: %s\n",ret.genre);
//hexchat_printf(ph,"genre: %s\n",ret.genre);
ret.title=tagExtract(tag,len,"TIT2");
//xchat_printf(ph,"Title: %s\n",ret.title);
//hexchat_printf(ph,"Title: %s\n",ret.title);
ret.album=tagExtract(tag,len,"TALB");
//xchat_printf(ph,"Album: %s\n",ret.album);
//hexchat_printf(ph,"Album: %s\n",ret.album);
ret.artist=tagExtract(tag,len,"TPE1");
//xchat_printf(ph,"Artist: %s\n",ret.artist);
//hexchat_printf(ph,"Artist: %s\n",ret.artist);
}
else{fclose(f);printf("no id3v2 tag found\n"); return ret;}
//printf("id2v2 done\n");
@ -294,7 +294,7 @@ struct tagInfo readHeader(char *file){
f = fopen(file,"rb");
if (f==NULL)
{
xchat_print(ph,"file not found while trying to read mp3 header");
hexchat_print(ph,"file not found while trying to read mp3 header");
//if (DEBUG==1) putlog("file not found while trying to read mp3 header");
return info;
}

View File

@ -23,8 +23,8 @@ static char *VERSION="0.0.6";
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include "xchat-plugin.h"
static xchat_plugin *ph;
#include "hexchat-plugin.h"
static hexchat_plugin *ph;
#include "functions.c"
#include "mp3Info.c"
@ -33,36 +33,36 @@ static xchat_plugin *ph;
static int print_themes (char *word[], char *word_eol[], void *userdata){
printThemes();
return XCHAT_EAT_ALL;
return HEXCHAT_EAT_ALL;
}
static int mpc_themeReload(char *word[], char *word_eol[], void *userdata){
themeInit();
loadThemes();
return XCHAT_EAT_ALL;
return HEXCHAT_EAT_ALL;
}
static int mpc_tell(char *word[], char *word_eol[], void *userdata){
char *tTitle, *zero, *oggLine, *line;
struct tagInfo info;
HWND hwnd = FindWindow("MediaPlayerClassicW",NULL);
if (hwnd==0) {xchat_command(ph, randomLine(notRunTheme));return XCHAT_EAT_ALL;}
if (hwnd==0) {hexchat_command(ph, randomLine(notRunTheme));return HEXCHAT_EAT_ALL;}
tTitle=(char*)malloc(sizeof(char)*1024);
GetWindowText(hwnd, tTitle, 1024);
zero=strstr(tTitle," - Media Player Classic");
if (zero!=NULL) zero[0]=0;
else xchat_print(ph,"pattern not found");
else hexchat_print(ph,"pattern not found");
if ((tTitle[1]==':')&&(tTitle[2]=='\\')){
//xchat_print(ph,"seams to be full path");
//hexchat_print(ph,"seams to be full path");
if (endsWith(tTitle,".mp3")==1){
//xchat_print(ph,"seams to be a mp3 file");
//hexchat_print(ph,"seams to be a mp3 file");
info = readHeader(tTitle);
if ((info.artist!=NULL)&&(strcmp(info.artist,"")!=0)){
char *mode=MODES[info.mode];
//xchat_printf(ph,"mode: %s\n",mode);
//hexchat_printf(ph,"mode: %s\n",mode);
char *mp3Line=randomLine(mp3Theme);
mp3Line=replace(mp3Line,"%art",info.artist);
mp3Line=replace(mp3Line,"%tit",info.title);
@ -82,19 +82,19 @@ static int mpc_tell(char *word[], char *word_eol[], void *userdata){
//mp3Line=intReplace(mp3Line,"%perc",perc);
//mp3Line=replace(mp3Line,"%plTitle",title);
mp3Line=replace(mp3Line,"%file",tTitle);
xchat_command(ph, mp3Line);
return XCHAT_EAT_ALL;
hexchat_command(ph, mp3Line);
return HEXCHAT_EAT_ALL;
}
}
if (endsWith(tTitle,".ogg")==1){
xchat_printf(ph,"Ogg detected\n");
hexchat_printf(ph,"Ogg detected\n");
info = getOggHeader(tTitle);
if (info.artist!=NULL){
char *cbr;
if (info.cbr==1) cbr="CBR"; else cbr="VBR";
oggLine=randomLine(oggTheme);
//if (cue==1) oggLine=cueLine;
//xchat_printf(ph,"ogg-line: %s\n",oggLine);
//hexchat_printf(ph,"ogg-line: %s\n",oggLine);
oggLine=replace(oggLine,"%art",info.artist);
oggLine=replace(oggLine,"%tit",info.title);
oggLine=replace(oggLine,"%alb",info.album);
@ -111,39 +111,39 @@ static int mpc_tell(char *word[], char *word_eol[], void *userdata){
//oggLine=intReplace(oggLine,"%perc",perc);
//oggLine=replace(oggLine,"%plTitle",title);
oggLine=replace(oggLine,"%file",tTitle);
xchat_command(ph, oggLine);
return XCHAT_EAT_ALL;
hexchat_command(ph, oggLine);
return HEXCHAT_EAT_ALL;
}
}
}
line=randomLine(titleTheme);
line=replace(line,"%title", tTitle);
xchat_command(ph,line);
return XCHAT_EAT_ALL;
hexchat_command(ph,line);
return HEXCHAT_EAT_ALL;
}
int xchat_plugin_init(xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg){
int hexchat_plugin_init(hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg){
ph = plugin_handle;
*plugin_name = "mpcInfo";
*plugin_desc = "Information-Script for Media Player Classic";
*plugin_version=VERSION;
xchat_hook_command(ph, "mpc", XCHAT_PRI_NORM, mpc_tell,"no help text", 0);
xchat_hook_command(ph, "mpc_themes", XCHAT_PRI_NORM, print_themes,"no help text", 0);
xchat_hook_command(ph, "mpc_reloadthemes", XCHAT_PRI_NORM, mpc_themeReload,"no help text", 0);
xchat_command (ph, "MENU -ietc\\music.png ADD \"Window/Display Current Song (MPC)\" \"MPC\"");
hexchat_hook_command(ph, "mpc", HEXCHAT_PRI_NORM, mpc_tell,"no help text", 0);
hexchat_hook_command(ph, "mpc_themes", HEXCHAT_PRI_NORM, print_themes,"no help text", 0);
hexchat_hook_command(ph, "mpc_reloadthemes", HEXCHAT_PRI_NORM, mpc_themeReload,"no help text", 0);
hexchat_command (ph, "MENU -ietc\\music.png ADD \"Window/Display Current Song (MPC)\" \"MPC\"");
themeInit();
loadThemes();
xchat_printf(ph, "%s %s plugin loaded\n",*plugin_name, VERSION);
hexchat_printf(ph, "%s %s plugin loaded\n",*plugin_name, VERSION);
return 1;
}
int
xchat_plugin_deinit (void)
hexchat_plugin_deinit (void)
{
xchat_command (ph, "MENU DEL \"Window/Display Current Song (MPC)\"");
xchat_print (ph, "mpcInfo plugin unloaded\n");
hexchat_command (ph, "MENU DEL \"Window/Display Current Song (MPC)\"");
hexchat_print (ph, "mpcInfo plugin unloaded\n");
return 1;
}

View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B0E36D93-CA2A-49FE-9EB9-9C96C6016EEC}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>mpcinfo</RootNamespace>
<ProjectName>mpcinfo</ProjectName>
</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>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</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-xp.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-xp.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcmpcinfo</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcmpcinfo</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;MPCINFO_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>mpcinfo.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;MPCINFO_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>mpcinfo.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="mpcinfo.def" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="mpcInfo.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,23 @@
<?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="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>
</ItemGroup>
<ItemGroup>
<None Include="mpcinfo.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClCompile Include="mpcInfo.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -1,3 +1,3 @@
EXPORTS
xchat_plugin_init
xchat_plugin_deinit
hexchat_plugin_init
hexchat_plugin_deinit

View File

@ -21,14 +21,12 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -45,18 +43,17 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcmpcinfo</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>hcmpcinfo</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
@ -64,7 +61,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MPCINFO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -76,7 +73,6 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
@ -84,7 +80,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;MPCINFO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>

View File

@ -51,7 +51,7 @@ struct tagInfo getOggHeader(char *file){
info.artist=NULL;
f = fopen(file,"rb");
if (f==NULL){
xchat_print(ph,"file not found while trying to read ogg header");
hexchat_print(ph,"file not found while trying to read ogg header");
//if (DEBUG==1) putlog("file not found while trying to read ogg header");
return info;
}

View File

@ -39,14 +39,14 @@ void themeInit(){
void printTheme(struct theme data){
int i;
for (i=0;i<data.size;i++) xchat_printf(ph,"line[%i]=%s\n",i,data.line[i]);
for (i=0;i<data.size;i++) hexchat_printf(ph,"line[%i]=%s\n",i,data.line[i]);
}
void printThemes(){
xchat_printf(ph,"\nNotRun-Theme:\n");printTheme(notRunTheme);
xchat_printf(ph,"\nMP3-Theme:\n");printTheme(mp3Theme);
xchat_printf(ph,"\nOGG-Theme:\n");printTheme(oggTheme);
xchat_printf(ph,"\nTitle-Theme:\n");printTheme(titleTheme);
hexchat_printf(ph,"\nNotRun-Theme:\n");printTheme(notRunTheme);
hexchat_printf(ph,"\nMP3-Theme:\n");printTheme(mp3Theme);
hexchat_printf(ph,"\nOGG-Theme:\n");printTheme(oggTheme);
hexchat_printf(ph,"\nTitle-Theme:\n");printTheme(titleTheme);
}
void cbFix(char *line){
@ -85,18 +85,18 @@ struct theme themeAdd(struct theme data, char *info){
void loadThemes(){
char *hDir, *hFile, *line, *val;
FILE *f;
xchat_print(ph,"loading themes\n");
hexchat_print(ph,"loading themes\n");
hDir=(char*)calloc(1024,sizeof(char));
strcpy(hDir,xchat_get_info(ph,"xchatdirfs"));
strcpy(hDir,hexchat_get_info(ph,"configdir"));
hFile=str3cat(hDir,"\\","mpcInfo.theme.txt");
f = fopen(hFile,"r");
if(f==NULL)
{
xchat_print(ph,"no theme in homedir, checking global theme");
hexchat_print(ph,"no theme in homedir, checking global theme");
f=fopen("mpcInfo.theme.txt","r");
}
//xchat_printf(ph,"file_desc: %p\n",f);
if (f==NULL) xchat_print(ph, "no theme found, using hardcoded\n");
//hexchat_printf(ph,"file_desc: %p\n",f);
if (f==NULL) hexchat_print(ph, "no theme found, using hardcoded\n");
else {
if (f > 0)
{
@ -118,7 +118,7 @@ void loadThemes(){
if (strcmp(toUpper(line),"OGG_LINE")==0) mp3Theme=themeAdd(oggTheme,val);
}
fclose(f);
xchat_print(ph, "theme loaded successfull\n");
hexchat_print(ph, "theme loaded successfull\n");
}
if (notRunTheme.size==0) notRunTheme=themeAdd(notRunTheme,"say Media Player Classic not running");
if (titleTheme.size==0) titleTheme=themeAdd(titleTheme,"say Playing %title in Media Player Classic");

View File

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

View File

@ -1,87 +0,0 @@
#include <stdlib.h>
#include <glib.h>
#include <string.h>
#include "xchat-plugin.h"
static xchat_plugin *ph;
static const char name[] = "Non-BMP";
static const char desc[] = "Replace non-BMP characters with replacement characters";
static const char version[] = "1.0000";
static int recursing = 0;
static int filter(
char *word[],
char *word_eol[],
void *unused
) {
gunichar *line;
gchar *utf8_line;
glong length;
glong index;
if( recursing ) {
return XCHAT_EAT_NONE;
}
/* the input has already been checked so we can use the _fast version */
line = g_utf8_to_ucs4_fast(
(char *)word_eol[1],
-1, /* NUL terminated input */
&length
);
for( index = 0; index < length; index++ ) {
if( line[ index ] > 0xFFFF ) {
line[ index ] = 0xFFFD; /* replacement character */
}
}
utf8_line = g_ucs4_to_utf8(
line,
-1, /* NUL terminated input */
NULL, /* items read */
NULL, /* items written */
NULL /* ignore conversion error */
);
if( utf8_line == NULL ) {
/* conversion failed ... I guess we are screwed? */
g_free( line );
return XCHAT_EAT_NONE;
}
recursing = 1;
xchat_commandf( ph, "RECV %s", utf8_line );
recursing = 0;
g_free( line );
g_free( utf8_line );
return XCHAT_EAT_ALL;
}
int xchat_plugin_init(
xchat_plugin *plugin_handle,
char **plugin_name,
char **plugin_desc,
char **plugin_version,
char *arg
) {
/* int index = 0;*/
ph = plugin_handle;
*plugin_name = name;
*plugin_desc = desc;
*plugin_version = version;
xchat_hook_server( ph, "RAW LINE", XCHAT_PRI_HIGHEST, filter, (void *)NULL );
xchat_printf (ph, "%s plugin loaded\n", name);
return 1;
}
int
xchat_plugin_deinit (void)
{
xchat_printf (ph, "%s plugin unloaded\n", name);
return 1;
}

View File

@ -1,8 +1,6 @@
EXTRA_DIST=alt_completion.pl xchat2-perldocs.html xchat2-perl.html \
generate_header lib/Xchat.pm lib/Xchat/Embed.pm lib/Xchat/List/Network.pm \
lib/Xchat/List/Network/Entry.pm lib/Xchat/List/Network/AutoJoin.pm \
lib/IRC.pm
EXTRA_DIST=alt_completion.pl generate_header lib/Xchat.pm lib/Xchat/Embed.pm lib/Xchat/List/Network.pm \
lib/Xchat/List/Network/Entry.pm lib/Xchat/List/Network/AutoJoin.pm lib/IRC.pm
libdir = $(hexchatlibdir)/plugins
@ -12,7 +10,7 @@ perl_la_LDFLAGS = -avoid-version -module
perl_la_LIBADD = $(PERL_LDFLAGS)
BUILT_SOURCES = xchat.pm.h irc.pm.h
#CFLAGS = @CFLAGS@ -Wno-unused
INCLUDES = $(PERL_CFLAGS) $(COMMON_CFLAGS) -I$(srcdir)/..
AM_CPPFLAGS = $(PERL_CFLAGS) $(COMMON_CFLAGS) -I$(srcdir)/../../src/common
CLEANFILES = xchat.pm.h irc.pm.h
xchat.pm.h irc.pm.h: lib/Xchat.pm lib/Xchat/Embed.pm \
lib/Xchat/List/Network.pm lib/Xchat/List/Network/Entry.pm \

File diff suppressed because it is too large Load Diff

View File

@ -1,475 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>XChat - IRC (chat) client for UNIX</title>
<style type="text/css">
body{font-family:sans-serif;background-color:#FFFBF0;}
:link{color:#00C;}
:visited{color:#609;}
:active{color:#C00;}
.date{background-color:#dddddd;font-family:terminal;font-size:small;}
th,td{font-family:sans-serif;}
h2{font-family:sans-serif;color:#990066;}
</style></head>
<body>
<h1><center>This interface is deprecated</center></h1>
<table width="90%" cellpadding="0" cellspacing="0" border="0">
<tbody><tr>
<td align="left" valign="top">
<blockquote>
<h2>Xchat Perl Docs</h2>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial" color="#990066">
Introduction
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
<p>Good Hello!</p>
<p>The purpose of this page is to give people some quick documentation on the
things that they will encounter when they try to code scripts for X-Chat.
It is <strong>not</strong> meant to be a comprehensive programming tutorial,
by any means. If that's what you're looking for, then you can just keep on
looking.</p>
<p>If you're going to do any scripting with X-Chat at all, you will
need to know perl. It also won't hurt to have had experience writing tcl for
eggdrops or ircII scripts. Otherwise you're going to have to be very careful
to avoid creating conditions which could flood you offline or do other
not-so-optimal things. ;) Thankfully, it shouldn't take most intelligent
people more than a week (month on the outside) enough perl to do some nice
things in it.
<a HREF="http://www.perl.com">Perl</a> is a very flexible language.</p>
<p>You should probably also go read (or at least skim over and then carefully
bookmark this copy of the thing that defines how IRC works: <a HREF="http://www.irchelp.org/irchelp/rfc1459.html">RFC 1459</a>.
Other documents that scripters might find useful would be this
<a HREF="http://www.irchelp.org/irchelp/ircd/numerics.html">nice list of server
numerics</a>, and this list of <a HREF="http://www.irchelp.org/irchelp/ircd/hybrid6.html">changes
for Hybrid 6</a> which is something everyone on EFNet should read. In fact, I
<strong>strongly</strong> suggest saving copies of these documents to your local
hard drive, because you <i>will</i> be back to look at them again soon.</p>
<p>One last thing... While you may hear that RFC 1459 isn't being followed very
well, and this is partly true, do your absolute best to stick with RFC-compliant
behaviours anyway because otherwise there's a good chance that your script will
never interoperate properly with others, or at least just piss off a lot of other
people. <i>Pay special attention to section 2.2 of the RFC.</i></p>
</blockquote>
<table ALIGN=CENTER WIDTH="75%" CELLPADDING=5 CELLSPACING=0>
<tr><td ALIGN=CENTER BGCOLOR="#FF7070">
<font COLOR="#FFFFFF" FACE="Verdana, Helvetica, Arial, Sans"><b>Standard Disclaimer</b>
</font>
</td></tr><tr> <td BGCOLOR="#FFCECE" ALIGN=CENTER><font COLOR="#800000" FACE="Helvetica, Lucida, Arial, Sans">
This documentation is provided on an "as-is" basis and comes with no warranty of accuracy or usefulness, either expressed or implied. It is subject to change without any notice, and may contain omissions or errors which could cause your genitalia to shrivel and fall off, or spontaneously combust. If you have any further questions,<br>please feel free to seek professional help.</font>
</td></tr></table>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial" color="#990066;">
About Handlers
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
There are [currently] four basic ways to make things call the subroutines you write for X-Chat and they are:
<ul><li>message handlers - Triggered by messagse sent from the IRC server to your client</li>
<li>command handlers - triggered by / commands typed in by the user at the keyboard</li>
<li>timeout handlers - triggered by gtk+</li>
<li>print handlers - triggered just before xchat calls its built in print handlers for events</li></ul>
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial" color="#990066;">
About Exit Codes
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
These are very important. Every time you set up a handler, it takes precedent over the built-in functions and commands of X-Chat. That is, whatever thing which triggered your subroutine will go to your code before it goes to X-Chat to be dealt with. In this way you can replace almost every built-in function that the client has with your own routines. The thing to remember is that if your code exits by hitting the end of your subroutine, or by a plain 'return' statement, processing of the event will go on to whatever other things have set up hooks for the event, and then (provided nothing else exits with a return value of 1) to X-Chat itself. There is only one problem with this, (which is solved by the brokering handler that I'll explain that later) and that is that you cannot really control what order the custom routines get called. Normally they will execute in order of which ones were installed first, but a single script has no real way of knowing this. Beware.
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial" color="#990066;">
About @_
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
If you've never heard of @_ before, then you've obviously not coded in perl. When a message handler triggers, the raw line from the IRC server is passed to the subroutine you specify in @_. When a command handler is triggered, only the arguments are passed to the routine through @_ and they are not broken into a list, but left as one long string. You'll have to parse those yourself with split. (I advise using s/\s+/ /g to collapse the blank space to single space first.) When a timer handler is triggered, I *think* absolutely nothing is passed in @_, but it's not like anything terrifically important could be passed along anyway. Be especially careful when setting up message handlers for mode changes, since the modes are not broken up into individual events like they are with eggdrop. The upside of this is that X-Chat has no mode hooks of it's own, so you don't have to worry about it too much. (This is not the case with the brokering handler, however.)
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial" color="#990066;">
About Context
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
There are some really nice things about coding for X-Chat, and the biggest one is that it's fairly good about determining the proper context for things. If a server sends something that triggers a message handler, then you can be sure that unless you specify otherwise, that your IRC::print or IRC::command function call will go back to that server and that server alone. If you really really need to know what the current context is, use the IRC::get_info function as detailed below.
</blockquote>
<hr width="95%">
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial" color="#990066;">
script initialization commands
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::register(scriptname, version, shutdownroutine, unused);
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
<p>This is the first function your script should call, example:</p>
<blockquote><p>IRC::register ("my script", "1.0", "", "");</p></blockquote>
<p>The "shutdownroutine" arg is a function that will be called when X-Chat shuts down, so you get a chance to save config files etc. You can omit this arg, it is optional. The "unused" arg is reserved for future use, for now just provide "". This function also returns X-Chat's version number. </p>
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial" color="#990066;">
Handler initialization commands
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::add_message_handler(message, subroutine_name);
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
<p>This function allows you to set up hooks to subroutines so that when a particular message arrives from the IRC server that you are connected to, it can be passed to a subroutine to be dealt with appropriately. The message argument is essentially the second solid token from the raw line sent by the IRC server, and X-Chat doesn't know that some numeric messages have associated text messages, so for now set up a handler for both if you want to be sure odd servers don't screw up your expectations. (Read: fear IRCNet.) The entire line sent by the IRC server will be passed to your subroutine in @_. For the completely uninitiated, messages are things like 'PRIVMSG', 'NOTICE', '372', etc.</p>
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::add_command_handler(command, subroutine_name);
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
<p>This function allows you to set up hooks for actual commands that the user can type into the text window. The arguments are passed to the subroutine via @_, and arrive as a single string. @_ will be null if no arguments are supplied. It's recommended that you be sure and collapse the excess whitespace with s/\s+/ /g before attempting to chop the line up with split. As mentioned earlier, exiting with an undefined return value will allow the command to be parsed by other handlers, while using a return value of 1 will signal the program that no further parsing needs to be done with this command.</p>
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::add_timeout_handler(interval, subroutine_name);
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
<p>This function allows you to set up hooks for subroutines to be called at a particular interval. The interval is measured in milliseconds, so don't use a particularly small value unless you wish to drive the CPU load through the roof. 1000ms = 1 second. No values will be passed to the routine via @_ and return values don't affect anything either.</p>
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::add_print_handler(message, subroutine_name);
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
<p>This function allows you to catch the system messages (those who generally start by three stars) and to execute a function each time an event appear. The events are those you can see in "Settings->Edit Events Texts". message is the name of the event (you can find it in the Edit Events box, "Events" column) , subroutine_name is the name of the function that will get messages. Be carrful: all the arguments are sent to function in $_[0] separated by spaces. </p>
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial" color="#990066;">
Output commands
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::print(text);
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
This is a very simple routine. All it does is put the contents of the text string to the current window. The current window will be whichever window a command was typed into when called from a command handler, or in whichever window the message command is appropriate to if it is called from within a message handler. As with any perl program, newlines are not assumed, so don't forget to end the line with \n if you don't want things to look screwey.
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::print_with_channel( text, channelname, servername );
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
This routine does the same thing as IRC::Print does, except it allows you to direct the output to a specific window. It returns 1 on success, 0 on fail.
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::command(text);
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
This routine allows you to execute commands in the current context. The text string containing the command will be parsed by everything that would normally parse a command, including your own command handlers, so be careful. Newlines are assumed, thankfully.
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::command_with_server(text, servername);
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
This routine allows you to specify the context of the server for which the command will be executed. It's not particularly useful unless you're managing a connection manually, yet the command still exists for it's usefulness in doing things like managing a bnc connection, etc. Newlines are assumed here as well.
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::send_raw(text);
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
This routine is very useful in that it allows you to send a string directly to the IRC server you are connected to. It is assumed that the server will be the one you first connected to if there is no clear context for the command, otherwise it will go to whatever server triggered the message handler or command handler window. You must specify newlines here always or you can be guaranteed that strange things will happen. The text message you specify should be a proper RAW IRC message, so don't play with it if you don't know how to do these. Additionally, while newlines are also not assumed here as with the IRC::print function, the RFC specifies that newlines are a CR+LF pair, even if most servers will accept a mere newline. It's best to play it safe and use \r\n instead of just \n.
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial" color="#990066;">
Information retrieval commands
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::get_info(integer);
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
This function returns a bit of selected information depending on what the value of the integer is.
Here's a list of the currently supported values:
<ul><li>0 - xchat version</li>
<li>1 - your nickname</li>
<li>2 - channel</li>
<li>3 - server</li>
<li>4 - xchatdir</li>
<li>5 - away status</li>
<li>6 - network name</li>
<li>7 - server hostname</li>
<li>8 - channel topic</li></ul>
<p>If you are requesting information that isn't available in the current context, then it will return null.</p>
<p>Any numbers other than the above will return an error message.</p>
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::get_prefs(var);
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
This command lets you read the preferences that are set in the xchat configuration file. Just look at the xchat.conf dir to see what variables are available to use with this command. Returns the value of the variable requested or "Unknown Variable" if the variable isn't available.
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::user_info( nickname );
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
Returns a flat list of information on the nickname specified consisting of... nickname, nick host, and whether they have op or voice in the current context.
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::channel_list( );
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
This command returns a flat list which contains the current channel, server, and nickname for all channels the client is currently in. You'll have to break the list up into groups of three yourself. No arguments are necessary, or used [currently].
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::server_list( );
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
This command returns a flat list of servers. (Note, it is incompatible with xchat 1.8 in that it also returns a list of servers you are NOT connected to as well.)
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::user_list(channel, server);
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
<p>Works very much like the dcc_list command below, except that is returns information about the users on the channel provided as first argument. The second argument is the server and is optional.</p>
<p>NOTE: If a user has both op and voice, only the op flag will be set to 1 by this command in xchat2.</p>
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::user_list_short(channel, server);
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
<p>A simpler version of IRC::user_list that returns pairs of nick & user@host suitable for assigning to a hash.</p>
<p>NOTE: If a user has both op and voice, only the op flag will be set to 1 by this command in xchat2.</p>
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::dcc_list( );
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
This command does essentially the same thing as channel_list, giving you the details of each DCC connection currently in progress. I have no idea exactly what is returned because I haven't had a chance to poke at this one much, but suffice it to say that it's a flat list, and the first time you play with it the meaning of the returned values should be pretty obvious.
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial">
IRC::ignore_list( );
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
This command returns a flat list of the contents of your ignore list. You'll have to play with it a little as I have not had a chance to yet. Works basically the same as the other list commands.
</blockquote>
<table width="95%" cellpadding="0" cellspacing="3" border="0" align="center">
<tbody><tr><td bgcolor="#000000">
<table width="100%" cellpadding="2" cellspacing="1" border="0"><tbody><tr>
<td width="20%" align="left" bgcolor="#dddddd">
<font face="Lucida, Helvetica, Arial" color="#990066;">
Unimplemented commands that were available in xchat 1.8.x
</font></td>
</tr></tbody></table>
</td></tr></tbody></table>
<blockquote>
add_user_list , sub_user_list , clear_user_list, notify_list were available in xchat 1.8.x but are not implemented in xchat 2 at this time.
</blockquote>
</blockquote>
</td>
</tr>
</tbody></table>
<br><hr>
<font size="-10">This document originally written by Dagmar d'Surreal on March 26th, 1998 for xchat 1.4<br>
Updated on July 30th, 1999 by Peter Zelezny<br>
Updated on May 16th, 2003 by DaNumber8 to comply with the perl plugin for xchat2 version 2.0.3</font>
</body></html>

View File

@ -127,7 +127,7 @@ sub IRC::channel_list {
sub IRC::get_info {
my $id = shift;
my @ids = qw(version nick channel server xchatdir away network host topic);
my @ids = qw(version nick channel server configdir xchatdir away network host topic);
if( $id >= 0 && $id <= 8 && $id != 5 ) {
my $info = Xchat::get_info($ids[$id]);

View File

@ -471,7 +471,7 @@ sub context_info {
my @fields = (
qw(away channel charset host id inputbox libdirfs modes network),
qw(nick nickserv server topic version win_ptr win_status),
qw(xchatdir xchatdirfs state_cursor),
qw(configdir xchatdir xchatdirfs state_cursor),
);
if( Xchat::set_context( $ctx ) ) {

View File

@ -683,18 +683,13 @@ C<$id> - one of the following case sensitive values
<td></td>
</tr>
<tr>
<td>xchatdir</td> <td>xchat config directory encoded in UTF-8<br />
<td>configdir</td> <td>HexChat config directory encoded in UTF-8<br />
examples:<br />
/home/user/.xchat2<br />
C:\Documents and Settings\user\Application Data\X-Chat 2
/home/user/.config/hexchat<br />
C:\Users\user\Appdata\Roaming\HexChat
</td>
<td></td>
</tr>
<tr>
<td>xchatdirfs</td> <td>same as xchatdir except encoded in the locale file system encoding</td>
<td></td>
</tr>
</table>
<p>This function is used to retrieve certain information about the current

View File

@ -8,7 +8,7 @@ use warnings;
# filename
# The full path to the script.
# gui_entry
# This is xchat_plugin pointer that is used to remove the script from
# This is hexchat_plugin pointer that is used to remove the script from
# Plugins and Scripts window when a script is unloaded. This has also
# been converted with the PTR2IV() macro.
# hooks
@ -207,7 +207,7 @@ sub reload {
}
sub reload_all {
my @dirs = Xchat::get_info( "xchatdirfs" ) || Xchat::get_info( "xchatdir" );
my @dirs = Xchat::get_info( "configdir" );
push @dirs, File::Spec->catdir( $dirs[0], "plugins" );
for my $dir ( @dirs ) {
my $auto_load_glob = File::Spec->catfile( $dir, "*.pl" );

View File

@ -6,7 +6,7 @@ my $last_modified;
my @servers;
sub get {
my $server_file = Xchat::get_info( "xchatdirfs" ) . "/servlist_.conf";
my $server_file = Xchat::get_info( "configdir" ) . "/servlist_.conf";
# recreate the list only if the server list file has changed
if( -f $server_file &&

View File

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{987E9374-98A1-44BA-946F-D3472D7A7055}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>perl512</RootNamespace>
<ProjectName>perl-512</ProjectName>
</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>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</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-xp.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-xp.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(Perl512Output)</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(Perl512Output)</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;PERL512_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(Perl512Path)\perl\lib\CORE;$(IntDir);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(Perl512Lib).lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>perl.def</ModuleDefinitionFile>
<DelayLoadDLLs>$(Perl512Lib).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
</Link>
<PreBuildEvent>
<Command>"$(GendefPath)\gendef" "$(Perl512Path)\perl\bin\$(Perl512Lib).dll"
move $(Perl512Lib).def "$(IntDir)"
lib /nologo /machine:x86 "/def:$(IntDir)$(Perl512Lib).def" "/out:$(OutDir)\$(Perl512Lib).lib"
"$(Perl512Path)\perl\bin\perl.exe" generate_header
move irc.pm.h "$(IntDir)"
move xchat.pm.h "$(IntDir)"</Command>
</PreBuildEvent>
</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;PERL512_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(Perl512Path)\perl\lib\CORE;$(IntDir);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(Perl512Lib).lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>perl.def</ModuleDefinitionFile>
<DelayLoadDLLs>$(Perl512Lib).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
</Link>
<PreBuildEvent>
<Command>"$(GendefPath)\gendef" "$(Perl512Path)\perl\bin\$(Perl512Lib).dll"
move $(Perl512Lib).def "$(IntDir)"
lib /nologo /machine:x64 "/def:$(IntDir)$(Perl512Lib).def" "/out:$(OutDir)\$(Perl512Lib).lib"
"$(Perl512Path)\perl\bin\perl.exe" generate_header
move irc.pm.h "$(IntDir)"
move xchat.pm.h "$(IntDir)"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="perl.c" />
</ItemGroup>
<ItemGroup>
<None Include="perl.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,23 @@
<?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="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>
</ItemGroup>
<ItemGroup>
<ClCompile Include="perl.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="perl.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -21,14 +21,12 @@
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -45,18 +43,17 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(Perl512Output)</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(Perl512Output)</TargetName>
<OutDir>$(SolutionDir)build\$(PlatformName)\bin\</OutDir>
<IntDir>$(SolutionDir)build\$(PlatformName)\obj\$(ProjectName)\</IntDir>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
@ -64,7 +61,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PERL512_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(Perl512Path)\perl\lib\CORE;$(IntDir);..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(Perl512Path)\perl\lib\CORE;$(IntDir);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
@ -87,7 +84,6 @@ move xchat.pm.h "$(IntDir)"</Command>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level1</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
@ -95,7 +91,7 @@ move xchat.pm.h "$(IntDir)"</Command>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;PERL512_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(Perl512Path)\perl\lib\CORE;$(IntDir);..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(Perl512Path)\perl\lib\CORE;$(IntDir);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>

View File

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{C4C9FA6F-F990-4C7B-85F6-CD8F4F5728F0}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>perl514</RootNamespace>
<ProjectName>perl-514</ProjectName>
</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>
<PlatformToolset>WDK7</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>WDK7</PlatformToolset>
</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-xp.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-xp.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(Perl514Output)</TargetName>
<OutDir>$(HexChatBin)</OutDir>
<IntDir>$(HexChatObj)$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>$(Perl514Output)</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;PERL514_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Perl514Path)\perl\lib\CORE;$(IntDir);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(Perl514Lib).lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>perl.def</ModuleDefinitionFile>
<DelayLoadDLLs>$(Perl514Lib).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
</Link>
<PreBuildEvent>
<Command>"$(GendefPath)\gendef" "$(Perl514Path)\perl\bin\$(Perl514Lib).dll"
move $(Perl514Lib).def "$(IntDir)"
lib /nologo /machine:x86 "/def:$(IntDir)$(Perl514Lib).def" "/out:$(OutDir)\$(Perl514Lib).lib"
"$(Perl514Path)\perl\bin\perl.exe" generate_header
move irc.pm.h "$(IntDir)"
move xchat.pm.h "$(IntDir)"</Command>
</PreBuildEvent>
</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;PERL514_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Perl514Path)\perl\lib\CORE;$(IntDir);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(Perl514Lib).lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>perl.def</ModuleDefinitionFile>
<DelayLoadDLLs>$(Perl514Lib).dll;%(DelayLoadDLLs)</DelayLoadDLLs>
</Link>
<PreBuildEvent>
<Command>"$(GendefPath)\gendef" "$(Perl514Path)\perl\bin\$(Perl514Lib).dll"
move $(Perl514Lib).def "$(IntDir)"
lib /nologo /machine:x64 "/def:$(IntDir)$(Perl514Lib).def" "/out:$(OutDir)\$(Perl514Lib).lib"
"$(Perl514Path)\perl\bin\perl.exe" generate_header
move irc.pm.h "$(IntDir)"
move xchat.pm.h "$(IntDir)"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="perl.c" />
</ItemGroup>
<ItemGroup>
<None Include="perl.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,23 @@
<?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="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>
</ItemGroup>
<ItemGroup>
<ClCompile Include="perl.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="perl.def">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
</Project>

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