Compare commits
85 Commits
pr-1320
...
dcc-fastse
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1f7ae3eaa1 | ||
![]() |
4362085847 | ||
![]() |
6b62c4738d | ||
![]() |
8da205b0a8 | ||
![]() |
981d55e84c | ||
![]() |
35d238ad3a | ||
![]() |
2c8729becd | ||
![]() |
35f97b65c1 | ||
![]() |
a2c2abd60a | ||
![]() |
7a85c9160d | ||
![]() |
4e061a43b3 | ||
![]() |
5c534ac344 | ||
![]() |
ea9e8d353b | ||
![]() |
f14ad5e9dd | ||
![]() |
2226363fd0 | ||
![]() |
5dafa60433 | ||
![]() |
971e5cf4fe | ||
![]() |
edd57fdc86 | ||
![]() |
eab580408c | ||
![]() |
26d3461f46 | ||
![]() |
295061f461 | ||
![]() |
0bd15d435a | ||
![]() |
c8539b93fe | ||
![]() |
1e914347d7 | ||
![]() |
66eebea2c3 | ||
![]() |
9e2d5dae5e | ||
![]() |
b8e7dfa4ba | ||
![]() |
1d8dd50455 | ||
![]() |
7f1ee9dad0 | ||
![]() |
be5e2b9566 | ||
![]() |
e40fbee772 | ||
![]() |
7247c24e98 | ||
![]() |
f7e3d3f32c | ||
![]() |
671a838b52 | ||
![]() |
6ca29b2eb4 | ||
![]() |
15efdd5f2b | ||
![]() |
599f5c7b29 | ||
![]() |
fad8f93ad8 | ||
![]() |
78486b49d5 | ||
![]() |
9c5f577002 | ||
![]() |
dbad9285b8 | ||
![]() |
73636a00b5 | ||
![]() |
e7003ef9c6 | ||
![]() |
9664b1b7e3 | ||
![]() |
422cce6f70 | ||
![]() |
afd2135393 | ||
![]() |
94ef0fd294 | ||
![]() |
ebe1f824a7 | ||
![]() |
f7bea16e37 | ||
![]() |
ff9c0dbd5e | ||
![]() |
29321c8660 | ||
![]() |
0b40146b85 | ||
![]() |
9b2c560519 | ||
![]() |
3675302930 | ||
![]() |
925570aab1 | ||
![]() |
498f53b96a | ||
![]() |
5263887ac3 | ||
![]() |
73d865b243 | ||
![]() |
a3c257bdb4 | ||
![]() |
6ad9419693 | ||
![]() |
c5aa91a836 | ||
![]() |
b10f94d5f6 | ||
![]() |
9a98de1f65 | ||
![]() |
7363bc03f2 | ||
![]() |
78e51a4f3f | ||
![]() |
174db0eb7f | ||
![]() |
f64b61a1b9 | ||
![]() |
a8392c7f95 | ||
![]() |
72d7f64f8b | ||
![]() |
c86389f99b | ||
![]() |
66f2f3a84a | ||
![]() |
f8c7ea3672 | ||
![]() |
e313a82ab4 | ||
![]() |
9024a5c71b | ||
![]() |
f03b6314b4 | ||
![]() |
ae2e5ab092 | ||
![]() |
167eb11ea7 | ||
![]() |
1cc06f9301 | ||
![]() |
455fa24d63 | ||
![]() |
dc69f24ae5 | ||
![]() |
b4906f3d23 | ||
![]() |
4e338a2b70 | ||
![]() |
98fefcd162 | ||
![]() |
9e9ed54bfa | ||
![]() |
aece18dfd5 |
4
.gitignore
vendored
@@ -54,6 +54,8 @@ src/common/textenums.h
|
|||||||
src/common/textevents.h
|
src/common/textevents.h
|
||||||
src/fe-gtk/hexchat
|
src/fe-gtk/hexchat
|
||||||
src/fe-gtk/hexchat.rc
|
src/fe-gtk/hexchat.rc
|
||||||
|
src/fe-gtk/resources.c
|
||||||
|
src/fe-gtk/resources.h
|
||||||
src/fe-text/hexchat-text
|
src/fe-text/hexchat-text
|
||||||
src/htm/Main.resources
|
src/htm/Main.resources
|
||||||
src/htm/thememan.exe
|
src/htm/thememan.exe
|
||||||
@@ -70,11 +72,11 @@ stamp-h1
|
|||||||
*.po~
|
*.po~
|
||||||
*.pot
|
*.pot
|
||||||
*.patch
|
*.patch
|
||||||
|
tags
|
||||||
src/**/*.plist
|
src/**/*.plist
|
||||||
# Win32 generated files
|
# Win32 generated files
|
||||||
plugins/wmpa/wmpa_h.h
|
plugins/wmpa/wmpa_h.h
|
||||||
plugins/wmpa/wmpa_i.c
|
plugins/wmpa/wmpa_i.c
|
||||||
src/fe-gtk/resources.c
|
|
||||||
src/htm/obj/*
|
src/htm/obj/*
|
||||||
win32/ipch/*
|
win32/ipch/*
|
||||||
win32/ext/perl/perl-x86-cache
|
win32/ext/perl/perl-x86-cache
|
||||||
|
29
.travis.yml
@@ -1,12 +1,9 @@
|
|||||||
|
sudo: false
|
||||||
language: c
|
language: c
|
||||||
|
cache: apt
|
||||||
compiler: clang
|
compiler: clang
|
||||||
before_script:
|
|
||||||
- sudo apt-get update
|
|
||||||
- sudo apt-get build-dep -qq xchat
|
|
||||||
- sudo apt-get install -qq libnotify-dev libproxy-dev libpci-dev libcanberra-dev monodevelop gnome-common
|
|
||||||
script:
|
script:
|
||||||
- ./autogen.sh
|
- ./autogen.sh --enable-textfe --with-theme-manager --enable-static-analysis
|
||||||
- ./configure --enable-textfe --with-theme-manager --enable-static-analysis
|
|
||||||
- make V=1 -j$(nproc)
|
- make V=1 -j$(nproc)
|
||||||
notifications:
|
notifications:
|
||||||
irc:
|
irc:
|
||||||
@@ -15,3 +12,23 @@ notifications:
|
|||||||
on_success: change
|
on_success: change
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- automake
|
||||||
|
- autoconf
|
||||||
|
- imagemagick
|
||||||
|
- intltool
|
||||||
|
- libcanberra-dev
|
||||||
|
- libdbus-glib-1-dev
|
||||||
|
- libglib2.0-dev
|
||||||
|
- libgtk2.0-dev
|
||||||
|
- libnotify-dev
|
||||||
|
- libpci-dev
|
||||||
|
- libperl-dev
|
||||||
|
- libproxy-dev
|
||||||
|
- libssl-dev
|
||||||
|
- libtool
|
||||||
|
- monodevelop
|
||||||
|
- mono-devel
|
||||||
|
- python-dev
|
||||||
|
@@ -4,5 +4,4 @@ ACLOCAL_AMFLAGS = -I m4
|
|||||||
|
|
||||||
SUBDIRS = po src plugins data
|
SUBDIRS = po src plugins data
|
||||||
|
|
||||||
EXTRA_DIST = autogen.sh data
|
EXTRA_DIST = autogen.sh Doxyfile readme.md
|
||||||
|
|
||||||
|
25
autogen.sh
@@ -4,19 +4,24 @@
|
|||||||
srcdir=`dirname $0`
|
srcdir=`dirname $0`
|
||||||
test -z "$srcdir" && srcdir=.
|
test -z "$srcdir" && srcdir=.
|
||||||
|
|
||||||
NOCONFIGURE=1
|
|
||||||
PKG_NAME="hexchat"
|
|
||||||
|
|
||||||
(test -f $srcdir/src/common/hexchat.c) || {
|
(test -f $srcdir/src/common/hexchat.c) || {
|
||||||
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the top-level directory"
|
||||||
echo " top-level $PKG_NAME directory"
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
which gnome-autogen.sh || {
|
aclocal --install -I m4 || exit 1
|
||||||
echo "You need to install gnome-common"
|
glib-gettextize --force --copy || exit 1
|
||||||
exit 1
|
intltoolize --force --copy --automake || exit 1
|
||||||
}
|
autoreconf --force --install -Wno-portability || exit 1
|
||||||
|
|
||||||
. gnome-autogen.sh
|
if [ "$NOCONFIGURE" = "" ]; then
|
||||||
|
$srcdir/configure "$@" || exit 1
|
||||||
|
|
||||||
|
if [ "$1" = "--help" ]; then exit 0 else
|
||||||
|
echo "Now type \`make\' to compile" || exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Skipping configure process."
|
||||||
|
fi
|
||||||
|
|
||||||
|
set +x
|
||||||
|
528
configure.ac
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
|
|||||||
|
|
||||||
AC_INIT([HexChat],[2.11.0])
|
AC_INIT([HexChat],[2.11.0])
|
||||||
|
|
||||||
AC_PREREQ([2.60])
|
AC_PREREQ([2.64])
|
||||||
AC_COPYRIGHT([Copyright (C) 1998-2010 Peter Zelezny])
|
AC_COPYRIGHT([Copyright (C) 1998-2010 Peter Zelezny])
|
||||||
|
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
@@ -10,20 +10,25 @@ AC_CONFIG_SRCDIR([configure.ac])
|
|||||||
|
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE([1.11 dist-bzip2 subdir-objects no-define foreign])
|
AM_INIT_AUTOMAKE([1.11.1 dist-xz no-dist-gzip subdir-objects no-define foreign])
|
||||||
AM_SILENT_RULES([yes])
|
AM_SILENT_RULES([yes])
|
||||||
|
|
||||||
|
AX_IS_RELEASE([minor-version])
|
||||||
|
AX_CHECK_ENABLE_DEBUG([yes])
|
||||||
|
AX_REQUIRE_DEFINED([PKG_PROG_PKG_CONFIG])
|
||||||
|
|
||||||
AC_USE_SYSTEM_EXTENSIONS
|
AC_USE_SYSTEM_EXTENSIONS
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE([enable])
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
AC_PROG_OBJC
|
AC_PROG_OBJC
|
||||||
AM_PROG_AS
|
AM_PROG_AS
|
||||||
AM_PROG_AR
|
AM_PROG_AR
|
||||||
AM_DISABLE_STATIC
|
LT_PREREQ([2.2.6])
|
||||||
AC_PROG_LIBTOOL
|
LT_INIT([disable-static])
|
||||||
AC_PATH_PROG(MDTOOL, mdtool, no)
|
AC_PATH_PROG(MDTOOL, mdtool, no)
|
||||||
|
PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
dnl -----------------------------------------------------------
|
dnl -----------------------------------------------------------
|
||||||
dnl Language Support
|
dnl Language Support
|
||||||
@@ -54,34 +59,34 @@ AH_VERBATIM([socklen_t],[#undef socklen_t])
|
|||||||
AH_VERBATIM([USE_DBUS],[#undef USE_DBUS])
|
AH_VERBATIM([USE_DBUS],[#undef USE_DBUS])
|
||||||
|
|
||||||
AC_PATH_PROG(sedpath, sed)
|
AC_PATH_PROG(sedpath, sed)
|
||||||
if test "_$sedpath" = _; then
|
AS_IF([test "_$sedpath" = _], [
|
||||||
AC_MSG_ERROR(Cannot find sed: I need it!)
|
AC_MSG_ERROR(Cannot find sed: I need it!)
|
||||||
fi
|
])
|
||||||
|
|
||||||
AC_PATH_PROG(unamepath, uname)
|
AC_PATH_PROG(unamepath, uname)
|
||||||
if test "_$unamepath" = _; then
|
AS_IF([test "_$unamepath" = _], [
|
||||||
system="unknown"
|
system="unknown"
|
||||||
else
|
], [
|
||||||
AC_MSG_CHECKING(system type)
|
AC_MSG_CHECKING(system type)
|
||||||
system=`$unamepath -s`
|
system=`$unamepath -s`
|
||||||
AC_MSG_RESULT($system)
|
AC_MSG_RESULT($system)
|
||||||
if test "$system" = "Linux"; then
|
AS_IF([test "$system" = "Linux"], [
|
||||||
AC_DEFINE(USING_LINUX)
|
AC_DEFINE(USING_LINUX)
|
||||||
fi
|
], [test "$system" = "FreeBSD"], [
|
||||||
if test "$system" = "FreeBSD"; then
|
|
||||||
AC_DEFINE(USING_FREEBSD)
|
AC_DEFINE(USING_FREEBSD)
|
||||||
fi
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
platform_win32=no
|
platform_win32=no
|
||||||
platform_osx=no
|
platform_osx=no
|
||||||
case $host_os in
|
AS_CASE([$host_os],
|
||||||
*mingw*|*cygwin*|*msys*)
|
[*mingw*|*cygwin*|*msys*], [
|
||||||
platform_win32=yes;;
|
platform_win32=yes
|
||||||
darwin*)
|
],
|
||||||
platform_osx=yes;;
|
[darwin*], [
|
||||||
*);;
|
platform_osx=yes
|
||||||
esac
|
]
|
||||||
|
)
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** configure switches ***********************************************
|
dnl ** configure switches ***********************************************
|
||||||
@@ -152,10 +157,6 @@ AC_ARG_ENABLE(isocodes,
|
|||||||
[AS_HELP_STRING([--disable-isocodes],[disable iso-codes with spell-check])],
|
[AS_HELP_STRING([--disable-isocodes],[disable iso-codes with spell-check])],
|
||||||
isocodes=$enableval, isocodes=yes)
|
isocodes=$enableval, isocodes=yes)
|
||||||
|
|
||||||
AC_ARG_ENABLE(minimal-flags,
|
|
||||||
[AS_HELP_STRING([--enable-minimal-flags],[only add those CFLAGS that are really needed or not intrusive (default: no)])],
|
|
||||||
minimalflags=$enableval, minimalflags=no)
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(static-analysis,
|
AC_ARG_ENABLE(static-analysis,
|
||||||
[AS_HELP_STRING([--enable-static-analysis],[if using clang run static analysis during build (default: no)])],
|
[AS_HELP_STRING([--enable-static-analysis],[if using clang run static analysis during build (default: no)])],
|
||||||
analyze=$enableval, analyze=no)
|
analyze=$enableval, analyze=no)
|
||||||
@@ -169,11 +170,11 @@ AC_ARG_WITH(theme-manager,
|
|||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** THEME-MANAGER ****************************************************
|
dnl ** THEME-MANAGER ****************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
if test "x$theme_manager" != "xno" ; then
|
AS_IF([test "x$theme_manager" != "xno"], [
|
||||||
if test "x$MDTOOL" = "xno"; then
|
AS_IF([test "x$MDTOOL" = "xno"], [
|
||||||
AC_MSG_ERROR([No "mdtool" found, you need to install monodevelop!])
|
AC_MSG_ERROR([No "mdtool" found, you need to install monodevelop!])
|
||||||
fi
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
@@ -190,144 +191,112 @@ dnl *********************************************************************
|
|||||||
dnl ** GTK **************************************************************
|
dnl ** GTK **************************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
if test "$gtkfe" = yes ; then
|
AS_IF([test "$gtkfe" = yes], [
|
||||||
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.24.0], [
|
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.24.0], [
|
||||||
GUI_LIBS="$GUI_LIBS $GTK_LIBS"
|
GUI_LIBS="$GUI_LIBS $GTK_LIBS"
|
||||||
GUI_CFLAGS="$GUI_CFLAGS $GTK_CFLAGS -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED"
|
GUI_CFLAGS="$GUI_CFLAGS $GTK_CFLAGS -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED"
|
||||||
], [
|
], [
|
||||||
gtkfe=no
|
gtkfe=no
|
||||||
])
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** MAC_INTEGRATION **************************************************
|
dnl ** MAC_INTEGRATION **************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
_gdk_tgt=`$PKG_CONFIG --variable=target gdk-2.0`
|
_gdk_tgt=`$PKG_CONFIG --variable=target gdk-2.0`
|
||||||
if test "x$_gdk_tgt" = xquartz; then
|
AS_IF([test "x$_gdk_tgt" = xquartz], [
|
||||||
PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration-gtk2, [
|
PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration-gtk2, [
|
||||||
GUI_LIBS="$GUI_LIBS $GTK_MAC_LIBS"
|
GUI_LIBS="$GUI_LIBS $GTK_MAC_LIBS"
|
||||||
GUI_CFLAGS="$GUI_CFLAGS $GTK_MAC_CFLAGS"
|
GUI_CFLAGS="$GUI_CFLAGS $GTK_MAC_CFLAGS"
|
||||||
AC_DEFINE(HAVE_GTK_MAC)
|
AC_DEFINE(HAVE_GTK_MAC)
|
||||||
])
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** PERL *************************************************************
|
dnl ** PERL *************************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
if test "$perl" = yes; then
|
AS_IF([test "$perl" = yes], [
|
||||||
AC_MSG_CHECKING(for plugin interface used by Perl)
|
AC_MSG_CHECKING(for plugin interface used by Perl)
|
||||||
if test "$plugin" = yes; then
|
AS_IF([test "$plugin" = yes], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
AC_PATH_PROG(perlpath, perl)
|
|
||||||
AC_MSG_CHECKING(for Perl compile flags)
|
|
||||||
PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
|
|
||||||
if test "_$PERL_CFLAGS" = _ ; then
|
|
||||||
AC_MSG_RESULT([not found, building without perl.])
|
|
||||||
perl=no
|
|
||||||
else
|
|
||||||
PERL_LDFLAGS=`$perlpath -MExtUtils::Embed -e ldopts |$sedpath 's/-lgdbm //'`
|
|
||||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-ldb //'`
|
|
||||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lndbm //'`
|
|
||||||
if test "$system" = "Linux"; then
|
|
||||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lnsl //'`
|
|
||||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lposix //'`
|
|
||||||
fi
|
|
||||||
PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lc //'`
|
|
||||||
AC_MSG_RESULT(ok)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(for perl >= 5.8.0)
|
AX_PERL_EXT_FLAGS([PERL_CFLAGS], [PERL_LDFLAGS])
|
||||||
PERL_VER=`$perlpath -e 'print $]>= 5.008?"yes":"no"'`
|
original_cflags="$CFLAGS"
|
||||||
if test "$PERL_VER" = "yes"; then
|
original_ldflags="$LDFLAGS"
|
||||||
original_cflags="$CFLAGS"
|
CFLAGS="$PERL_CFLAGS"
|
||||||
original_ldflags="$LDFLAGS"
|
LDFLAGS="$PERL_LDFLAGS"
|
||||||
CFLAGS="$PERL_CFLAGS"
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||||
LDFLAGS="$PERL_LDFLAGS"
|
#define PERL_NO_INLINE_FUNCTIONS
|
||||||
AC_TRY_LINK([
|
#include <EXTERN.h>
|
||||||
#define PERL_NO_INLINE_FUNCTIONS
|
#include <perl.h>
|
||||||
#include <EXTERN.h>
|
]], [[]])],[perl_is_usable=yes],[perl_is_usable=no])
|
||||||
#include <perl.h>
|
CFLAGS="$original_cflags"
|
||||||
], [], perl_is_usable=yes, perl_is_usable=no)
|
LDFLAGS="$original_ldflags"
|
||||||
CFLAGS="$original_cflags"
|
AS_IF([test "$perl_is_usable" = "no"], [
|
||||||
LDFLAGS="$original_ldflags"
|
AC_MSG_WARN([perl test failed to compile, disabling])
|
||||||
if test x$perl_is_usable = xno ; then
|
perl=no
|
||||||
AC_MSG_RESULT(no)
|
], [
|
||||||
perl=no
|
AC_MSG_CHECKING([if perl plugin will be backward compatible])
|
||||||
else
|
AS_IF([test "$perl_old" = "yes"], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT([yes])
|
||||||
AC_MSG_CHECKING(if perl plugin will be backward compatible)
|
AC_DEFINE(OLD_PERL)
|
||||||
if test "$perl_old" = "yes"; then
|
], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT([no])
|
||||||
AC_DEFINE(OLD_PERL)
|
])
|
||||||
else
|
])
|
||||||
AC_MSG_RESULT(no)
|
], [
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
echo "perl version too old, building without perl."
|
|
||||||
perl=no
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for Perl])
|
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for Perl])
|
||||||
perl=no
|
perl=no
|
||||||
fi
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** PYTHON ***********************************************************
|
dnl ** PYTHON ***********************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
if test "x$python" != xno ; then
|
AS_IF([test "x$python" != xno], [
|
||||||
AC_MSG_CHECKING(for plugin interface used by Python)
|
AC_MSG_CHECKING(for plugin interface used by Python)
|
||||||
if test "$plugin" = yes; then
|
AS_IF([test "$plugin" = yes], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
case $python in
|
AS_CASE([$python],
|
||||||
dnl set python2 default here
|
dnl set python2 default here
|
||||||
python2)
|
[python2], [
|
||||||
PKG_CHECK_MODULES([PY], [python-2.7],
|
PYTHON_VERSION=2
|
||||||
[PY_VER="`$PKG_CONFIG --modversion python-2.7`"],
|
AX_PYTHON_DEVEL([>= '2.7'])
|
||||||
[true])
|
],
|
||||||
;;
|
|
||||||
dnl set python3 default here
|
dnl set python3 default here
|
||||||
python3)
|
[python3], [
|
||||||
PKG_CHECK_MODULES([PY], [python-3.4],
|
PYTHON_VERSION=3
|
||||||
[PY_VER="`$PKG_CONFIG --modversion python-3.4`"],
|
AX_PYTHON_DEVEL([>= '3.3'])
|
||||||
[true])
|
],
|
||||||
if test "$PY_VER" = "" ; then
|
|
||||||
PKG_CHECK_MODULES([PY], [python-3.3],
|
|
||||||
[PY_VER="`$PKG_CONFIG --modversion python-3.3`"],
|
|
||||||
[true])
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
dnl add broken versions here
|
dnl add broken versions here
|
||||||
python2.5|python2.6|python3.1|python3.2)
|
[python2.5|python2.6|python3.1|python3.2], [
|
||||||
AC_MSG_WARN(Unsupported Python version ${python}!);;
|
AC_MSG_WARN(Unsupported Python version ${python}!)
|
||||||
python*)
|
],
|
||||||
python="python-${python#python}" # stay posix compliant
|
dnl user supplied version
|
||||||
PKG_CHECK_MODULES([PY], [${python}],
|
[python*], [
|
||||||
[PY_VER="`$PKG_CONFIG --modversion ${python}`"],
|
PYTHON_VERSION="${python#python}"
|
||||||
[AC_MSG_WARN(Cannot find "${python}.pc"!)])
|
AX_PYTHON_DEVEL()
|
||||||
;;
|
],[
|
||||||
*)
|
|
||||||
AC_MSG_WARN(Unsupported Python ${python}!)
|
AC_MSG_WARN(Unsupported Python ${python}!)
|
||||||
esac
|
]
|
||||||
|
)
|
||||||
AC_MSG_CHECKING(Python version)
|
AC_MSG_CHECKING(Python version)
|
||||||
|
|
||||||
if test "$PY_VER"; then
|
AS_IF([test "$ac_python_version" != ""], [
|
||||||
AC_MSG_RESULT($PY_VER)
|
AC_MSG_RESULT($ac_python_version)
|
||||||
python="python-${PY_VER}"
|
python="python-${ac_python_version}"
|
||||||
else
|
], [
|
||||||
AC_MSG_RESULT(Not found)
|
AC_MSG_RESULT(Not found)
|
||||||
python=no
|
python=no
|
||||||
fi
|
])
|
||||||
else
|
], [
|
||||||
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for Python])
|
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for Python])
|
||||||
python=no
|
python=no
|
||||||
fi
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** IPv6 *************************************************************
|
dnl ** IPv6 *************************************************************
|
||||||
@@ -345,177 +314,173 @@ AC_CHECK_LIB(socket, select)
|
|||||||
|
|
||||||
AC_CHECK_FUNCS(getaddrinfo, have_getaddrinfo=yes)
|
AC_CHECK_FUNCS(getaddrinfo, have_getaddrinfo=yes)
|
||||||
AC_MSG_CHECKING(whether IPv6 is supported)
|
AC_MSG_CHECKING(whether IPv6 is supported)
|
||||||
if test "$have_getaddrinfo" = yes; then
|
AS_IF([test "$have_getaddrinfo" = yes], [
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
else
|
], [
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
AC_MSG_ERROR(ipv6 support not found!)
|
AC_MSG_ERROR(ipv6 support not found!)
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** OPENSSL **********************************************************
|
dnl ** OPENSSL **********************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
retry=no
|
|
||||||
if test "$openssl" != no; then
|
AS_IF([test "$openssl" != no], [
|
||||||
PKG_CHECK_MODULES(OPENSSL, [openssl], [
|
PKG_CHECK_MODULES(OPENSSL, [openssl], [
|
||||||
AC_DEFINE(USE_OPENSSL)
|
AC_DEFINE(USE_OPENSSL)
|
||||||
openssl=yes
|
openssl=yes
|
||||||
COMMON_LIBS="$COMMON_LIBS $OPENSSL_LIBS"
|
COMMON_LIBS="$COMMON_LIBS $OPENSSL_LIBS"
|
||||||
COMMON_CFLAGS="$COMMON_CFLAGS $OPENSSL_CFLAGS"
|
COMMON_CFLAGS="$COMMON_CFLAGS $OPENSSL_CFLAGS"
|
||||||
], [
|
], [
|
||||||
retry=yes
|
unset openssl_path ac_cv_lib_ssl_SSL_new ac_cv_header_openssl_ssl_h
|
||||||
])
|
AS_IF([test "$openssl" != yes], [
|
||||||
fi
|
openssl_path=$openssl
|
||||||
|
|
||||||
if test "$retry" = "yes"; then
|
|
||||||
unset openssl_path ac_cv_lib_ssl_SSL_new ac_cv_header_openssl_ssl_h
|
|
||||||
if test "$openssl" != yes; then
|
|
||||||
openssl_path=$openssl
|
|
||||||
fi
|
|
||||||
openssl=no
|
|
||||||
OPENSSL_LIBS="-lcrypto"
|
|
||||||
if test -n "$openssl_path"; then
|
|
||||||
OPENSSL_LIBS="-L$openssl_path/lib $OPENSSL_LIBS"
|
|
||||||
fi
|
|
||||||
SAVED_LIBS=$LIBS
|
|
||||||
LIBS="$LIBS $OPENSSL_LIBS"
|
|
||||||
AC_CHECK_LIB(ssl, SSL_new, [
|
|
||||||
if test -n "$openssl_path"; then
|
|
||||||
OPENSSL_CFLAGS="-I$openssl_path/include"
|
|
||||||
fi
|
|
||||||
SAVED_CFLAGS=$CFLAGS
|
|
||||||
CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
|
|
||||||
AC_CHECK_HEADERS(openssl/ssl.h, [
|
|
||||||
openssl=yes
|
|
||||||
AC_DEFINE(USE_OPENSSL)
|
|
||||||
OPENSSL_LIBS="$OPENSSL_LIBS -lssl"
|
|
||||||
|
|
||||||
COMMON_LIBS="$COMMON_LIBS $OPENSSL_LIBS"
|
|
||||||
COMMON_CFLAGS="$COMMON_CFLAGS $OPENSSL_CFLAGS"
|
|
||||||
])
|
])
|
||||||
CFLAGS=$SAVED_CFLAGS
|
openssl=no
|
||||||
|
OPENSSL_LIBS="-lcrypto"
|
||||||
|
AS_IF([test -n "$openssl_path"], [
|
||||||
|
OPENSSL_LIBS="-L$openssl_path/lib $OPENSSL_LIBS"
|
||||||
|
])
|
||||||
|
SAVED_LIBS=$LIBS
|
||||||
|
LIBS="$LIBS $OPENSSL_LIBS"
|
||||||
|
AC_CHECK_LIB(ssl, SSL_new, [
|
||||||
|
AS_IF([test -n "$openssl_path"], [
|
||||||
|
OPENSSL_CFLAGS="-I$openssl_path/include"
|
||||||
|
])
|
||||||
|
SAVED_CFLAGS=$CFLAGS
|
||||||
|
CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
|
||||||
|
AC_CHECK_HEADERS(openssl/ssl.h, [
|
||||||
|
openssl=yes
|
||||||
|
AC_DEFINE(USE_OPENSSL)
|
||||||
|
OPENSSL_LIBS="$OPENSSL_LIBS -lssl"
|
||||||
|
|
||||||
|
COMMON_LIBS="$COMMON_LIBS $OPENSSL_LIBS"
|
||||||
|
COMMON_CFLAGS="$COMMON_CFLAGS $OPENSSL_CFLAGS"
|
||||||
|
])
|
||||||
|
CFLAGS=$SAVED_CFLAGS
|
||||||
|
])
|
||||||
|
LIBS=$SAVED_LIBS
|
||||||
])
|
])
|
||||||
LIBS=$SAVED_LIBS
|
])
|
||||||
fi
|
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** LIBPROXY *********************************************************
|
dnl ** LIBPROXY *********************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
if test "x$libproxy" = "xyes" -o "x$libproxy" = "xauto" ; then
|
AS_IF([test "x$libproxy" = "xyes" -o "x$libproxy" = "xauto"], [
|
||||||
PKG_CHECK_MODULES([LIBPROXY], [libproxy-1.0], [
|
PKG_CHECK_MODULES([LIBPROXY], [libproxy-1.0], [
|
||||||
COMMON_LIBS="$COMMON_LIBS $LIBPROXY_LIBS"
|
COMMON_LIBS="$COMMON_LIBS $LIBPROXY_LIBS"
|
||||||
COMMON_CFLAGS="$COMMON_CFLAGS $LIBPROXY_CFLAGS"
|
COMMON_CFLAGS="$COMMON_CFLAGS $LIBPROXY_CFLAGS"
|
||||||
AC_DEFINE(USE_LIBPROXY)
|
AC_DEFINE(USE_LIBPROXY)
|
||||||
libproxy=yes
|
libproxy=yes
|
||||||
], [
|
], [
|
||||||
if test "x$libproxy" = "xyes" ; then
|
AS_IF([test "x$libproxy" = "xyes"], [
|
||||||
AC_MSG_ERROR(Cannot find libproxy!)
|
AC_MSG_ERROR(Cannot find libproxy!)
|
||||||
fi
|
])
|
||||||
libproxy=no
|
libproxy=no
|
||||||
])
|
])
|
||||||
else
|
], [
|
||||||
libproxy=no
|
libproxy=no
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** PLUGIN ***********************************************************
|
dnl ** PLUGIN ***********************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
if test "$plugin" = yes; then
|
AS_IF([test "$plugin" = yes], [
|
||||||
AC_DEFINE(USE_PLUGIN)
|
AC_DEFINE(USE_PLUGIN)
|
||||||
PLUGIN_LDFLAGS="-avoid-version"
|
PLUGIN_LDFLAGS="-avoid-version"
|
||||||
if test "$platform_win32" = yes; then
|
AS_IF([test "$platform_win32" = yes], [
|
||||||
PLUGIN_LDFLAGS="$PLUGIN_LDFLAGS -no-undefined"
|
PLUGIN_LDFLAGS="$PLUGIN_LDFLAGS -no-undefined"
|
||||||
fi
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** Checksum *********************************************************
|
dnl ** Checksum *********************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
if test "$checksum" != "no"; then
|
AS_IF([test "$checksum" != "no"], [
|
||||||
checksum=no
|
checksum=no
|
||||||
AC_MSG_CHECKING(for plugin interface used by Checksum)
|
AC_MSG_CHECKING(for plugin interface used by Checksum)
|
||||||
if test "$plugin" = yes; then
|
AS_IF([test "$plugin" = yes], [
|
||||||
checksum=yes
|
checksum=yes
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
else
|
], [
|
||||||
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option])
|
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option])
|
||||||
fi
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** DO AT ************************************************************
|
dnl ** DO AT ************************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
if test "$doat" != "no"; then
|
AS_IF([test "$doat" != "no"], [
|
||||||
AC_MSG_CHECKING(for plugin interface used by Do At)
|
AC_MSG_CHECKING(for plugin interface used by Do At)
|
||||||
doat=no
|
doat=no
|
||||||
if test "$plugin" = yes; then
|
AS_IF([test "$plugin" = yes], [
|
||||||
doat=yes
|
doat=yes
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
else
|
], [
|
||||||
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for Do At])
|
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for Do At])
|
||||||
fi
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** FiSHLiM **********************************************************
|
dnl ** FiSHLiM **********************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
if test "$fishlim" != "no"; then
|
AS_IF([test "$fishlim" != "no"], [
|
||||||
fishlim=no
|
fishlim=no
|
||||||
AC_MSG_CHECKING(for plugin interface used by FiSHLiM)
|
AC_MSG_CHECKING(for plugin interface used by FiSHLiM)
|
||||||
if test "$plugin" = yes; then
|
AS_IF([test "$plugin" = yes], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
AC_MSG_CHECKING(for OpenSSL used by FiSHLiM)
|
AC_MSG_CHECKING(for OpenSSL used by FiSHLiM)
|
||||||
if test "$openssl" = yes; then
|
AS_IF([test "$openssl" = yes], [
|
||||||
fishlim=yes
|
fishlim=yes
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
else
|
], [
|
||||||
AC_MSG_RESULT([OpenSSL cannot be found, use the --enable-openssl option])
|
AC_MSG_RESULT([OpenSSL cannot be found, use the --enable-openssl option])
|
||||||
fi
|
])
|
||||||
else
|
], [
|
||||||
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option])
|
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option])
|
||||||
fi
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** SYSINFO **********************************************************
|
dnl ** SYSINFO **********************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
if test "$sysinfo" != "no"; then
|
AS_IF([test "$sysinfo" != "no"], [
|
||||||
AC_MSG_CHECKING(for plugin interface used by SysInfo)
|
AC_MSG_CHECKING(for plugin interface used by SysInfo)
|
||||||
if test "$plugin" = yes; then
|
AS_IF([test "$plugin" = yes], [
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
if test "$platform_osx" = yes; then
|
AS_IF([test "$platform_osx" = yes], [
|
||||||
sysinfo=yes
|
sysinfo=yes
|
||||||
else
|
], [
|
||||||
PKG_CHECK_MODULES(LIBPCI, libpci >= 3.0.0, [
|
PKG_CHECK_MODULES(LIBPCI, libpci >= 3.0.0, [
|
||||||
sysinfo=yes
|
sysinfo=yes
|
||||||
AC_DEFINE(HAVE_LIBPCI)
|
AC_DEFINE(HAVE_LIBPCI)
|
||||||
], [sysinfo=no])
|
], [sysinfo=no])
|
||||||
fi
|
])
|
||||||
else
|
], [
|
||||||
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for SysInfo])
|
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for SysInfo])
|
||||||
sysinfo=no
|
sysinfo=no
|
||||||
fi
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl #######################################################################
|
dnl #######################################################################
|
||||||
dnl # Check for DBUS libraries
|
dnl # Check for DBUS libraries
|
||||||
dnl #######################################################################
|
dnl #######################################################################
|
||||||
|
|
||||||
if test "x$dbus" = "xyes" ; then
|
AS_IF([test "x$dbus" = "xyes"], [
|
||||||
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60 dbus-glib-1 >= 0.60 gthread-2.0], dbus=yes, [
|
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60 dbus-glib-1 >= 0.60 gthread-2.0], dbus=yes, [
|
||||||
dbus=no
|
dbus=no
|
||||||
])
|
])
|
||||||
AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool, no)
|
AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool, no)
|
||||||
if test "x$DBUS_BINDING_TOOL" = "xno" || test "x$dbus" = "xno" ; then
|
AS_IF([test "x$DBUS_BINDING_TOOL" = "xno" || test "x$dbus" = "xno"], [
|
||||||
dbus="no"
|
dbus="no"
|
||||||
else
|
], [
|
||||||
COMMON_LIBS="$COMMON_LIBS $DBUS_LIBS"
|
COMMON_LIBS="$COMMON_LIBS $DBUS_LIBS"
|
||||||
COMMON_CFLAGS="$COMMON_CFLAGS $DBUS_CFLAGS"
|
COMMON_CFLAGS="$COMMON_CFLAGS $DBUS_CFLAGS"
|
||||||
AC_DEFINE(USE_DBUS)
|
AC_DEFINE(USE_DBUS)
|
||||||
@@ -523,44 +488,44 @@ if test "x$dbus" = "xyes" ; then
|
|||||||
AS_AC_EXPAND(DBUS_SERVICES_DIR, "$datadir/dbus-1/services")
|
AS_AC_EXPAND(DBUS_SERVICES_DIR, "$datadir/dbus-1/services")
|
||||||
AC_SUBST(DBUS_SERVICES_DIR)
|
AC_SUBST(DBUS_SERVICES_DIR)
|
||||||
AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir for DBUS is])
|
AC_DEFINE_UNQUOTED(DBUS_SERVICES_DIR, "$DBUS_SERVICES_DIR", [Where services dir for DBUS is])
|
||||||
fi
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** LIBNOTIFY ********************************************************
|
dnl ** LIBNOTIFY ********************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
if test "x$libnotify" = "xyes" ; then
|
AS_IF([test "x$libnotify" = "xyes"], [
|
||||||
PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= 0.4, [], [
|
PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= 0.4, [], [
|
||||||
libnotify=no
|
libnotify=no
|
||||||
])
|
])
|
||||||
if test "$libnotify" != "no" ; then
|
AS_IF([test "$libnotify" != "no"], [
|
||||||
GUI_LIBS="$GUI_LIBS $LIBNOTIFY_LIBS"
|
GUI_LIBS="$GUI_LIBS $LIBNOTIFY_LIBS"
|
||||||
GUI_CFLAGS="$GUI_CFLAGS $LIBNOTIFY_CFLAGS"
|
GUI_CFLAGS="$GUI_CFLAGS $LIBNOTIFY_CFLAGS"
|
||||||
AC_DEFINE(USE_LIBNOTIFY)
|
AC_DEFINE(USE_LIBNOTIFY)
|
||||||
fi
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** LIBCANBERRA ******************************************************
|
dnl ** LIBCANBERRA ******************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
if test "x$libcanberra" = "xyes" ; then
|
AS_IF([test "x$libcanberra" = "xyes"], [
|
||||||
PKG_CHECK_MODULES(LIBCANBERRA, libcanberra >= 0.22, [], [
|
PKG_CHECK_MODULES(LIBCANBERRA, libcanberra >= 0.22, [], [
|
||||||
libcanberra=no
|
libcanberra=no
|
||||||
])
|
])
|
||||||
if test "$libcanberra" != "no" ; then
|
AS_IF([test "$libcanberra" != "no"], [
|
||||||
COMMON_LIBS="$COMMON_LIBS $LIBCANBERRA_LIBS"
|
COMMON_LIBS="$COMMON_LIBS $LIBCANBERRA_LIBS"
|
||||||
COMMON_CFLAGS="$COMMON_CFLAGS $LIBCANBERRA_CFLAGS"
|
COMMON_CFLAGS="$COMMON_CFLAGS $LIBCANBERRA_CFLAGS"
|
||||||
AC_DEFINE(USE_LIBCANBERRA)
|
AC_DEFINE(USE_LIBCANBERRA)
|
||||||
fi
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** SPELL ************************************************************
|
dnl ** SPELL ************************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
if test "x$isocodes" = "xyes" ; then
|
AS_IF([test "x$isocodes" = "xyes"], [
|
||||||
PKG_CHECK_MODULES(ISOCODES, "iso-codes", [
|
PKG_CHECK_MODULES(ISOCODES, "iso-codes", [
|
||||||
iso_codes_prefix=`$PKG_CONFIG --variable=prefix iso-codes 2>/dev/null || echo /usr`
|
iso_codes_prefix=`$PKG_CONFIG --variable=prefix iso-codes 2>/dev/null || echo /usr`
|
||||||
AC_MSG_NOTICE([iso-codes prefix: $iso_codes_prefix])
|
AC_MSG_NOTICE([iso-codes prefix: $iso_codes_prefix])
|
||||||
@@ -571,18 +536,18 @@ if test "x$isocodes" = "xyes" ; then
|
|||||||
isocodes=no
|
isocodes=no
|
||||||
AC_MSG_WARN(iso-codes not found!)
|
AC_MSG_WARN(iso-codes not found!)
|
||||||
])
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** Static Analysis **************************************************
|
dnl ** Static Analysis **************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
if test "x$analyze" = "xyes"; then
|
AS_IF([test "x$analyze" = "xyes"], [
|
||||||
if test "$CC" != "clang"; then
|
AS_IF([test "$CC" != "clang"], [
|
||||||
AC_MSG_WARN(CC is not clang for static analysis)
|
AC_MSG_WARN(CC is not clang for static analysis)
|
||||||
analyze=no
|
analyze=no
|
||||||
fi
|
])
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** CONDITIONALS *****************************************************
|
dnl ** CONDITIONALS *****************************************************
|
||||||
@@ -608,92 +573,22 @@ AM_CONDITIONAL(WITH_TM, test "x$theme_manager" != "xno")
|
|||||||
AM_CONDITIONAL(PLATFORM_OSX, test "x$platform_osx" == "xyes")
|
AM_CONDITIONAL(PLATFORM_OSX, test "x$platform_osx" == "xyes")
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** GCC FLAGS ********************************************************
|
dnl ** CFLAGS ***********************************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
|
||||||
dnl Only use -Wall and -pipe if we have gcc
|
CC_CHECK_FLAGS_APPEND([CFLAGS], [CFLAGS], [ \
|
||||||
if test "x$GCC" = "xyes"; then
|
-pipe \
|
||||||
if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
|
-funsigned-char \
|
||||||
CFLAGS="$CFLAGS -Wall"
|
-Wall \
|
||||||
fi
|
-Wextra \
|
||||||
dnl these flags might be unwanted
|
-Wno-unused-parameter \
|
||||||
if test x$minimalflags != xyes; then
|
-Wno-sign-compare \
|
||||||
if test "$system" = "Linux" -o "$system" = "FreeBSD"; then
|
-Wno-pointer-sign \
|
||||||
if test -z "`echo "$CFLAGS" | grep "\-pipe" 2> /dev/null`" ; then
|
-Wno-missing-field-initializers \
|
||||||
CFLAGS="$CFLAGS -pipe"
|
-Wno-unused-result \
|
||||||
fi
|
-Werror=format-security \
|
||||||
fi
|
-Werror=declaration-after-statement \
|
||||||
if test -z "`echo "$CFLAGS" | grep "\-g " 2> /dev/null`" ; then
|
|
||||||
CFLAGS="$CFLAGS -g"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl does this compiler support -Wno-pointer-sign ?
|
|
||||||
AC_MSG_CHECKING([if $CC accepts -Wno-pointer-sign ])
|
|
||||||
|
|
||||||
safe_CFLAGS=$CFLAGS
|
|
||||||
CFLAGS="-Wno-pointer-sign"
|
|
||||||
|
|
||||||
AC_TRY_COMPILE(, [
|
|
||||||
return 0;
|
|
||||||
],
|
|
||||||
[
|
|
||||||
no_pointer_sign=yes
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
], [
|
|
||||||
no_pointer_sign=no
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
])
|
||||||
CFLAGS=$safe_CFLAGS
|
|
||||||
|
|
||||||
if test x$no_pointer_sign = xyes; then
|
|
||||||
CFLAGS="$CFLAGS -Wno-pointer-sign"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl does this compiler support -funsigned-char ?
|
|
||||||
AC_MSG_CHECKING([if $CC accepts -funsigned-char ])
|
|
||||||
|
|
||||||
safe_CFLAGS=$CFLAGS
|
|
||||||
CFLAGS="-funsigned-char"
|
|
||||||
|
|
||||||
AC_TRY_COMPILE(, [
|
|
||||||
return 0;
|
|
||||||
],
|
|
||||||
[
|
|
||||||
unsigned_char=yes
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
], [
|
|
||||||
unsigned_char=no
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
|
||||||
CFLAGS=$safe_CFLAGS
|
|
||||||
|
|
||||||
if test x$unsigned_char = xyes; then
|
|
||||||
CFLAGS="$CFLAGS -funsigned-char"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl does this compiler support -Wno-unused-result ?
|
|
||||||
AC_MSG_CHECKING([if $CC accepts -Wno-unused-result ])
|
|
||||||
|
|
||||||
safe_CFLAGS=$CFLAGS
|
|
||||||
CFLAGS="-Wno-unused-result"
|
|
||||||
|
|
||||||
AC_TRY_COMPILE(, [
|
|
||||||
return 0;
|
|
||||||
],
|
|
||||||
[
|
|
||||||
no_unused_result=yes
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
], [
|
|
||||||
no_unused_result=no
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
])
|
|
||||||
CFLAGS=$safe_CFLAGS
|
|
||||||
|
|
||||||
if test x$no_unused_result = xyes; then
|
|
||||||
CFLAGS="$CFLAGS -Wno-unused-result"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** FUNCTIONS/LIBS/CFLAGS ********************************************
|
dnl ** FUNCTIONS/LIBS/CFLAGS ********************************************
|
||||||
@@ -702,16 +597,12 @@ dnl *********************************************************************
|
|||||||
AC_MSG_CHECKING(for modern sigaction)
|
AC_MSG_CHECKING(for modern sigaction)
|
||||||
dnl libc5 on linux and FreeBSD 3.x doesn\'t have siginfo_t
|
dnl libc5 on linux and FreeBSD 3.x doesn\'t have siginfo_t
|
||||||
dnl and the sa_sigation field.
|
dnl and the sa_sigation field.
|
||||||
AC_TRY_COMPILE(
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]], [[struct sigaction act;
|
||||||
[#include <signal.h>],
|
|
||||||
[struct sigaction act;
|
|
||||||
siginfo_t *si;
|
siginfo_t *si;
|
||||||
act.sa_sigaction = 0;],
|
act.sa_sigaction = 0;]])],[
|
||||||
[
|
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(USE_SIGACTION)
|
AC_DEFINE(USE_SIGACTION)
|
||||||
],
|
],[AC_MSG_RESULT(no)])
|
||||||
AC_MSG_RESULT(no))
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS(memrchr)
|
AC_CHECK_FUNCS(memrchr)
|
||||||
|
|
||||||
@@ -735,9 +626,9 @@ AC_EGREP_CPP([socklen_t[^a-zA-Z_0-9]], [#include <sys/types.h>
|
|||||||
ac_cv_type_socklen_t=yes,
|
ac_cv_type_socklen_t=yes,
|
||||||
ac_cv_type_socklen_t=no)
|
ac_cv_type_socklen_t=no)
|
||||||
])
|
])
|
||||||
if test $ac_cv_type_socklen_t = no; then
|
AS_IF([test $ac_cv_type_socklen_t = no], [
|
||||||
AC_DEFINE(socklen_t, int)
|
AC_DEFINE(socklen_t, int)
|
||||||
fi
|
])
|
||||||
|
|
||||||
dnl Mac OS X and Darwin use lookupd, which caches DNS queries by default
|
dnl Mac OS X and Darwin use lookupd, which caches DNS queries by default
|
||||||
AC_EGREP_CPP(lookupd, dnl
|
AC_EGREP_CPP(lookupd, dnl
|
||||||
@@ -747,7 +638,6 @@ AC_EGREP_CPP(lookupd, dnl
|
|||||||
|
|
||||||
dnl freebsd needs this
|
dnl freebsd needs this
|
||||||
LIBS="$LIBS $INTLLIBS"
|
LIBS="$LIBS $INTLLIBS"
|
||||||
CFLAGS="$CFLAGS $CPPFLAGS"
|
|
||||||
|
|
||||||
GUI_LIBS="$GUI_LIBS $COMMON_LIBS"
|
GUI_LIBS="$GUI_LIBS $COMMON_LIBS"
|
||||||
|
|
||||||
@@ -758,8 +648,8 @@ AC_SUBST(COMMON_LIBS)
|
|||||||
AC_SUBST(COMMON_CFLAGS)
|
AC_SUBST(COMMON_CFLAGS)
|
||||||
AC_SUBST(PERL_CFLAGS)
|
AC_SUBST(PERL_CFLAGS)
|
||||||
AC_SUBST(PERL_LDFLAGS)
|
AC_SUBST(PERL_LDFLAGS)
|
||||||
AC_SUBST(PY_CFLAGS)
|
AC_SUBST(PYTHON_CPPFLAGS)
|
||||||
AC_SUBST(PY_LIBS)
|
AC_SUBST(PYTHON_LIBS)
|
||||||
AC_SUBST(DBUS_CFLAGS)
|
AC_SUBST(DBUS_CFLAGS)
|
||||||
AC_SUBST(DBUS_LIBS)
|
AC_SUBST(DBUS_LIBS)
|
||||||
AC_SUBST(OPENSSL_LIBS)
|
AC_SUBST(OPENSSL_LIBS)
|
||||||
@@ -769,8 +659,12 @@ AC_SUBST(PLUGIN_LDFLAGS)
|
|||||||
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], AC_SUBST([pkgconfigdir], ${libdir}/pkgconfig))
|
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], AC_SUBST([pkgconfigdir], ${libdir}/pkgconfig))
|
||||||
|
|
||||||
dnl for plugin.c and pixmaps.c
|
dnl for plugin.c and pixmaps.c
|
||||||
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
|
AS_IF([test "x$prefix" = xNONE], [
|
||||||
test "x$exec_prefix" = xNONE && exec_prefix="$prefix"
|
prefix="$ac_default_prefix"
|
||||||
|
])
|
||||||
|
AS_IF([test "x$exec_prefix" = xNONE], [
|
||||||
|
exec_prefix="$prefix"
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(PREFIX, "${prefix}")
|
AC_DEFINE_UNQUOTED(PREFIX, "${prefix}")
|
||||||
|
|
||||||
@@ -835,6 +729,8 @@ echo Do At ................. : $doat
|
|||||||
echo FiSHLiM ............... : $fishlim
|
echo FiSHLiM ............... : $fishlim
|
||||||
echo SysInfo ............... : $sysinfo
|
echo SysInfo ............... : $sysinfo
|
||||||
echo
|
echo
|
||||||
|
echo Debug mode ............ : $enable_debug
|
||||||
|
echo
|
||||||
echo The binary will be installed in $prefix/bin
|
echo The binary will be installed in $prefix/bin
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
@@ -3,3 +3,6 @@ SUBDIRS = pkgconfig man
|
|||||||
if DO_GTK
|
if DO_GTK
|
||||||
SUBDIRS += icons misc
|
SUBDIRS += icons misc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
hexchat.gresource.xml
|
||||||
|
@@ -11,3 +11,5 @@ install-data-hook:
|
|||||||
|
|
||||||
uninstall-hook:
|
uninstall-hook:
|
||||||
$(UPDATE_ICON_CACHE);
|
$(UPDATE_ICON_CACHE);
|
||||||
|
|
||||||
|
EXTRA_DIST = $(icon_DATA) $(hicolor_DATA)
|
||||||
|
@@ -1,745 +1,63 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
<svg
|
<svg
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
height="64"
|
||||||
sodipodi:docname="hexchat.svg"
|
width="64">
|
||||||
version="1.0"
|
<metadata>
|
||||||
inkscape:version="0.48.4 r9939"
|
|
||||||
sodipodi:version="0.32"
|
|
||||||
id="svg2"
|
|
||||||
height="64"
|
|
||||||
width="64">
|
|
||||||
<defs
|
|
||||||
id="defs4">
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient2289">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ff2600;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop2291" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffd600;stop-opacity:1;"
|
|
||||||
offset="1"
|
|
||||||
id="stop2293" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient1335"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.545166,0,0,0.544959,0.186963,35.29511)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="72.348671"
|
|
||||||
y2="20.59322" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient1337"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.545166,0,0,0.544959,0.186963,35.29511)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="16.88862"
|
|
||||||
y2="19.001091" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient1317"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.052758,-16.66733)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="72.348671"
|
|
||||||
y2="20.59322" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient1319"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.052758,-16.66733)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="16.88862"
|
|
||||||
y2="19.001091" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient1320"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="72.348671"
|
|
||||||
y2="20.59322" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient1322"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="16.88862"
|
|
||||||
y2="19.001091" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient2997"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-160.10656,-7.1914058)"
|
|
||||||
x1="130.2673"
|
|
||||||
y1="78.743134"
|
|
||||||
x2="129.2081"
|
|
||||||
y2="25.771122" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient3011"
|
|
||||||
x1="34.62241"
|
|
||||||
y1="53.508884"
|
|
||||||
x2="34.466503"
|
|
||||||
y2="5.4893961"
|
|
||||||
gradientUnits="userSpaceOnUse" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient3030"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="34.62241"
|
|
||||||
y1="53.508884"
|
|
||||||
x2="34.466503"
|
|
||||||
y2="5.4893961" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient3070"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="34.62241"
|
|
||||||
y1="53.508884"
|
|
||||||
x2="34.466503"
|
|
||||||
y2="5.4893961"
|
|
||||||
gradientTransform="matrix(0.99894925,0,0,0.97549134,-3.1829063,4.465557)" />
|
|
||||||
<filter
|
|
||||||
id="filter3281"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3283"
|
|
||||||
flood-opacity="0.33"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3285"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3287"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="2"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3289"
|
|
||||||
dx="4"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3291"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<filter
|
|
||||||
id="filter3293"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3295"
|
|
||||||
flood-opacity="0.33"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3297"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3299"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="2"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3301"
|
|
||||||
dx="4"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3303"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient4089"
|
|
||||||
x1="99.348503"
|
|
||||||
y1="59.934135"
|
|
||||||
x2="100.40916"
|
|
||||||
y2="10.613438"
|
|
||||||
gradientUnits="userSpaceOnUse" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient4093"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="99.348503"
|
|
||||||
y1="59.934135"
|
|
||||||
x2="100.40916"
|
|
||||||
y2="10.613438" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient4096"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="99.348503"
|
|
||||||
y1="59.934135"
|
|
||||||
x2="100.40916"
|
|
||||||
y2="10.613438" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient4098"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="99.348503"
|
|
||||||
y1="59.934135"
|
|
||||||
x2="100.40916"
|
|
||||||
y2="10.613438"
|
|
||||||
gradientTransform="translate(-70.003571,-2.298097)" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
id="linearGradient4101"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.94969205,0,0,0.89326813,1.6716955,2.7025635)"
|
|
||||||
x1="31.372862"
|
|
||||||
y1="60.111893"
|
|
||||||
x2="31.559002"
|
|
||||||
y2="5.6897221" />
|
|
||||||
<filter
|
|
||||||
id="filter4111"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood4113"
|
|
||||||
flood-opacity="0.33"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite4115"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur4117"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="2"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset4119"
|
|
||||||
dx="4"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite4121"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<filter
|
|
||||||
id="filter4123"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood4125"
|
|
||||||
flood-opacity="0.33"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite4127"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur4129"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="2"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset4131"
|
|
||||||
dx="4"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite4133"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<linearGradient
|
|
||||||
y2="19.001091"
|
|
||||||
x2="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1330"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="20.59322"
|
|
||||||
x2="72.348671"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1328"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="19.001091"
|
|
||||||
x2="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1322-5"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="20.59322"
|
|
||||||
x2="72.348671"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1320-4"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="19.001091"
|
|
||||||
x2="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.052758,-16.66733)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1319-2"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="20.59322"
|
|
||||||
x2="72.348671"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.052758,-16.66733)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1317-8"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="19.001091"
|
|
||||||
x2="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.545166,0,0,0.544959,0.186963,35.29511)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1337-8"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="20.59322"
|
|
||||||
x2="72.348671"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.545166,0,0,0.544959,0.186963,35.29511)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1335-4"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient2289-4">
|
|
||||||
<stop
|
|
||||||
id="stop2291-0"
|
|
||||||
offset="0"
|
|
||||||
style="stop-color:#ff2600;stop-opacity:1;" />
|
|
||||||
<stop
|
|
||||||
id="stop2293-9"
|
|
||||||
offset="1"
|
|
||||||
style="stop-color:#ffd600;stop-opacity:1;" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
id="linearGradient3133"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.51445624,0,0,0.53856587,7.3477348,6.9450134)"
|
|
||||||
x1="46.881573"
|
|
||||||
y1="91.824585"
|
|
||||||
x2="47.225189"
|
|
||||||
y2="1.5596932" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
id="linearGradient3136"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.51445624,0,0,0.53856587,-120.3871,-29.360443)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="72.348671"
|
|
||||||
y2="20.59322" />
|
|
||||||
<filter
|
|
||||||
id="filter3138"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3140"
|
|
||||||
flood-opacity="0.33"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3142"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3144"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="2"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3146"
|
|
||||||
dx="4"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3148"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<filter
|
|
||||||
id="filter3670"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3672"
|
|
||||||
flood-opacity="0.2"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3674"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3676"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="1.5"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3678"
|
|
||||||
dx="0"
|
|
||||||
dy="4"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3680"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="fbSourceGraphic" />
|
|
||||||
<feColorMatrix
|
|
||||||
result="fbSourceGraphicAlpha"
|
|
||||||
in="fbSourceGraphic"
|
|
||||||
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
|
|
||||||
id="feColorMatrix3682" />
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3684"
|
|
||||||
flood-opacity="0.2"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood"
|
|
||||||
in="fbSourceGraphic" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3686"
|
|
||||||
in2="fbSourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3688"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="1.5"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3690"
|
|
||||||
dx="0"
|
|
||||||
dy="2"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3692"
|
|
||||||
in2="offset"
|
|
||||||
in="fbSourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="fbSourceGraphic" />
|
|
||||||
<feColorMatrix
|
|
||||||
result="fbSourceGraphicAlpha"
|
|
||||||
in="fbSourceGraphic"
|
|
||||||
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
|
|
||||||
id="feColorMatrix3706" />
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3708"
|
|
||||||
flood-opacity="0.2"
|
|
||||||
flood-color="rgb(255,255,255)"
|
|
||||||
result="flood"
|
|
||||||
in="fbSourceGraphic" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3710"
|
|
||||||
in2="fbSourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3712"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="1"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3714"
|
|
||||||
dx="0"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3716"
|
|
||||||
in2="offset"
|
|
||||||
in="fbSourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="fbSourceGraphic" />
|
|
||||||
<feColorMatrix
|
|
||||||
result="fbSourceGraphicAlpha"
|
|
||||||
in="fbSourceGraphic"
|
|
||||||
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
|
|
||||||
id="feColorMatrix3123" />
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3125"
|
|
||||||
flood-opacity="0.2"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood"
|
|
||||||
in="fbSourceGraphic" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3127"
|
|
||||||
in2="fbSourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3129"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="1"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3131"
|
|
||||||
dx="0"
|
|
||||||
dy="2"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3133"
|
|
||||||
in2="offset"
|
|
||||||
in="fbSourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<filter
|
|
||||||
id="filter3135"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3137"
|
|
||||||
flood-opacity="0.2"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3139"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3141"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="1"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3143"
|
|
||||||
dx="0"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3145"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<filter
|
|
||||||
id="filter3183"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3185"
|
|
||||||
flood-opacity="0.3"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3187"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3189"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="2"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3191"
|
|
||||||
dx="0"
|
|
||||||
dy="2"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3193"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
</defs>
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:zoom="7.9999999"
|
|
||||||
inkscape:cx="61.011203"
|
|
||||||
inkscape:cy="36.086679"
|
|
||||||
inkscape:document-units="px"
|
|
||||||
inkscape:current-layer="layer1"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:window-width="1270"
|
|
||||||
inkscape:window-height="837"
|
|
||||||
inkscape:window-x="287"
|
|
||||||
inkscape:window-y="27"
|
|
||||||
showguides="true"
|
|
||||||
inkscape:guide-bbox="true"
|
|
||||||
inkscape:window-maximized="0">
|
|
||||||
<inkscape:grid
|
|
||||||
type="xygrid"
|
|
||||||
id="grid3001" />
|
|
||||||
</sodipodi:namedview>
|
|
||||||
<metadata
|
|
||||||
id="metadata7">
|
|
||||||
<rdf:RDF>
|
<rdf:RDF>
|
||||||
<cc:Work
|
<cc:Work>
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:type
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title></dc:title>
|
|
||||||
<dc:creator>
|
<dc:creator>
|
||||||
<cc:Agent>
|
<cc:Agent>
|
||||||
<dc:title>Guglielmi David</dc:title>
|
<dc:title>Guglielmi David</dc:title>
|
||||||
</cc:Agent>
|
</cc:Agent>
|
||||||
</dc:creator>
|
</dc:creator>
|
||||||
<cc:license
|
<cc:license rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
|
||||||
rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
|
|
||||||
<dc:rights>
|
<dc:rights>
|
||||||
<cc:Agent>
|
<cc:Agent>
|
||||||
<dc:title>Peter Zelezny</dc:title>
|
<dc:title>Peter Zelezny</dc:title>
|
||||||
</cc:Agent>
|
</cc:Agent>
|
||||||
</dc:rights>
|
</dc:rights>
|
||||||
|
<dc:contributor>
|
||||||
|
<cc:Agent>
|
||||||
|
<dc:title>Samuel Messner</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:contributor>
|
||||||
</cc:Work>
|
</cc:Work>
|
||||||
<cc:License
|
<cc:License rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
|
||||||
rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
|
<cc:requires rdf:resource="http://web.resource.org/cc/Notice" />
|
||||||
<cc:permits
|
<cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
|
||||||
rdf:resource="http://web.resource.org/cc/Reproduction" />
|
<cc:requires rdf:resource="http://web.resource.org/cc/SourceCode" />
|
||||||
<cc:permits
|
<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" />
|
||||||
rdf:resource="http://web.resource.org/cc/Distribution" />
|
<cc:permits rdf:resource="http://web.resource.org/cc/Distribution" />
|
||||||
<cc:requires
|
<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
|
||||||
rdf:resource="http://web.resource.org/cc/Notice" />
|
|
||||||
<cc:permits
|
|
||||||
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
|
|
||||||
<cc:requires
|
|
||||||
rdf:resource="http://web.resource.org/cc/ShareAlike" />
|
|
||||||
<cc:requires
|
|
||||||
rdf:resource="http://web.resource.org/cc/SourceCode" />
|
|
||||||
</cc:License>
|
</cc:License>
|
||||||
</rdf:RDF>
|
</rdf:RDF>
|
||||||
</metadata>
|
</metadata>
|
||||||
<g
|
<defs>
|
||||||
inkscape:label="Calque 1"
|
<linearGradient id="hexchatGradient" x1="0" y1="1" x2="0" y2="0">
|
||||||
inkscape:groupmode="layer"
|
<stop id="hgRedStop" offset="0" style="stop-color: #FF2600; stop-opacity: 1;" />
|
||||||
id="layer1">
|
<stop id="hgYellowStop" offset="1" style="stop-color: #FFD600; stop-opacity: 1;" />
|
||||||
<g
|
</linearGradient>
|
||||||
id="g3663">
|
<filter inkscape:collect="always" id="dropshadow">
|
||||||
<path
|
<feGaussianBlur inkscape:collect="always" stdDeviation="1.9736701" id="dropshadowGaussian" />
|
||||||
style="fill:#000000;fill-opacity:1;"
|
</filter>
|
||||||
d="m 31.404792,8.7464684 c -6.271873,0.05843 -12.553,0.431777 -13.735377,1.075609 C 15.304661,11.109737 4.1505773,29.32852 4.1783444,31.859522 c 0.02777,2.531005 11.5871596,20.543967 13.9796816,21.787309 2.392519,1.243342 25.106,1.037521 27.470753,-0.250141 C 47.993531,52.109028 59.147618,33.890246 59.119851,31.359242 59.092081,28.828238 47.532689,10.790262 45.140167,9.5469214 43.943907,8.9252504 37.676665,8.6880384 31.404792,8.7464684 z m 0.05429,4.5275596 c 4.90437,-0.047 9.786849,0.175368 10.722281,0.67538 1.870861,1.000021 10.917726,15.499216 10.939439,17.534904 C 53.142512,33.52 44.410541,48.158649 42.561393,49.194315 40.712245,50.229983 22.960549,50.419464 21.089689,49.419444 19.218826,48.419423 10.199106,33.920226 10.177392,31.884537 10.155682,29.84885 18.860508,15.185189 20.709656,14.14952 c 0.924575,-0.517833 5.845056,-0.828498 10.749425,-0.875492 z"
|
</defs>
|
||||||
id="path4107"
|
<path
|
||||||
inkscape:connector-curvature="0" />
|
style="fill: #000000; fill-opacity: 1;"
|
||||||
<path
|
d="m 31.62506,4.4248023 c -7.285288,0.0713 -14.595323,0.526836 -15.96875,1.3125 C 12.909458,7.3086297 -0.0321942,29.523731 6.0185229e-5,32.612303 0.0323162,35.700876 13.470952,57.688808 16.25006,59.206053 c 2.779105,1.517245 29.159399,1.258827 31.90625,-0.3125 2.746852,-1.571328 15.688504,-23.786428 15.65625,-26.875 C 63.7803,28.929981 50.372918,6.9107967 47.59381,5.3935523 46.204258,4.6349293 38.910347,4.3535003 31.62506,4.4248023 z m -0.1875,9.2500007 c 3.386631,-0.03246 6.676687,0.05409 8.75,0.28125 l -8.71875,9.71875 -9.0625,-9.5 c 2.055746,-0.283043 5.521157,-0.466366 9.03125,-0.5 z m 17.34375,9.84375 c 2.298293,3.744897 4.302354,7.392556 4.3125,8.34375 0.01126,1.055883 -2.358157,5.507241 -4.875,9.6875 l -9.03125,-8.03125 z m -34.46875,0.25 8.75,9.75 -8.1875,7.875 c -2.482342,-3.992634 -4.707927,-8.110307 -4.71875,-9.125 -0.01021,-0.95736 1.927117,-4.687748 4.15625,-8.5 z m 17.15625,16.90625 9.8125,9.21875 c -4.111037,0.67314 -16.108253,0.781873 -19.46875,0.125 z"
|
||||||
transform="matrix(0.97890109,0,0,0.98965389,0.52623659,-1.3159842)"
|
id="outline"
|
||||||
style="fill:#000000;fill-opacity:1;"
|
sodipodi:nodetypes="ssssssssscccscsccccccsccccc" />
|
||||||
d="M 31.801142,5.3887159 C 24.358829,5.4607629 16.905535,5.9211193 15.502506,6.7149966 12.696449,8.3027513 -0.53918189,30.767467 -0.50623228,33.888328 -0.47328049,37.00919 13.243292,59.220118 16.0823,60.753225 18.921305,62.286332 45.873514,62.032541 48.67957,60.444787 51.485627,58.857032 64.721258,36.392315 64.688309,33.271454 64.655357,30.150593 50.938784,7.9088218 48.099776,6.3757155 46.680274,5.6091623 39.243454,5.3166688 31.801142,5.3887159 z m 0.06442,5.5827171 c 5.81961,-0.05795 11.613244,0.216241 12.723243,0.83278 2.219996,1.233079 12.955163,19.111349 12.980929,21.621461 0.02577,2.51011 -10.335747,20.560333 -12.529979,21.837366 -2.19423,1.277031 -23.2587,1.510671 -25.478697,0.277592 C 17.341063,54.307554 6.638107,36.429283 6.6123418,33.919173 6.5865755,31.409062 16.915878,13.327995 19.110109,12.050964 20.207224,11.412447 26.045952,11.02938 31.865563,10.971433 z"
|
<path
|
||||||
id="path4103"
|
style="fill: url(#hexchatGradient); fill-opacity: 1;"
|
||||||
inkscape:connector-curvature="0" />
|
d="m 31.25006,6.4873027 c -6.857093,0.06521 -13.707297,0.469014 -15,1.1875 -2.585405,1.4369712 -14.780358,21.7692653 -14.75,24.5937503 0.03036,2.824486 12.665486,22.924987 15.28125,24.3125 2.615763,1.387513 27.445846,1.186972 30.03125,-0.25 2.585405,-1.436972 14.780359,-21.769265 14.75,-24.59375 C 61.5322,28.912818 48.897074,8.7810649 46.28131,7.3935527 44.973429,6.6997957 38.107152,6.4220967 31.25006,6.4873027 z m 0.0625,5.0625003 c 5.36199,-0.05245 10.696035,0.19201 11.71875,0.75 0.06132,0.03346 0.143803,0.127745 0.21875,0.1875 l -11.28125,12.59375 -0.5,0.53125 -0.46875,-0.53125 -11.75,-12.3125 c 0.10903,-0.09884 0.228263,-0.201843 0.3125,-0.25 1.010846,-0.577879 6.38801,-0.916306 11.75,-0.96875 z m 18.0625,9.46875 c 2.883844,4.661341 5.612556,9.652893 5.625,10.84375 0.01348,1.290331 -3.064699,7.087557 -6.09375,12.09375 l -11.09375,-9.90625 -0.53125,-0.46875 0.5,-0.46875 11.59375,-12.09375 z m -35.78125,0.03125 10.84375,12.0625 0.4375,0.46875 -0.46875,0.4375 -10.28125,9.90625 c -3.04689,-4.86606 -6.049362,-10.36778 -6.0625,-11.625 -0.01271,-1.216102 2.689239,-6.451996 5.53125,-11.25 z m 17.875,17.78125 0.4375,0.4375 12.34375,11.59375 c -0.318014,0.365376 -0.587006,0.638955 -0.78125,0.75 -2.02169,1.155758 -21.423322,1.397228 -23.46875,0.28125 -0.228202,-0.124506 -0.601742,-0.47821 -1,-0.9375 l 12,-11.6875 0.46875,-0.4375 z"
|
||||||
<path
|
id="coloredX" />
|
||||||
inkscape:transform-center-y="2.25"
|
|
||||||
inkscape:transform-center-x="2.25"
|
|
||||||
style="fill:url(#linearGradient3133);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.31593215000000008;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;"
|
|
||||||
d="m 10.723737,18.285684 7.623916,-7.935243 13.238019,13.886676 12.492701,-13.886676 8.576909,7.935243 -14.294847,14.878584 13.341856,11.902864 -6.670928,6.94334 L 31.585672,39.351071 18.573785,52.010472 11.676724,45.086347 24.065591,33.164268 10.723737,18.285684 z"
|
|
||||||
id="path2297"
|
|
||||||
sodipodi:nodetypes="ccccccccccccc"
|
|
||||||
inkscape:connector-curvature="0" />
|
|
||||||
<path
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
id="path3305"
|
|
||||||
d="M 31.293607,6.0952825 C 24.436514,6.1604875 17.569304,6.5771256 16.276601,7.2956116 13.691196,8.7325834 1.4963386,29.063913 1.5266972,31.888398 1.5570579,34.712884 14.195039,54.814527 16.810803,56.20204 19.426566,57.589553 44.25941,57.359866 46.844814,55.922894 49.430219,54.485922 61.625078,34.154591 61.594719,31.330106 61.564358,28.505621 48.926376,8.3760634 46.310612,6.9885506 45.002731,6.294794 38.150699,6.0300774 31.293607,6.0952825 z m 0.05936,5.0525485 c 5.36199,-0.05245 10.700046,0.195704 11.722761,0.753694 2.045429,1.115978 11.936445,17.296419 11.960184,19.568154 0.02374,2.271736 -9.523004,18.6078 -11.544693,19.763557 -2.02169,1.155758 -21.429773,1.36721 -23.475201,0.251232 C 17.970585,50.368491 8.1092472,34.188049 8.085508,31.916313 8.061768,29.644577 17.578834,13.2806 19.600523,12.124842 c 1.010846,-0.577879 6.39045,-0.924567 11.75244,-0.977011 z"
|
|
||||||
style="fill:url(#linearGradient4101);fill-opacity:1;" />
|
|
||||||
<path
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
id="path3077"
|
|
||||||
d="M 14.640198,55.682743 C 9.6971439,47.360612 2.8950957,35.733851 2.9419881,35.686959 c 0.031272,-0.03127 0.5023581,0.289334 1.0468575,0.712459 0.5444994,0.423125 1.0414462,0.769317 1.1043264,0.769317 0.06288,0 2.6329414,4.276521 5.711247,9.50338 l 5.59692,9.503379 2.159128,0.007 2.159126,0.007 -0.34365,-0.584653 C 20.186937,55.28323 17.303514,50.518786 13.968339,45.017137 10.633164,39.515488 7.9043842,34.929294 7.9043842,34.825595 c 0,-0.103699 0.2455542,-0.59277 0.545676,-1.086823 0.3001218,-0.494053 0.545676,-0.941721 0.545676,-0.994816 0,-0.05309 -0.2788317,-0.09654 -0.619626,-0.09654 -0.8505388,0 -1.0953557,-0.488405 -1.0953557,-2.185211 0,-1.90734 -0.048411,-1.868066 2.30512,-1.870072 l 1.9823345,-0.0017 1.052375,-1.721616 c 0.578806,-0.94689 1.052375,-1.785869 1.052375,-1.8644 0,-0.07853 -0.829918,-0.162484 -1.844262,-0.186561 l -1.8442631,-0.04378 4.4809551,-7.327649 4.480953,-7.32765 12.466741,-0.0399 12.466738,-0.0399 0.517892,0.854518 0.517892,0.854518 2.335995,0.04287 2.335994,0.04287 2.742626,4.521316 c 1.508447,2.486723 4.136212,6.819001 5.839482,9.627283 1.703268,2.808283 3.157599,5.105969 3.231846,5.105969 0.256907,0 0.13186,-0.393635 -0.411085,-1.294044 -0.299901,-0.497351 -0.545275,-0.935841 -0.545275,-0.974422 0,-0.03858 0.310833,-0.07015 0.69074,-0.07015 0.575204,0 0.699074,-0.05324 0.740561,-0.318272 0.03599,-0.229934 0.273254,0.06215 0.854835,1.052375 0.702767,1.196557 0.780303,1.410253 0.610448,1.682462 -0.107012,0.171499 -0.377881,0.627528 -0.601929,1.013399 l -0.407361,0.701583 0.533953,0.857491 c 0.293674,0.47162 0.535536,0.950306 0.537472,1.063747 0.0019,0.113441 -3.098537,5.322698 -6.889942,11.576127 l -6.893462,11.36987 -16.876654,0 -16.876655,0 -1.226996,-2.065773 z"
|
|
||||||
style="fill:none;" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -1,746 +1,58 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
<svg
|
<svg
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
height="64"
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
width="64">
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
<metadata>
|
||||||
sodipodi:docname="hexchat.svg"
|
|
||||||
version="1.0"
|
|
||||||
inkscape:version="0.48.4 r9939"
|
|
||||||
sodipodi:version="0.32"
|
|
||||||
id="svg2"
|
|
||||||
height="64"
|
|
||||||
width="64">
|
|
||||||
<defs
|
|
||||||
id="defs4">
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient2289">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ff2600;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop2291" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#ffd600;stop-opacity:1;"
|
|
||||||
offset="1"
|
|
||||||
id="stop2293" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient1335"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.545166,0,0,0.544959,0.186963,35.29511)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="72.348671"
|
|
||||||
y2="20.59322" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient1337"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.545166,0,0,0.544959,0.186963,35.29511)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="16.88862"
|
|
||||||
y2="19.001091" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient1317"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.052758,-16.66733)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="72.348671"
|
|
||||||
y2="20.59322" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient1319"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.052758,-16.66733)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="16.88862"
|
|
||||||
y2="19.001091" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient1320"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="72.348671"
|
|
||||||
y2="20.59322" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient1322"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="16.88862"
|
|
||||||
y2="19.001091" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient2997"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-160.10656,-7.1914058)"
|
|
||||||
x1="130.2673"
|
|
||||||
y1="78.743134"
|
|
||||||
x2="129.2081"
|
|
||||||
y2="25.771122" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient3011"
|
|
||||||
x1="34.62241"
|
|
||||||
y1="53.508884"
|
|
||||||
x2="34.466503"
|
|
||||||
y2="5.4893961"
|
|
||||||
gradientUnits="userSpaceOnUse" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient3030"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="34.62241"
|
|
||||||
y1="53.508884"
|
|
||||||
x2="34.466503"
|
|
||||||
y2="5.4893961" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient3070"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="34.62241"
|
|
||||||
y1="53.508884"
|
|
||||||
x2="34.466503"
|
|
||||||
y2="5.4893961"
|
|
||||||
gradientTransform="matrix(0.99894925,0,0,0.97549134,-3.1829063,4.465557)" />
|
|
||||||
<filter
|
|
||||||
id="filter3281"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3283"
|
|
||||||
flood-opacity="0.33"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3285"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3287"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="2"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3289"
|
|
||||||
dx="4"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3291"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<filter
|
|
||||||
id="filter3293"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3295"
|
|
||||||
flood-opacity="0.33"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3297"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3299"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="2"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3301"
|
|
||||||
dx="4"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3303"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient4089"
|
|
||||||
x1="99.348503"
|
|
||||||
y1="59.934135"
|
|
||||||
x2="100.40916"
|
|
||||||
y2="10.613438"
|
|
||||||
gradientUnits="userSpaceOnUse" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient4093"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="99.348503"
|
|
||||||
y1="59.934135"
|
|
||||||
x2="100.40916"
|
|
||||||
y2="10.613438" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient4096"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="99.348503"
|
|
||||||
y1="59.934135"
|
|
||||||
x2="100.40916"
|
|
||||||
y2="10.613438" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289"
|
|
||||||
id="linearGradient4098"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="99.348503"
|
|
||||||
y1="59.934135"
|
|
||||||
x2="100.40916"
|
|
||||||
y2="10.613438"
|
|
||||||
gradientTransform="translate(-70.003571,-2.298097)" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
id="linearGradient4101"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.94969205,0,0,0.89326813,1.6716955,2.7025635)"
|
|
||||||
x1="31.372862"
|
|
||||||
y1="60.111893"
|
|
||||||
x2="31.559002"
|
|
||||||
y2="5.6897221" />
|
|
||||||
<filter
|
|
||||||
id="filter4111"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood4113"
|
|
||||||
flood-opacity="0.33"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite4115"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur4117"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="2"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset4119"
|
|
||||||
dx="4"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite4121"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<filter
|
|
||||||
id="filter4123"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood4125"
|
|
||||||
flood-opacity="0.33"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite4127"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur4129"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="2"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset4131"
|
|
||||||
dx="4"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite4133"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<linearGradient
|
|
||||||
y2="19.001091"
|
|
||||||
x2="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1330"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="20.59322"
|
|
||||||
x2="72.348671"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1328"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="19.001091"
|
|
||||||
x2="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1322-5"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="20.59322"
|
|
||||||
x2="72.348671"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1320-4"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="19.001091"
|
|
||||||
x2="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.052758,-16.66733)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1319-2"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="20.59322"
|
|
||||||
x2="72.348671"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.735969,0,0,0.735801,-2.052758,-16.66733)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1317-8"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="19.001091"
|
|
||||||
x2="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.545166,0,0,0.544959,0.186963,35.29511)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1337-8"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
y2="20.59322"
|
|
||||||
x2="72.348671"
|
|
||||||
y1="77.796608"
|
|
||||||
x1="16.88862"
|
|
||||||
gradientTransform="matrix(0.545166,0,0,0.544959,0.186963,35.29511)"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
id="linearGradient1335-4"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
inkscape:collect="always" />
|
|
||||||
<linearGradient
|
|
||||||
id="linearGradient2289-4">
|
|
||||||
<stop
|
|
||||||
id="stop2291-0"
|
|
||||||
offset="0"
|
|
||||||
style="stop-color:#ff2600;stop-opacity:1;" />
|
|
||||||
<stop
|
|
||||||
id="stop2293-9"
|
|
||||||
offset="1"
|
|
||||||
style="stop-color:#ffd600;stop-opacity:1;" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
id="linearGradient3133"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.51445624,0,0,0.53856587,7.3477348,6.9450134)"
|
|
||||||
x1="46.881573"
|
|
||||||
y1="91.824585"
|
|
||||||
x2="47.225189"
|
|
||||||
y2="1.5596932" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient2289-4"
|
|
||||||
id="linearGradient3136"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.51445624,0,0,0.53856587,-120.3871,-29.360443)"
|
|
||||||
x1="16.88862"
|
|
||||||
y1="77.796608"
|
|
||||||
x2="72.348671"
|
|
||||||
y2="20.59322" />
|
|
||||||
<filter
|
|
||||||
id="filter3138"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3140"
|
|
||||||
flood-opacity="0.33"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3142"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3144"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="2"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3146"
|
|
||||||
dx="4"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3148"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<filter
|
|
||||||
id="filter3670"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3672"
|
|
||||||
flood-opacity="0.2"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3674"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3676"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="1.5"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3678"
|
|
||||||
dx="0"
|
|
||||||
dy="4"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3680"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="fbSourceGraphic" />
|
|
||||||
<feColorMatrix
|
|
||||||
result="fbSourceGraphicAlpha"
|
|
||||||
in="fbSourceGraphic"
|
|
||||||
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
|
|
||||||
id="feColorMatrix3682" />
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3684"
|
|
||||||
flood-opacity="0.2"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood"
|
|
||||||
in="fbSourceGraphic" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3686"
|
|
||||||
in2="fbSourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3688"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="1.5"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3690"
|
|
||||||
dx="0"
|
|
||||||
dy="2"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3692"
|
|
||||||
in2="offset"
|
|
||||||
in="fbSourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="fbSourceGraphic" />
|
|
||||||
<feColorMatrix
|
|
||||||
result="fbSourceGraphicAlpha"
|
|
||||||
in="fbSourceGraphic"
|
|
||||||
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
|
|
||||||
id="feColorMatrix3706" />
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3708"
|
|
||||||
flood-opacity="0.2"
|
|
||||||
flood-color="rgb(255,255,255)"
|
|
||||||
result="flood"
|
|
||||||
in="fbSourceGraphic" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3710"
|
|
||||||
in2="fbSourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3712"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="1"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3714"
|
|
||||||
dx="0"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3716"
|
|
||||||
in2="offset"
|
|
||||||
in="fbSourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="fbSourceGraphic" />
|
|
||||||
<feColorMatrix
|
|
||||||
result="fbSourceGraphicAlpha"
|
|
||||||
in="fbSourceGraphic"
|
|
||||||
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
|
|
||||||
id="feColorMatrix3123" />
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3125"
|
|
||||||
flood-opacity="0.2"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood"
|
|
||||||
in="fbSourceGraphic" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3127"
|
|
||||||
in2="fbSourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3129"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="1"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3131"
|
|
||||||
dx="0"
|
|
||||||
dy="2"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3133"
|
|
||||||
in2="offset"
|
|
||||||
in="fbSourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<filter
|
|
||||||
id="filter3135"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3137"
|
|
||||||
flood-opacity="0.2"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3139"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3141"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="1"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3143"
|
|
||||||
dx="0"
|
|
||||||
dy="1"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3145"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
<filter
|
|
||||||
id="filter3183"
|
|
||||||
style="color-interpolation-filters:sRGB;"
|
|
||||||
inkscape:label="Drop Shadow">
|
|
||||||
<feFlood
|
|
||||||
id="feFlood3185"
|
|
||||||
flood-opacity="0.3"
|
|
||||||
flood-color="rgb(0,0,0)"
|
|
||||||
result="flood" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3187"
|
|
||||||
in2="SourceGraphic"
|
|
||||||
in="flood"
|
|
||||||
operator="in"
|
|
||||||
result="composite1" />
|
|
||||||
<feGaussianBlur
|
|
||||||
id="feGaussianBlur3189"
|
|
||||||
in="composite"
|
|
||||||
stdDeviation="2"
|
|
||||||
result="blur" />
|
|
||||||
<feOffset
|
|
||||||
id="feOffset3191"
|
|
||||||
dx="0"
|
|
||||||
dy="2"
|
|
||||||
result="offset" />
|
|
||||||
<feComposite
|
|
||||||
id="feComposite3193"
|
|
||||||
in2="offset"
|
|
||||||
in="SourceGraphic"
|
|
||||||
operator="over"
|
|
||||||
result="composite2" />
|
|
||||||
</filter>
|
|
||||||
</defs>
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:zoom="7.9999999"
|
|
||||||
inkscape:cx="60.761203"
|
|
||||||
inkscape:cy="36.086679"
|
|
||||||
inkscape:document-units="px"
|
|
||||||
inkscape:current-layer="layer1"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:window-width="1270"
|
|
||||||
inkscape:window-height="837"
|
|
||||||
inkscape:window-x="287"
|
|
||||||
inkscape:window-y="27"
|
|
||||||
showguides="true"
|
|
||||||
inkscape:guide-bbox="true"
|
|
||||||
inkscape:window-maximized="0">
|
|
||||||
<inkscape:grid
|
|
||||||
type="xygrid"
|
|
||||||
id="grid3001" />
|
|
||||||
</sodipodi:namedview>
|
|
||||||
<metadata
|
|
||||||
id="metadata7">
|
|
||||||
<rdf:RDF>
|
<rdf:RDF>
|
||||||
<cc:Work
|
<cc:Work>
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:type
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title />
|
|
||||||
<dc:creator>
|
<dc:creator>
|
||||||
<cc:Agent>
|
<cc:Agent>
|
||||||
<dc:title>Guglielmi David</dc:title>
|
<dc:title>Guglielmi David</dc:title>
|
||||||
</cc:Agent>
|
</cc:Agent>
|
||||||
</dc:creator>
|
</dc:creator>
|
||||||
<cc:license
|
<cc:license rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
|
||||||
rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
|
|
||||||
<dc:rights>
|
<dc:rights>
|
||||||
<cc:Agent>
|
<cc:Agent>
|
||||||
<dc:title>Peter Zelezny</dc:title>
|
<dc:title>Peter Zelezny</dc:title>
|
||||||
</cc:Agent>
|
</cc:Agent>
|
||||||
</dc:rights>
|
</dc:rights>
|
||||||
|
<dc:contributor>
|
||||||
|
<cc:Agent>
|
||||||
|
<dc:title>Samuel Messner</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:contributor>
|
||||||
</cc:Work>
|
</cc:Work>
|
||||||
<cc:License
|
<cc:License rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
|
||||||
rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
|
<cc:requires rdf:resource="http://web.resource.org/cc/Notice" />
|
||||||
<cc:permits
|
<cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
|
||||||
rdf:resource="http://web.resource.org/cc/Reproduction" />
|
<cc:requires rdf:resource="http://web.resource.org/cc/SourceCode" />
|
||||||
<cc:permits
|
<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" />
|
||||||
rdf:resource="http://web.resource.org/cc/Distribution" />
|
<cc:permits rdf:resource="http://web.resource.org/cc/Distribution" />
|
||||||
<cc:requires
|
<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
|
||||||
rdf:resource="http://web.resource.org/cc/Notice" />
|
|
||||||
<cc:permits
|
|
||||||
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
|
|
||||||
<cc:requires
|
|
||||||
rdf:resource="http://web.resource.org/cc/ShareAlike" />
|
|
||||||
<cc:requires
|
|
||||||
rdf:resource="http://web.resource.org/cc/SourceCode" />
|
|
||||||
</cc:License>
|
</cc:License>
|
||||||
</rdf:RDF>
|
</rdf:RDF>
|
||||||
</metadata>
|
</metadata>
|
||||||
<g
|
<defs>
|
||||||
inkscape:label="Calque 1"
|
<linearGradient id="hexchatGradient" x1="0" y1="0" x2="0" y2="1">
|
||||||
inkscape:groupmode="layer"
|
<stop id="hgYellowStop" offset="0" style="stop-color: #FFD600" />
|
||||||
id="layer1">
|
<stop id="hgRedStop" offset="1" style="stop-color: #FF2600" />
|
||||||
<g
|
</linearGradient>
|
||||||
id="g3663"
|
</defs>
|
||||||
style="filter:url(#filter3183)">
|
<use xlink:href="#outline" style="opacity:0.15" transform="translate(0,2)" id="shadow" />
|
||||||
<path
|
<path
|
||||||
style="fill:#000000;fill-opacity:1;"
|
style="fill:#000000; fill-opacity: 1;"
|
||||||
d="m 31.404792,8.7464684 c -6.271873,0.05843 -12.553,0.431777 -13.735377,1.075609 C 15.304661,11.109737 4.1505773,29.32852 4.1783444,31.859522 c 0.02777,2.531005 11.5871596,20.543967 13.9796816,21.787309 2.392519,1.243342 25.106,1.037521 27.470753,-0.250141 C 47.993531,52.109028 59.147618,33.890246 59.119851,31.359242 59.092081,28.828238 47.532689,10.790262 45.140167,9.5469214 43.943907,8.9252504 37.676665,8.6880384 31.404792,8.7464684 z m 0.05429,4.5275596 c 4.90437,-0.047 9.786849,0.175368 10.722281,0.67538 1.870861,1.000021 10.917726,15.499216 10.939439,17.534904 C 53.142512,33.52 44.410541,48.158649 42.561393,49.194315 40.712245,50.229983 22.960549,50.419464 21.089689,49.419444 19.218826,48.419423 10.199106,33.920226 10.177392,31.884537 10.155682,29.84885 18.860508,15.185189 20.709656,14.14952 c 0.924575,-0.517833 5.845056,-0.828498 10.749425,-0.875492 z"
|
d="M 31.71875,4.1088109 C 24.433462,4.1801109 17.123427,4.6356469 15.75,5.4213109 13.003148,6.9926379 0.06149557,29.207739 0.09374996,32.296311 0.12600597,35.384884 13.564642,57.372816 16.34375,58.890061 19.122855,60.407306 45.503149,60.148888 48.25,58.577561 50.996852,57.006233 63.938504,34.791133 63.90625,31.702561 63.87399,28.613989 50.466608,6.5948049 47.6875,5.0775609 46.297948,4.3189379 39.004037,4.0375089 31.71875,4.1088109 Z m -0.1875,9.2500001 c 3.386631,-0.03246 6.676687,0.05409 8.75,0.28125 l -8.71875,9.71875 -9.0625,-9.5 c 2.055746,-0.283043 5.521157,-0.466366 9.03125,-0.5 z m 17.34375,9.84375 c 2.298293,3.744897 4.302354,7.392556 4.3125,8.34375 0.01126,1.055883 -2.358157,5.507241 -4.875,9.6875 l -9.03125,-8.03125 z m -34.46875,0.25 8.75,9.75 -8.1875,7.875 c -2.482342,-3.992634 -4.707927,-8.110307 -4.71875,-9.125 -0.01021,-0.95736 1.927117,-4.687748 4.15625,-8.5 z m 17.15625,16.90625 9.8125,9.21875 c -4.111037,0.67314 -16.108253,0.781873 -19.46875,0.125 z"
|
||||||
id="path4107"
|
id="outline" />
|
||||||
inkscape:connector-curvature="0" />
|
<path
|
||||||
<path
|
style="fill:url(#hexchatGradient); fill-opacity: 1;"
|
||||||
transform="matrix(0.97890109,0,0,0.98965389,0.52623659,-1.3159842)"
|
d="m 31.34375,6.1713109 c -6.857093,0.06521 -13.707297,0.469014 -15,1.1875 C 13.758345,8.7957819 1.5633917,29.128076 1.5937497,31.952561 c 0.03036,2.824486 12.6654863,22.924987 15.2812503,24.3125 2.615763,1.387513 27.445846,1.186972 30.03125,-0.25 2.585405,-1.436972 14.780359,-21.769265 14.75,-24.59375 C 61.62589,28.596826 48.990764,8.4650729 46.375,7.0775609 45.067119,6.3838039 38.200842,6.1061049 31.34375,6.1713109 Z m 0.0625,5.0625001 c 5.36199,-0.05245 10.696035,0.19201 11.71875,0.75 0.06132,0.03346 0.143803,0.127745 0.21875,0.1875 l -11.28125,12.59375 -0.5,0.53125 -0.46875,-0.53125 -11.75,-12.3125 c 0.10903,-0.09884 0.228263,-0.201843 0.3125,-0.25 1.010846,-0.577879 6.38801,-0.916306 11.75,-0.96875 z m 18.0625,9.46875 c 2.883844,4.661341 5.612556,9.652893 5.625,10.84375 0.01348,1.290331 -3.064699,7.087557 -6.09375,12.09375 l -11.09375,-9.90625 -0.53125,-0.46875 0.5,-0.46875 11.59375,-12.09375 z m -35.78125,0.03125 10.84375,12.0625 0.4375,0.46875 -0.46875,0.4375 -10.28125,9.90625 c -3.04689,-4.86606 -6.0493623,-10.36778 -6.0625003,-11.625 -0.01271,-1.216102 2.6892393,-6.451996 5.5312503,-11.25 z m 17.875,17.78125 0.4375,0.4375 12.34375,11.59375 c -0.318014,0.365376 -0.587006,0.638955 -0.78125,0.75 -2.02169,1.155758 -21.423322,1.397228 -23.46875,0.28125 -0.228202,-0.124506 -0.601742,-0.47821 -1,-0.9375 l 12,-11.6875 0.46875,-0.4375 z"
|
||||||
style="fill:#000000;fill-opacity:1;"
|
id="coloredX" />
|
||||||
d="M 31.801142,5.3887159 C 24.358829,5.4607629 16.905535,5.9211193 15.502506,6.7149966 12.696449,8.3027513 -0.53918189,30.767467 -0.50623228,33.888328 -0.47328049,37.00919 13.243292,59.220118 16.0823,60.753225 18.921305,62.286332 45.873514,62.032541 48.67957,60.444787 51.485627,58.857032 64.721258,36.392315 64.688309,33.271454 64.655357,30.150593 50.938784,7.9088218 48.099776,6.3757155 46.680274,5.6091623 39.243454,5.3166688 31.801142,5.3887159 z m 0.06442,5.5827171 c 5.81961,-0.05795 11.613244,0.216241 12.723243,0.83278 2.219996,1.233079 12.955163,19.111349 12.980929,21.621461 0.02577,2.51011 -10.335747,20.560333 -12.529979,21.837366 -2.19423,1.277031 -23.2587,1.510671 -25.478697,0.277592 C 17.341063,54.307554 6.638107,36.429283 6.6123418,33.919173 6.5865755,31.409062 16.915878,13.327995 19.110109,12.050964 20.207224,11.412447 26.045952,11.02938 31.865563,10.971433 z"
|
|
||||||
id="path4103"
|
|
||||||
inkscape:connector-curvature="0" />
|
|
||||||
<path
|
|
||||||
inkscape:transform-center-y="2.25"
|
|
||||||
inkscape:transform-center-x="2.25"
|
|
||||||
style="fill:url(#linearGradient3133);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.31593215000000008;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;"
|
|
||||||
d="m 10.723737,18.285684 7.623916,-7.935243 13.238019,13.886676 12.492701,-13.886676 8.576909,7.935243 -14.294847,14.878584 13.341856,11.902864 -6.670928,6.94334 L 31.585672,39.351071 18.573785,52.010472 11.676724,45.086347 24.065591,33.164268 10.723737,18.285684 z"
|
|
||||||
id="path2297"
|
|
||||||
sodipodi:nodetypes="ccccccccccccc"
|
|
||||||
inkscape:connector-curvature="0" />
|
|
||||||
<path
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
id="path3305"
|
|
||||||
d="M 31.293607,6.0952825 C 24.436514,6.1604875 17.569304,6.5771256 16.276601,7.2956116 13.691196,8.7325834 1.4963386,29.063913 1.5266972,31.888398 1.5570579,34.712884 14.195039,54.814527 16.810803,56.20204 19.426566,57.589553 44.25941,57.359866 46.844814,55.922894 49.430219,54.485922 61.625078,34.154591 61.594719,31.330106 61.564358,28.505621 48.926376,8.3760634 46.310612,6.9885506 45.002731,6.294794 38.150699,6.0300774 31.293607,6.0952825 z m 0.05936,5.0525485 c 5.36199,-0.05245 10.700046,0.195704 11.722761,0.753694 2.045429,1.115978 11.936445,17.296419 11.960184,19.568154 0.02374,2.271736 -9.523004,18.6078 -11.544693,19.763557 -2.02169,1.155758 -21.429773,1.36721 -23.475201,0.251232 C 17.970585,50.368491 8.1092472,34.188049 8.085508,31.916313 8.061768,29.644577 17.578834,13.2806 19.600523,12.124842 c 1.010846,-0.577879 6.39045,-0.924567 11.75244,-0.977011 z"
|
|
||||||
style="fill:url(#linearGradient4101);fill-opacity:1;" />
|
|
||||||
<path
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
id="path3077"
|
|
||||||
d="M 14.640198,55.682743 C 9.6971439,47.360612 2.8950957,35.733851 2.9419881,35.686959 c 0.031272,-0.03127 0.5023581,0.289334 1.0468575,0.712459 0.5444994,0.423125 1.0414462,0.769317 1.1043264,0.769317 0.06288,0 2.6329414,4.276521 5.711247,9.50338 l 5.59692,9.503379 2.159128,0.007 2.159126,0.007 -0.34365,-0.584653 C 20.186937,55.28323 17.303514,50.518786 13.968339,45.017137 10.633164,39.515488 7.9043842,34.929294 7.9043842,34.825595 c 0,-0.103699 0.2455542,-0.59277 0.545676,-1.086823 0.3001218,-0.494053 0.545676,-0.941721 0.545676,-0.994816 0,-0.05309 -0.2788317,-0.09654 -0.619626,-0.09654 -0.8505388,0 -1.0953557,-0.488405 -1.0953557,-2.185211 0,-1.90734 -0.048411,-1.868066 2.30512,-1.870072 l 1.9823345,-0.0017 1.052375,-1.721616 c 0.578806,-0.94689 1.052375,-1.785869 1.052375,-1.8644 0,-0.07853 -0.829918,-0.162484 -1.844262,-0.186561 l -1.8442631,-0.04378 4.4809551,-7.327649 4.480953,-7.32765 12.466741,-0.0399 12.466738,-0.0399 0.517892,0.854518 0.517892,0.854518 2.335995,0.04287 2.335994,0.04287 2.742626,4.521316 c 1.508447,2.486723 4.136212,6.819001 5.839482,9.627283 1.703268,2.808283 3.157599,5.105969 3.231846,5.105969 0.256907,0 0.13186,-0.393635 -0.411085,-1.294044 -0.299901,-0.497351 -0.545275,-0.935841 -0.545275,-0.974422 0,-0.03858 0.310833,-0.07015 0.69074,-0.07015 0.575204,0 0.699074,-0.05324 0.740561,-0.318272 0.03599,-0.229934 0.273254,0.06215 0.854835,1.052375 0.702767,1.196557 0.780303,1.410253 0.610448,1.682462 -0.107012,0.171499 -0.377881,0.627528 -0.601929,1.013399 l -0.407361,0.701583 0.533953,0.857491 c 0.293674,0.47162 0.535536,0.950306 0.537472,1.063747 0.0019,0.113441 -3.098537,5.322698 -6.889942,11.576127 l -6.893462,11.36987 -16.876654,0 -16.876655,0 -1.226996,-2.065773 z"
|
|
||||||
style="fill:none;" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 2.1 KiB |
@@ -26,4 +26,6 @@ uninstall-hook:
|
|||||||
$(UPDATE_MIME_DATABASE);
|
$(UPDATE_MIME_DATABASE);
|
||||||
$(UPDATE_DESKTOP_DATABASE);
|
$(UPDATE_DESKTOP_DATABASE);
|
||||||
|
|
||||||
|
EXTRA_DIST = hexchat.appdata.xml.in hexchat.desktop.in htm.desktop.in htm-mime.xml
|
||||||
|
|
||||||
CLEANFILES = $(appdata_DATA) $(data_desktop_DATA)
|
CLEANFILES = $(appdata_DATA) $(data_desktop_DATA)
|
||||||
|
60
m4/ac-check-cflags.m4
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
dnl Macros to check the presence of generic (non-typed) symbols.
|
||||||
|
dnl Copyright (c) 2006-2008 Diego Pettenò <flameeyes@gmail.com>
|
||||||
|
dnl Copyright (c) 2006-2008 xine project
|
||||||
|
dnl Copyright (c) 2012 Lucas De Marchi <lucas.de.marchi@gmail.com>
|
||||||
|
dnl
|
||||||
|
dnl This program is free software; you can redistribute it and/or modify
|
||||||
|
dnl it under the terms of the GNU General Public License as published by
|
||||||
|
dnl the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
dnl any later version.
|
||||||
|
dnl
|
||||||
|
dnl This program is distributed in the hope that it will be useful,
|
||||||
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
dnl GNU General Public License for more details.
|
||||||
|
dnl
|
||||||
|
dnl You should have received a copy of the GNU General Public License
|
||||||
|
dnl along with this program; if not, write to the Free Software
|
||||||
|
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
dnl 02110-1301, USA.
|
||||||
|
dnl
|
||||||
|
dnl As a special exception, the copyright owners of the
|
||||||
|
dnl macro gives unlimited permission to copy, distribute and modify the
|
||||||
|
dnl configure scripts that are the output of Autoconf when processing the
|
||||||
|
dnl Macro. You need not follow the terms of the GNU General Public
|
||||||
|
dnl License when using or distributing such scripts, even though portions
|
||||||
|
dnl of the text of the Macro appear in them. The GNU General Public
|
||||||
|
dnl License (GPL) does govern all other use of the material that
|
||||||
|
dnl constitutes the Autoconf Macro.
|
||||||
|
dnl
|
||||||
|
dnl This special exception to the GPL applies to versions of the
|
||||||
|
dnl Autoconf Macro released by this project. When you make and
|
||||||
|
dnl distribute a modified version of the Autoconf Macro, you may extend
|
||||||
|
dnl this special exception to the GPL to apply to your modified version as
|
||||||
|
dnl well.
|
||||||
|
|
||||||
|
dnl Check if FLAG in ENV-VAR is supported by compiler and append it
|
||||||
|
dnl to WHERE-TO-APPEND variable
|
||||||
|
dnl CC_CHECK_FLAG_APPEND([WHERE-TO-APPEND], [ENV-VAR], [FLAG])
|
||||||
|
|
||||||
|
AC_DEFUN([CC_CHECK_FLAG_APPEND], [
|
||||||
|
AC_CACHE_CHECK([if $CC supports flag $3 in envvar $2],
|
||||||
|
AS_TR_SH([cc_cv_$2_$3]),
|
||||||
|
[eval "AS_TR_SH([cc_save_$2])='${$2}'"
|
||||||
|
eval "AS_TR_SH([$2])='$3'"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([int a = 0; int main(void) { return a; } ])],
|
||||||
|
[eval "AS_TR_SH([cc_cv_$2_$3])='yes'"],
|
||||||
|
[eval "AS_TR_SH([cc_cv_$2_$3])='no'"])
|
||||||
|
eval "AS_TR_SH([$2])='$cc_save_$2'"])
|
||||||
|
|
||||||
|
AS_IF([eval test x$]AS_TR_SH([cc_cv_$2_$3])[ = xyes],
|
||||||
|
[eval "$1='${$1} $3'"])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl CC_CHECK_FLAGS_APPEND([WHERE-TO-APPEND], [ENV-VAR], [FLAG1 FLAG2])
|
||||||
|
AC_DEFUN([CC_CHECK_FLAGS_APPEND], [
|
||||||
|
for flag in $3; do
|
||||||
|
CC_CHECK_FLAG_APPEND($1, $2, $flag)
|
||||||
|
done
|
||||||
|
])
|
||||||
|
|
124
m4/ax_check_enable_debug.m4
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_check_enable_debug.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_CHECK_ENABLE_DEBUG([enable by default=yes/info/profile/no], [ENABLE DEBUG VARIABLES ...], [DISABLE DEBUG VARIABLES NDEBUG ...], [IS-RELEASE])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Check for the presence of an --enable-debug option to configure, with
|
||||||
|
# the specified default value used when the option is not present. Return
|
||||||
|
# the value in the variable $ax_enable_debug.
|
||||||
|
#
|
||||||
|
# Specifying 'yes' adds '-g -O0' to the compilation flags for all
|
||||||
|
# languages. Specifying 'info' adds '-g' to the compilation flags.
|
||||||
|
# Specifying 'profile' adds '-g -pg' to the compilation flags and '-pg' to
|
||||||
|
# the linking flags. Otherwise, nothing is added.
|
||||||
|
#
|
||||||
|
# Define the variables listed in the second argument if debug is enabled,
|
||||||
|
# defaulting to no variables. Defines the variables listed in the third
|
||||||
|
# argument if debug is disabled, defaulting to NDEBUG. All lists of
|
||||||
|
# variables should be space-separated.
|
||||||
|
#
|
||||||
|
# If debug is not enabled, ensure AC_PROG_* will not add debugging flags.
|
||||||
|
# Should be invoked prior to any AC_PROG_* compiler checks.
|
||||||
|
#
|
||||||
|
# IS-RELEASE can be used to change the default to 'no' when making a
|
||||||
|
# release. Set IS-RELEASE to 'yes' or 'no' as appropriate. By default, it
|
||||||
|
# uses the value of $ax_is_release, so if you are using the AX_IS_RELEASE
|
||||||
|
# macro, there is no need to pass this parameter.
|
||||||
|
#
|
||||||
|
# AX_IS_RELEASE([git-directory])
|
||||||
|
# AX_CHECK_ENABLE_DEBUG()
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2011 Rhys Ulerich <rhys.ulerich@gmail.com>
|
||||||
|
# Copyright (c) 2014, 2015 Philip Withnall <philip@tecnocode.co.uk>
|
||||||
|
#
|
||||||
|
# Copying and distribution of this file, with or without modification, are
|
||||||
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
|
# and this notice are preserved.
|
||||||
|
|
||||||
|
#serial 5
|
||||||
|
|
||||||
|
AC_DEFUN([AX_CHECK_ENABLE_DEBUG],[
|
||||||
|
AC_BEFORE([$0],[AC_PROG_CC])dnl
|
||||||
|
AC_BEFORE([$0],[AC_PROG_CXX])dnl
|
||||||
|
AC_BEFORE([$0],[AC_PROG_F77])dnl
|
||||||
|
AC_BEFORE([$0],[AC_PROG_FC])dnl
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(whether to enable debugging)
|
||||||
|
|
||||||
|
ax_enable_debug_default=m4_tolower(m4_normalize(ifelse([$1],,[no],[$1])))
|
||||||
|
ax_enable_debug_is_release=m4_tolower(m4_normalize(ifelse([$4],,
|
||||||
|
[$ax_is_release],
|
||||||
|
[$4])))
|
||||||
|
|
||||||
|
# If this is a release, override the default.
|
||||||
|
AS_IF([test "$ax_enable_debug_is_release" = "yes"],
|
||||||
|
[ax_enable_debug_default="no"])
|
||||||
|
|
||||||
|
m4_define(ax_enable_debug_vars,[m4_normalize(ifelse([$2],,,[$2]))])
|
||||||
|
m4_define(ax_disable_debug_vars,[m4_normalize(ifelse([$3],,[NDEBUG],[$3]))])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(debug,
|
||||||
|
[AS_HELP_STRING([--enable-debug=]@<:@yes/info/profile/no@:>@,[compile with debugging])],
|
||||||
|
[],enable_debug=$ax_enable_debug_default)
|
||||||
|
|
||||||
|
# empty mean debug yes
|
||||||
|
AS_IF([test "x$enable_debug" = "x"],
|
||||||
|
[enable_debug="yes"])
|
||||||
|
|
||||||
|
# case of debug
|
||||||
|
AS_CASE([$enable_debug],
|
||||||
|
[yes],[
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
CFLAGS="${CFLAGS} -g -O0"
|
||||||
|
CXXFLAGS="${CXXFLAGS} -g -O0"
|
||||||
|
FFLAGS="${FFLAGS} -g -O0"
|
||||||
|
FCFLAGS="${FCFLAGS} -g -O0"
|
||||||
|
OBJCFLAGS="${OBJCFLAGS} -g -O0"
|
||||||
|
],
|
||||||
|
[info],[
|
||||||
|
AC_MSG_RESULT(info)
|
||||||
|
CFLAGS="${CFLAGS} -g"
|
||||||
|
CXXFLAGS="${CXXFLAGS} -g"
|
||||||
|
FFLAGS="${FFLAGS} -g"
|
||||||
|
FCFLAGS="${FCFLAGS} -g"
|
||||||
|
OBJCFLAGS="${OBJCFLAGS} -g"
|
||||||
|
],
|
||||||
|
[profile],[
|
||||||
|
AC_MSG_RESULT(profile)
|
||||||
|
CFLAGS="${CFLAGS} -g -pg"
|
||||||
|
CXXFLAGS="${CXXFLAGS} -g -pg"
|
||||||
|
FFLAGS="${FFLAGS} -g -pg"
|
||||||
|
FCFLAGS="${FCFLAGS} -g -pg"
|
||||||
|
OBJCFLAGS="${OBJCFLAGS} -g -pg"
|
||||||
|
LDFLAGS="${LDFLAGS} -pg"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
dnl Ensure AC_PROG_CC/CXX/F77/FC/OBJC will not enable debug flags
|
||||||
|
dnl by setting any unset environment flag variables
|
||||||
|
AS_IF([test "x${CFLAGS+set}" != "xset"],
|
||||||
|
[CFLAGS=""])
|
||||||
|
AS_IF([test "x${CXXFLAGS+set}" != "xset"],
|
||||||
|
[CXXFLAGS=""])
|
||||||
|
AS_IF([test "x${FFLAGS+set}" != "xset"],
|
||||||
|
[FFLAGS=""])
|
||||||
|
AS_IF([test "x${FCFLAGS+set}" != "xset"],
|
||||||
|
[FCFLAGS=""])
|
||||||
|
AS_IF([test "x${OBJCFLAGS+set}" != "xset"],
|
||||||
|
[OBJCFLAGS=""])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl Define various variables if debugging is disabled.
|
||||||
|
dnl assert.h is a NOP if NDEBUG is defined, so define it by default.
|
||||||
|
AS_IF([test "x$enable_debug" = "xyes"],
|
||||||
|
[m4_map_args_w(ax_enable_debug_vars, [AC_DEFINE(], [,,[Define if debugging is enabled])])],
|
||||||
|
[m4_map_args_w(ax_disable_debug_vars, [AC_DEFINE(], [,,[Define if debugging is disabled])])])
|
||||||
|
ax_enable_debug=$enable_debug
|
||||||
|
])
|
69
m4/ax_is_release.m4
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_is_release.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_IS_RELEASE(POLICY)
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Determine whether the code is being configured as a release, or from
|
||||||
|
# git. Set the ax_is_release variable to 'yes' or 'no'.
|
||||||
|
#
|
||||||
|
# If building a release version, it is recommended that the configure
|
||||||
|
# script disable compiler errors and debug features, by conditionalising
|
||||||
|
# them on the ax_is_release variable. If building from git, these
|
||||||
|
# features should be enabled.
|
||||||
|
#
|
||||||
|
# The POLICY parameter specifies how ax_is_release is determined. It can
|
||||||
|
# take the following values:
|
||||||
|
#
|
||||||
|
# * git-directory: ax_is_release will be 'no' if a '.git' directory exists
|
||||||
|
# * minor-version: ax_is_release will be 'no' if the minor version number
|
||||||
|
# in $PACKAGE_VERSION is odd; this assumes
|
||||||
|
# $PACKAGE_VERSION follows the 'major.minor.micro' scheme
|
||||||
|
# * micro-version: ax_is_release will be 'no' if the micro version number
|
||||||
|
# in $PACKAGE_VERSION is odd; this assumes
|
||||||
|
# $PACKAGE_VERSION follows the 'major.minor.micro' scheme
|
||||||
|
# * always: ax_is_release will always be 'yes'
|
||||||
|
# * never: ax_is_release will always be 'no'
|
||||||
|
#
|
||||||
|
# Other policies may be added in future.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2015 Philip Withnall <philip@tecnocode.co.uk>
|
||||||
|
#
|
||||||
|
# Copying and distribution of this file, with or without modification, are
|
||||||
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
|
# and this notice are preserved.
|
||||||
|
|
||||||
|
#serial 3
|
||||||
|
|
||||||
|
AC_DEFUN([AX_IS_RELEASE],[
|
||||||
|
AC_BEFORE([AC_INIT],[$0])
|
||||||
|
|
||||||
|
m4_case([$1],
|
||||||
|
[git-directory],[
|
||||||
|
# $is_release = (.git directory does not exist)
|
||||||
|
AS_IF([test -d .git],[ax_is_release=no],[ax_is_release=yes])
|
||||||
|
],
|
||||||
|
[minor-version],[
|
||||||
|
# $is_release = ($minor_version is even)
|
||||||
|
minor_version=`echo "$PACKAGE_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
|
||||||
|
AS_IF([test "$(( $minor_version % 2 ))" -ne 0],
|
||||||
|
[ax_is_release=no],[ax_is_release=yes])
|
||||||
|
],
|
||||||
|
[micro-version],[
|
||||||
|
# $is_release = ($micro_version is even)
|
||||||
|
micro_version=`echo "$PACKAGE_VERSION" | sed 's/[[^.]]*\.[[^.]]*\.\([[^.]]*\).*/\1/'`
|
||||||
|
AS_IF([test "$(( $micro_version % 2 ))" -ne 0],
|
||||||
|
[ax_is_release=no],[ax_is_release=yes])
|
||||||
|
],
|
||||||
|
[always],[ax_is_release=yes],
|
||||||
|
[never],[ax_is_release=no],
|
||||||
|
[
|
||||||
|
AC_MSG_ERROR([Invalid policy. Valid policies: git-directory, minor-version.])
|
||||||
|
])
|
||||||
|
])
|
116
m4/ax_perl_ext_flags.m4
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_perl_ext_flags.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_PERL_EXT_FLAGS([CFLAGS-VARIABLE], [LDFLAGS-VARIABLE], [EXTRA-MODULES])
|
||||||
|
# AX_PERL_EXT_CFLAGS([CFLAGS-VARIABLE])
|
||||||
|
# AX_PERL_EXT_LDFLAGS([LDFLAGS-VARIABLE], [EXTRA-MODULES])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Fetches the linker flags and C compiler flags for compiling and linking
|
||||||
|
# programs that embed a Perl interpreter. If the EXTRA-MODULES argument is
|
||||||
|
# submitted, it is a space separated list of extra modules to link. The
|
||||||
|
# flags will be stored in the provided variables.
|
||||||
|
#
|
||||||
|
# Examples:
|
||||||
|
#
|
||||||
|
# AX_PERL_EXT_FLAGS([PERLXS_CFLAGS], [PERLXS_LDFLAGS])
|
||||||
|
# AC_SUBST([PERLXS_CFLAGS])
|
||||||
|
# AC_SUBST([PERLXS_LDFLAGS])
|
||||||
|
#
|
||||||
|
# AX_PERL_EXT_CFLAGS([PERLXS_CFLAGS])
|
||||||
|
# AC_SUBST([PERLXS_CFLAGS])
|
||||||
|
#
|
||||||
|
# AX_PERL_EXT_LDFLAGS([PERLXS_LDFLAGS], [-std Socket])
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2009 Mats Kindahl of Sun Microsystems <mats@sun.com>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are
|
||||||
|
# met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
#
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
#
|
||||||
|
# 3. The name of the author may not be used to endorse or promote products
|
||||||
|
# derived from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||||
|
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
#serial 5
|
||||||
|
|
||||||
|
AC_DEFUN([AX_PERL_EXT_CFLAGS],
|
||||||
|
[AC_CHECK_PROG(PERL,perl,perl)
|
||||||
|
_AX_PERL_EXT_MODULE_CHECK([ExtUtils::Embed], [have_embed=yes],
|
||||||
|
[have_embed=no])
|
||||||
|
AS_IF([test $have_embed = no],
|
||||||
|
AC_MSG_ERROR([Require ExtUtils::Embed to proceed]))
|
||||||
|
_AX_PERL_EXT_EMBED_CHECK([$1],[ccopts])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
AC_DEFUN([AX_PERL_EXT_LDFLAGS],
|
||||||
|
[AC_CHECK_PROG(PERL,perl,perl)
|
||||||
|
_AX_PERL_EXT_MODULE_CHECK([ExtUtils::Embed], [have_embed=yes],
|
||||||
|
[have_embed=no])
|
||||||
|
AS_IF([test $have_embed = no],
|
||||||
|
AC_MSG_ERROR([Require ExtUtils::Embed to proceed]))
|
||||||
|
_AX_PERL_EXT_EMBED_CHECK([$1],[ldopts],[$2])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
AC_DEFUN([AX_PERL_EXT_FLAGS],
|
||||||
|
[AC_CHECK_PROG(PERL,perl,perl)
|
||||||
|
_AX_PERL_EXT_MODULE_CHECK([ExtUtils::Embed], [have_embed=yes],
|
||||||
|
[have_embed=no])
|
||||||
|
AS_IF([test $have_embed = no],
|
||||||
|
AC_MSG_ERROR([Require ExtUtils::Embed to proceed]))
|
||||||
|
_AX_PERL_EXT_EMBED_CHECK([$1],[ccopts])
|
||||||
|
_AX_PERL_EXT_EMBED_CHECK([$2],[ldopts],[$3])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl _AX_PERL_EXT_MODULE_CHECK(MODULE-NAME, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
|
||||||
|
dnl
|
||||||
|
dnl Check for the existance of the perl module given by MODULE-NAME.
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([_AX_PERL_EXT_MODULE_CHECK],
|
||||||
|
[AC_MSG_CHECKING([for perl module $1])
|
||||||
|
$PERL "-M$1" -e exit > /dev/null 2>&1
|
||||||
|
AS_IF([test $? -eq 0],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
$2],
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
$3])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl _AX_PERL_EXT_EMBED_CHECK(VARIABLE, COMMAND, [EXTRA-FLAGS]) Use
|
||||||
|
dnl
|
||||||
|
dnl ExtUtils::Embed fetch flags for embedding Perl in a C/C++
|
||||||
|
dnl application
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([_AX_PERL_EXT_EMBED_CHECK],
|
||||||
|
[AC_MSG_CHECKING([for perl $2 embed flags])
|
||||||
|
ax_c_perlxs_extras="$3"
|
||||||
|
$1=`$PERL -MExtUtils::Embed -e $2 ${ax_c_perlxs_extras:+"-- $3"}`
|
||||||
|
AC_MSG_RESULT($$1)
|
||||||
|
])
|
327
m4/ax_python_devel.m4
Normal file
@@ -0,0 +1,327 @@
|
|||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_python_devel.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_PYTHON_DEVEL([version])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Note: Defines as a precious variable "PYTHON_VERSION". Don't override it
|
||||||
|
# in your configure.ac.
|
||||||
|
#
|
||||||
|
# This macro checks for Python and tries to get the include path to
|
||||||
|
# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LIBS) output
|
||||||
|
# variables. It also exports $(PYTHON_EXTRA_LIBS) and
|
||||||
|
# $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code.
|
||||||
|
#
|
||||||
|
# You can search for some particular version of Python by passing a
|
||||||
|
# parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please
|
||||||
|
# note that you *have* to pass also an operator along with the version to
|
||||||
|
# match, and pay special attention to the single quotes surrounding the
|
||||||
|
# version number. Don't use "PYTHON_VERSION" for this: that environment
|
||||||
|
# variable is declared as precious and thus reserved for the end-user.
|
||||||
|
#
|
||||||
|
# This macro should work for all versions of Python >= 2.1.0. As an end
|
||||||
|
# user, you can disable the check for the python version by setting the
|
||||||
|
# PYTHON_NOVERSIONCHECK environment variable to something else than the
|
||||||
|
# empty string.
|
||||||
|
#
|
||||||
|
# If you need to use this macro for an older Python version, please
|
||||||
|
# contact the authors. We're always open for feedback.
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2009 Sebastian Huber <sebastian-huber@web.de>
|
||||||
|
# Copyright (c) 2009 Alan W. Irwin
|
||||||
|
# Copyright (c) 2009 Rafael Laboissiere <rafael@laboissiere.net>
|
||||||
|
# Copyright (c) 2009 Andrew Collier
|
||||||
|
# Copyright (c) 2009 Matteo Settenvini <matteo@member.fsf.org>
|
||||||
|
# Copyright (c) 2009 Horst Knorr <hk_classes@knoda.org>
|
||||||
|
# Copyright (c) 2013 Daniel Mullner <muellner@math.stanford.edu>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by the
|
||||||
|
# Free Software Foundation, either version 3 of the License, or (at your
|
||||||
|
# option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
# Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||||
|
# gives unlimited permission to copy, distribute and modify the configure
|
||||||
|
# scripts that are the output of Autoconf when processing the Macro. You
|
||||||
|
# need not follow the terms of the GNU General Public License when using
|
||||||
|
# or distributing such scripts, even though portions of the text of the
|
||||||
|
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||||
|
# all other use of the material that constitutes the Autoconf Macro.
|
||||||
|
#
|
||||||
|
# This special exception to the GPL applies to versions of the Autoconf
|
||||||
|
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||||
|
# modified version of the Autoconf Macro, you may extend this special
|
||||||
|
# exception to the GPL to apply to your modified version as well.
|
||||||
|
|
||||||
|
#serial 18
|
||||||
|
|
||||||
|
AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL])
|
||||||
|
AC_DEFUN([AX_PYTHON_DEVEL],[
|
||||||
|
#
|
||||||
|
# Allow the use of a (user set) custom python version
|
||||||
|
#
|
||||||
|
AC_ARG_VAR([PYTHON_VERSION],[The installed Python
|
||||||
|
version to use, for example '2.3'. This string
|
||||||
|
will be appended to the Python interpreter
|
||||||
|
canonical name.])
|
||||||
|
|
||||||
|
AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
|
||||||
|
if test -z "$PYTHON"; then
|
||||||
|
AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path])
|
||||||
|
PYTHON_VERSION=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for a version of Python >= 2.1.0
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
|
||||||
|
ac_supports_python_ver=`$PYTHON -c "import sys; \
|
||||||
|
ver = sys.version.split ()[[0]]; \
|
||||||
|
print (ver >= '2.1.0')"`
|
||||||
|
if test "$ac_supports_python_ver" != "True"; then
|
||||||
|
if test -z "$PYTHON_NOVERSIONCHECK"; then
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
AC_MSG_FAILURE([
|
||||||
|
This version of the AC@&t@_PYTHON_DEVEL macro
|
||||||
|
doesn't work properly with versions of Python before
|
||||||
|
2.1.0. You may need to re-run configure, setting the
|
||||||
|
variables PYTHON_CPPFLAGS, PYTHON_LIBS, PYTHON_SITE_PKG,
|
||||||
|
PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
|
||||||
|
Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
|
||||||
|
to something else than an empty string.
|
||||||
|
])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([skip at user request])
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# if the macro parameter ``version'' is set, honour it
|
||||||
|
#
|
||||||
|
if test -n "$1"; then
|
||||||
|
AC_MSG_CHECKING([for a version of Python $1])
|
||||||
|
ac_supports_python_ver=`$PYTHON -c "import sys; \
|
||||||
|
ver = sys.version.split ()[[0]]; \
|
||||||
|
print (ver $1)"`
|
||||||
|
if test "$ac_supports_python_ver" = "True"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
AC_MSG_ERROR([this package requires Python $1.
|
||||||
|
If you have it installed, but it isn't the default Python
|
||||||
|
interpreter in your system path, please pass the PYTHON_VERSION
|
||||||
|
variable to configure. See ``configure --help'' for reference.
|
||||||
|
])
|
||||||
|
PYTHON_VERSION=""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if you have distutils, else fail
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([for the distutils Python package])
|
||||||
|
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
|
||||||
|
if test -z "$ac_distutils_result"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
AC_MSG_ERROR([cannot import Python module "distutils".
|
||||||
|
Please check your Python installation. The error was:
|
||||||
|
$ac_distutils_result])
|
||||||
|
PYTHON_VERSION=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for Python include path
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([for Python include path])
|
||||||
|
if test -z "$PYTHON_CPPFLAGS"; then
|
||||||
|
python_path=`$PYTHON -c "import distutils.sysconfig; \
|
||||||
|
print (distutils.sysconfig.get_python_inc ());"`
|
||||||
|
plat_python_path=`$PYTHON -c "import distutils.sysconfig; \
|
||||||
|
print (distutils.sysconfig.get_python_inc (plat_specific=1));"`
|
||||||
|
if test -n "${python_path}"; then
|
||||||
|
if test "${plat_python_path}" != "${python_path}"; then
|
||||||
|
python_path="-I$python_path -I$plat_python_path"
|
||||||
|
else
|
||||||
|
python_path="-I$python_path"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
PYTHON_CPPFLAGS=$python_path
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$PYTHON_CPPFLAGS])
|
||||||
|
AC_SUBST([PYTHON_CPPFLAGS])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for Python library path
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([for Python library path])
|
||||||
|
if test -z "$PYTHON_LIBS"; then
|
||||||
|
# (makes two attempts to ensure we've got a version number
|
||||||
|
# from the interpreter)
|
||||||
|
ac_python_version=`cat<<EOD | $PYTHON -
|
||||||
|
|
||||||
|
# join all versioning strings, on some systems
|
||||||
|
# major/minor numbers could be in different list elements
|
||||||
|
from distutils.sysconfig import *
|
||||||
|
e = get_config_var('VERSION')
|
||||||
|
if e is not None:
|
||||||
|
print(e)
|
||||||
|
EOD`
|
||||||
|
|
||||||
|
if test -z "$ac_python_version"; then
|
||||||
|
if test -n "$PYTHON_VERSION"; then
|
||||||
|
ac_python_version=$PYTHON_VERSION
|
||||||
|
else
|
||||||
|
ac_python_version=`$PYTHON -c "import sys; \
|
||||||
|
print (sys.version[[:3]])"`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make the versioning information available to the compiler
|
||||||
|
AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"],
|
||||||
|
[If available, contains the Python version number currently in use.])
|
||||||
|
|
||||||
|
# First, the library directory:
|
||||||
|
ac_python_libdir=`cat<<EOD | $PYTHON -
|
||||||
|
|
||||||
|
# There should be only one
|
||||||
|
import distutils.sysconfig
|
||||||
|
e = distutils.sysconfig.get_config_var('LIBDIR')
|
||||||
|
if e is not None:
|
||||||
|
print (e)
|
||||||
|
EOD`
|
||||||
|
|
||||||
|
# Now, for the library:
|
||||||
|
ac_python_library=`cat<<EOD | $PYTHON -
|
||||||
|
|
||||||
|
import distutils.sysconfig
|
||||||
|
c = distutils.sysconfig.get_config_vars()
|
||||||
|
if 'LDVERSION' in c:
|
||||||
|
print ('python'+c[['LDVERSION']])
|
||||||
|
else:
|
||||||
|
print ('python'+c[['VERSION']])
|
||||||
|
EOD`
|
||||||
|
|
||||||
|
# This small piece shamelessly adapted from PostgreSQL python macro;
|
||||||
|
# credits goes to momjian, I think. I'd like to put the right name
|
||||||
|
# in the credits, if someone can point me in the right direction... ?
|
||||||
|
#
|
||||||
|
if test -n "$ac_python_libdir" -a -n "$ac_python_library"
|
||||||
|
then
|
||||||
|
# use the official shared library
|
||||||
|
ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
|
||||||
|
PYTHON_LIBS="-L$ac_python_libdir -l$ac_python_library"
|
||||||
|
else
|
||||||
|
# old way: use libpython from python_configdir
|
||||||
|
ac_python_libdir=`$PYTHON -c \
|
||||||
|
"from distutils.sysconfig import get_python_lib as f; \
|
||||||
|
import os; \
|
||||||
|
print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
|
||||||
|
PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "PYTHON_LIBS"; then
|
||||||
|
AC_MSG_ERROR([
|
||||||
|
Cannot determine location of your Python DSO. Please check it was installed with
|
||||||
|
dynamic libraries enabled, or try setting PYTHON_LIBS by hand.
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$PYTHON_LIBS])
|
||||||
|
AC_SUBST([PYTHON_LIBS])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for site packages
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([for Python site-packages path])
|
||||||
|
if test -z "$PYTHON_SITE_PKG"; then
|
||||||
|
PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
|
||||||
|
print (distutils.sysconfig.get_python_lib(0,0));"`
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$PYTHON_SITE_PKG])
|
||||||
|
AC_SUBST([PYTHON_SITE_PKG])
|
||||||
|
|
||||||
|
#
|
||||||
|
# libraries which must be linked in when embedding
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING(python extra libraries)
|
||||||
|
if test -z "$PYTHON_EXTRA_LDFLAGS"; then
|
||||||
|
PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
|
||||||
|
conf = distutils.sysconfig.get_config_var; \
|
||||||
|
print (conf('LIBS') + ' ' + conf('SYSLIBS'))"`
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
|
||||||
|
AC_SUBST(PYTHON_EXTRA_LDFLAGS)
|
||||||
|
|
||||||
|
#
|
||||||
|
# linking flags needed when embedding
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING(python extra linking flags)
|
||||||
|
if test -z "$PYTHON_EXTRA_LIBS"; then
|
||||||
|
PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
|
||||||
|
conf = distutils.sysconfig.get_config_var; \
|
||||||
|
print (conf('LINKFORSHARED'))"`
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
|
||||||
|
AC_SUBST(PYTHON_EXTRA_LIBS)
|
||||||
|
|
||||||
|
#
|
||||||
|
# final check to see if everything compiles alright
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([consistency of all components of python development environment])
|
||||||
|
# save current global flags
|
||||||
|
ac_save_LIBS="$LIBS"
|
||||||
|
ac_save_LDFLAGS="$LDFLAGS"
|
||||||
|
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LIBS"
|
||||||
|
LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS"
|
||||||
|
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
|
||||||
|
AC_LANG_PUSH([C])
|
||||||
|
AC_LINK_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[#include <Python.h>]],
|
||||||
|
[[Py_Initialize();]])
|
||||||
|
],[pythonexists=yes],[pythonexists=no])
|
||||||
|
AC_LANG_POP([C])
|
||||||
|
# turn back to default flags
|
||||||
|
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||||
|
LIBS="$ac_save_LIBS"
|
||||||
|
LDFLAGS="$ac_save_LDFLAGS"
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$pythonexists])
|
||||||
|
|
||||||
|
if test ! "x$pythonexists" = "xyes"; then
|
||||||
|
AC_MSG_FAILURE([
|
||||||
|
Could not link test program to Python. Maybe the main Python library has been
|
||||||
|
installed in some non-standard library path. If so, pass it to configure,
|
||||||
|
via the LIBS environment variable.
|
||||||
|
Example: ./configure LIBS="-L/usr/non-standard-path/python/lib"
|
||||||
|
============================================================================
|
||||||
|
ERROR!
|
||||||
|
You probably have to install the development version of the Python package
|
||||||
|
for your distribution. The exact name of this package varies among them.
|
||||||
|
============================================================================
|
||||||
|
])
|
||||||
|
PYTHON_VERSION=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# all done!
|
||||||
|
#
|
||||||
|
])
|
37
m4/ax_require_defined.m4
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# ===========================================================================
|
||||||
|
# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AX_REQUIRE_DEFINED(MACRO)
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
|
||||||
|
# been defined and thus are available for use. This avoids random issues
|
||||||
|
# where a macro isn't expanded. Instead the configure script emits a
|
||||||
|
# non-fatal:
|
||||||
|
#
|
||||||
|
# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
|
||||||
|
#
|
||||||
|
# It's like AC_REQUIRE except it doesn't expand the required macro.
|
||||||
|
#
|
||||||
|
# Here's an example:
|
||||||
|
#
|
||||||
|
# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
|
||||||
|
#
|
||||||
|
# Copying and distribution of this file, with or without modification, are
|
||||||
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
|
# warranty.
|
||||||
|
|
||||||
|
#serial 1
|
||||||
|
|
||||||
|
AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
|
||||||
|
m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
|
||||||
|
])dnl AX_REQUIRE_DEFINED
|
@@ -1,38 +0,0 @@
|
|||||||
# Makefile stub for creating standalone plugin distributions.
|
|
||||||
|
|
||||||
plugin_dist: pg_dist pg_dist/config.status
|
|
||||||
pgi=`cd $(srcdir)/.. && pwd`; cd pg_dist; \
|
|
||||||
$(MAKE) $(AM_MAKEFLAGS) PLUGIN_INCLUDES=-I$$pgi distcheck dist
|
|
||||||
|
|
||||||
pg_dist: pg_distdir pg_dist/configure.in pg_dist/install-sh
|
|
||||||
cd pg_dist \
|
|
||||||
&& libtoolize --copy --force --automake \
|
|
||||||
&& automake --copy --add-missing --foreign \
|
|
||||||
&& autoconf -l ../$(top_srcdir)
|
|
||||||
|
|
||||||
pg_distdir: $(DISTFILES)
|
|
||||||
test -d pg_dist || mkdir pg_dist
|
|
||||||
for dfile in $(DISTFILES); do \
|
|
||||||
test -f $$dfile && cp $$dfile pg_dist \
|
|
||||||
|| test -f $(srcdir)/$$dfile && cp $(srcdir)/$$dfile pg_dist; done
|
|
||||||
sed '/Make.plugin/d' < $(srcdir)/Makefile.am > pg_dist/Makefile.am
|
|
||||||
|
|
||||||
pg_dist/configure.in: $(srcdir)/../plugin-conf.in
|
|
||||||
rm -f pg_dist/configure.in
|
|
||||||
test -f $(srcdir)/config.stub \
|
|
||||||
&& cat $(srcdir)/config.stub > pg_dist/configure.in || true
|
|
||||||
cat $(srcdir)/../plugin-conf.in | \
|
|
||||||
sed 's%@PLUGIN_VERSION@%$(PLUGIN_VERSION)%; \
|
|
||||||
s%@PLUGIN@%$(PLUGIN)%' >> pg_dist/configure.in
|
|
||||||
|
|
||||||
pg_dist/install-sh: pg_distdir
|
|
||||||
cp $(top_srcdir)/install-sh pg_dist
|
|
||||||
|
|
||||||
pg_dist/config.status: pg_dist/configure
|
|
||||||
cd pg_dist \
|
|
||||||
&& test -f config.status && $(SHELL) ./config.status --recheck \
|
|
||||||
|| $(SHELL) ./configure --enable-maintainer-mode
|
|
||||||
|
|
||||||
DISTCLEANFILES = pg_dist/* pg_dist
|
|
||||||
|
|
||||||
#
|
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
EXTRA_DIST = INSTALL LICENSE
|
EXTRA_DIST = INSTALL LICENSE fish.h irc.h keystore.h plugin_hexchat.h
|
||||||
|
|
||||||
libdir = $(hexchatlibdir)
|
libdir = $(hexchatlibdir)
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
@@ -1,94 +0,0 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
Copyright (c) 2010 Samuel Lidén Borell <samuel@kodafritt.se>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <glib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include "fish.h"
|
|
||||||
|
|
||||||
// We can't use the HexChat plugin API from here...
|
|
||||||
gchar *get_config_filename() {
|
|
||||||
const gchar *homedir = g_get_home_dir();
|
|
||||||
return g_build_filename(homedir, ".config", "hexchat", "blow.ini", NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int decrypt(int nick_count, char *nicks[]) {
|
|
||||||
char encrypted[8192];
|
|
||||||
while (fgets(encrypted, sizeof(encrypted), stdin)) {
|
|
||||||
char *msg;
|
|
||||||
for (int i = 0; i < nick_count; i++) {
|
|
||||||
msg = fish_decrypt_from_nick(nicks[i], encrypted);
|
|
||||||
if (msg) goto success;
|
|
||||||
}
|
|
||||||
fprintf(stderr, "None of the recipients were found in the key store!\n");
|
|
||||||
return 1;
|
|
||||||
success:
|
|
||||||
fprintf(stderr, "Decrypted text >>>%s<<<\n", msg);
|
|
||||||
g_free(msg);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int encrypt(int nick_count, char *nicks[]) {
|
|
||||||
char message[8192];
|
|
||||||
while (fgets(message, sizeof(message), stdin)) {
|
|
||||||
// Remove newline character
|
|
||||||
char *newline = strchr(message, '\n');
|
|
||||||
if (newline) *newline = '\0';
|
|
||||||
|
|
||||||
bool error = false;
|
|
||||||
for (int i = 0; i < nick_count; i++) {
|
|
||||||
char *encrypted = fish_encrypt_for_nick(nicks[i], message);
|
|
||||||
if (encrypted) {
|
|
||||||
fprintf(stderr, "Encrypted [%s]: >>>%s<<<\n", nicks[i], encrypted);
|
|
||||||
g_free(encrypted);
|
|
||||||
} else {
|
|
||||||
error = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (error) {
|
|
||||||
fprintf(stderr, "Some of the recipients were't found in the key store!\n");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
|
||||||
if (argc < 2) {
|
|
||||||
fprintf(stderr, "usage: %s [-e] nick...\n", argv[0]);
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strcmp(argv[1], "-e") == 0) {
|
|
||||||
return encrypt(argc-2, &argv[2]);
|
|
||||||
} else {
|
|
||||||
return decrypt(argc-1, &argv[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
@@ -7,7 +7,7 @@ libdir = $(hexchatlibdir)
|
|||||||
lib_LTLIBRARIES = perl.la
|
lib_LTLIBRARIES = perl.la
|
||||||
perl_la_SOURCES = perl.c
|
perl_la_SOURCES = perl.c
|
||||||
perl_la_LDFLAGS = $(PERL_LDFLAGS) $(PLUGIN_LDFLAGS) -module
|
perl_la_LDFLAGS = $(PERL_LDFLAGS) $(PLUGIN_LDFLAGS) -module
|
||||||
perl_la_LIBADD = $(PERL_LIBS) $(GLIB_LIBS)
|
perl_la_LIBADD = $(GLIB_LIBS)
|
||||||
perl_la_CFLAGS = $(PERL_CFLAGS) $(GLIB_CFLAGS) -I$(top_srcdir)/src/common
|
perl_la_CFLAGS = $(PERL_CFLAGS) $(GLIB_CFLAGS) -I$(top_srcdir)/src/common
|
||||||
|
|
||||||
BUILT_SOURCES = hexchat.pm.h irc.pm.h
|
BUILT_SOURCES = hexchat.pm.h irc.pm.h
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
@@ -1,19 +0,0 @@
|
|||||||
AC_INIT(@PLUGIN@-config.h.in)
|
|
||||||
AM_CONFIG_HEADER(@PLUGIN@-config.h)
|
|
||||||
AM_INIT_AUTOMAKE(hexchat-@PLUGIN@, @PLUGIN_VERSION@)
|
|
||||||
AM_MAINTAINER_MODE
|
|
||||||
AM_DISABLE_STATIC
|
|
||||||
AM_PROG_LIBTOOL
|
|
||||||
|
|
||||||
AC_ARG_WITH(plugin-includes,
|
|
||||||
[ --with-plugin-includes directory containing hexchat-plugin.h],
|
|
||||||
PLUGIN_INCLUDES=$enableval)
|
|
||||||
|
|
||||||
AC_SUBST(PLUGIN_INCLUDES)
|
|
||||||
|
|
||||||
hexchatlibdir=${libdir}/hexchat
|
|
||||||
AC_SUBST(hexchatlibdir)
|
|
||||||
|
|
||||||
AC_OUTPUT(
|
|
||||||
Makefile
|
|
||||||
)
|
|
@@ -3,6 +3,7 @@ libdir = $(hexchatlibdir)
|
|||||||
lib_LTLIBRARIES = python.la
|
lib_LTLIBRARIES = python.la
|
||||||
python_la_SOURCES = python.c
|
python_la_SOURCES = python.c
|
||||||
python_la_LDFLAGS = $(PLUGIN_LDFLAGS) -module
|
python_la_LDFLAGS = $(PLUGIN_LDFLAGS) -module
|
||||||
python_la_LIBADD = $(PY_LIBS) $(GLIB_LIBS)
|
python_la_LIBADD = $(PYTHON_LIBS) $(GLIB_LIBS)
|
||||||
python_la_CFLAGS = $(PY_CFLAGS) $(GLIB_CFLAGS) -I$(top_srcdir)/src/common
|
python_la_CPPFLAGS = $(PYTHON_CPPFLAGS)
|
||||||
|
python_la_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)/src/common
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>wbemuuid.lib;comsupp.lib;$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>$(HexChatLib)common.lib;wbemuuid.lib;comsupp.lib;$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<IgnoreSpecificDefaultLibraries>comsupp.lib</IgnoreSpecificDefaultLibraries>
|
<IgnoreSpecificDefaultLibraries>comsupp.lib</IgnoreSpecificDefaultLibraries>
|
||||||
<ModuleDefinitionFile>sysinfo.def</ModuleDefinitionFile>
|
<ModuleDefinitionFile>sysinfo.def</ModuleDefinitionFile>
|
||||||
</Link>
|
</Link>
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>wbemuuid.lib;comsupp.lib;$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>$(HexChatLib)common.lib;wbemuuid.lib;comsupp.lib;$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<IgnoreSpecificDefaultLibraries>comsupp.lib</IgnoreSpecificDefaultLibraries>
|
<IgnoreSpecificDefaultLibraries>comsupp.lib</IgnoreSpecificDefaultLibraries>
|
||||||
<ModuleDefinitionFile>sysinfo.def</ModuleDefinitionFile>
|
<ModuleDefinitionFile>sysinfo.def</ModuleDefinitionFile>
|
||||||
</Link>
|
</Link>
|
||||||
|
@@ -26,38 +26,18 @@
|
|||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "../format.h"
|
#include "../../../src/common/sysinfo/sysinfo.h"
|
||||||
|
|
||||||
/* Cache the info for subsequent invocations of /SYSINFO */
|
#include "../format.h"
|
||||||
static int cpu_arch = 0;
|
|
||||||
static char *os_name = NULL;
|
|
||||||
static char *cpu_info = NULL;
|
|
||||||
static char *vga_name = NULL;
|
|
||||||
|
|
||||||
static int command_callback (char *word[], char *word_eol[], void *user_data);
|
static int command_callback (char *word[], char *word_eol[], void *user_data);
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
QUERY_WMI_OS,
|
|
||||||
QUERY_WMI_CPU,
|
|
||||||
QUERY_WMI_VGA,
|
|
||||||
QUERY_WMI_HDD,
|
|
||||||
} QueryWmiType;
|
|
||||||
|
|
||||||
void print_info (void);
|
void print_info (void);
|
||||||
int get_cpu_arch (void);
|
|
||||||
char *query_wmi (QueryWmiType mode);
|
|
||||||
char *read_os_name (IWbemClassObject *object);
|
|
||||||
char *read_cpu_info (IWbemClassObject *object);
|
|
||||||
char *read_vga_name (IWbemClassObject *object);
|
|
||||||
|
|
||||||
guint64 hdd_capacity;
|
guint64 hdd_capacity;
|
||||||
guint64 hdd_free_space;
|
guint64 hdd_free_space;
|
||||||
char *read_hdd_info (IWbemClassObject *object);
|
char *read_hdd_info (IWbemClassObject *object);
|
||||||
|
|
||||||
char *get_memory_info (void);
|
char *get_memory_info (void);
|
||||||
char *bstr_to_utf8 (BSTR bstr);
|
|
||||||
guint64 variant_to_uint64 (VARIANT *variant);
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
sysinfo_backend_get_sound (void)
|
sysinfo_backend_get_sound (void)
|
||||||
@@ -80,14 +60,15 @@ sysinfo_backend_get_uptime (void)
|
|||||||
char *
|
char *
|
||||||
sysinfo_backend_get_disk (void)
|
sysinfo_backend_get_disk (void)
|
||||||
{
|
{
|
||||||
char *hdd_info;
|
guint64 hdd_capacity;
|
||||||
|
guint64 hdd_free_space;
|
||||||
|
|
||||||
/* HDD information is always loaded dynamically since it includes the current amount of free space */
|
sysinfo_get_hdd_info (&hdd_capacity, &hdd_free_space);
|
||||||
hdd_capacity = 0;
|
|
||||||
hdd_free_space = 0;
|
if (hdd_capacity != 0)
|
||||||
hdd_info = query_wmi (QUERY_WMI_HDD);
|
{
|
||||||
if (hdd_info)
|
return sysinfo_format_disk(hdd_capacity, hdd_free_space);
|
||||||
return sysinfo_format_disk (hdd_capacity, hdd_free_space);
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -95,10 +76,7 @@ sysinfo_backend_get_disk (void)
|
|||||||
char *
|
char *
|
||||||
sysinfo_backend_get_cpu (void)
|
sysinfo_backend_get_cpu (void)
|
||||||
{
|
{
|
||||||
if (cpu_info == NULL)
|
return sysinfo_get_cpu ();
|
||||||
cpu_info = query_wmi (QUERY_WMI_CPU);
|
|
||||||
|
|
||||||
return g_strdup (cpu_info);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
@@ -111,352 +89,18 @@ sysinfo_backend_get_memory (void)
|
|||||||
char *
|
char *
|
||||||
sysinfo_backend_get_gpu (void)
|
sysinfo_backend_get_gpu (void)
|
||||||
{
|
{
|
||||||
if (vga_name == NULL)
|
return sysinfo_get_gpu ();
|
||||||
vga_name = query_wmi (QUERY_WMI_VGA);
|
|
||||||
|
|
||||||
return g_strdup (vga_name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
sysinfo_backend_get_os (void)
|
sysinfo_backend_get_os (void)
|
||||||
{
|
{
|
||||||
if (os_name == NULL)
|
return sysinfo_get_os ();
|
||||||
os_name = query_wmi (QUERY_WMI_OS);
|
|
||||||
|
|
||||||
if (cpu_arch == 0)
|
|
||||||
cpu_arch = get_cpu_arch ();
|
|
||||||
|
|
||||||
return g_strdup_printf ("%s (x%d)", os_name, cpu_arch);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_cpu_arch (void)
|
static int get_cpu_arch (void)
|
||||||
{
|
{
|
||||||
SYSTEM_INFO si;
|
return sysinfo_get_cpu_arch ();
|
||||||
|
|
||||||
GetNativeSystemInfo (&si);
|
|
||||||
|
|
||||||
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
|
|
||||||
{
|
|
||||||
return 64;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return 86;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* http://msdn.microsoft.com/en-us/site/aa390423 */
|
|
||||||
static char *query_wmi (QueryWmiType type)
|
|
||||||
{
|
|
||||||
GString *result = NULL;
|
|
||||||
HRESULT hr;
|
|
||||||
|
|
||||||
IWbemLocator *locator = NULL;
|
|
||||||
BSTR namespaceName = NULL;
|
|
||||||
BSTR queryLanguageName = NULL;
|
|
||||||
BSTR query = NULL;
|
|
||||||
IWbemServices *namespace = NULL;
|
|
||||||
IUnknown *namespaceUnknown = NULL;
|
|
||||||
IEnumWbemClassObject *enumerator = NULL;
|
|
||||||
int i;
|
|
||||||
gboolean atleast_one_appended = FALSE;
|
|
||||||
|
|
||||||
hr = CoCreateInstance (&CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, &IID_IWbemLocator, (LPVOID *) &locator);
|
|
||||||
if (FAILED (hr))
|
|
||||||
{
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespaceName = SysAllocString (L"root\\CIMV2");
|
|
||||||
|
|
||||||
hr = locator->lpVtbl->ConnectServer (locator, namespaceName, NULL, NULL, NULL, 0, NULL, NULL, &namespace);
|
|
||||||
if (FAILED (hr))
|
|
||||||
{
|
|
||||||
goto release_locator;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr = namespace->lpVtbl->QueryInterface (namespace, &IID_IUnknown, &namespaceUnknown);
|
|
||||||
if (FAILED (hr))
|
|
||||||
{
|
|
||||||
goto release_namespace;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr = CoSetProxyBlanket (namespaceUnknown, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE);
|
|
||||||
if (FAILED (hr))
|
|
||||||
{
|
|
||||||
goto release_namespaceUnknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
queryLanguageName = SysAllocString (L"WQL");
|
|
||||||
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case QUERY_WMI_OS:
|
|
||||||
query = SysAllocString (L"SELECT Caption FROM Win32_OperatingSystem");
|
|
||||||
break;
|
|
||||||
case QUERY_WMI_CPU:
|
|
||||||
query = SysAllocString (L"SELECT Name, MaxClockSpeed FROM Win32_Processor");
|
|
||||||
break;
|
|
||||||
case QUERY_WMI_VGA:
|
|
||||||
query = SysAllocString (L"SELECT Name FROM Win32_VideoController");
|
|
||||||
break;
|
|
||||||
case QUERY_WMI_HDD:
|
|
||||||
query = SysAllocString (L"SELECT Name, Capacity, FreeSpace FROM Win32_Volume");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
goto release_queryLanguageName;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr = namespace->lpVtbl->ExecQuery (namespace, queryLanguageName, query, WBEM_FLAG_FORWARD_ONLY, NULL, &enumerator);
|
|
||||||
if (FAILED (hr))
|
|
||||||
{
|
|
||||||
goto release_query;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = g_string_new ("");
|
|
||||||
|
|
||||||
for (i = 0;; i++)
|
|
||||||
{
|
|
||||||
ULONG numReturned = 0;
|
|
||||||
IWbemClassObject *object;
|
|
||||||
char *line;
|
|
||||||
|
|
||||||
hr = enumerator->lpVtbl->Next (enumerator, WBEM_INFINITE, 1, &object, &numReturned);
|
|
||||||
if (FAILED (hr) || numReturned == 0)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case QUERY_WMI_OS:
|
|
||||||
line = read_os_name (object);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case QUERY_WMI_CPU:
|
|
||||||
line = read_cpu_info (object);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case QUERY_WMI_VGA:
|
|
||||||
line = read_vga_name (object);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case QUERY_WMI_HDD:
|
|
||||||
line = read_hdd_info (object);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
object->lpVtbl->Release (object);
|
|
||||||
|
|
||||||
if (line != NULL)
|
|
||||||
{
|
|
||||||
if (atleast_one_appended)
|
|
||||||
{
|
|
||||||
g_string_append (result, ", ");
|
|
||||||
}
|
|
||||||
|
|
||||||
g_string_append (result, line);
|
|
||||||
|
|
||||||
g_free (line);
|
|
||||||
|
|
||||||
atleast_one_appended = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
enumerator->lpVtbl->Release (enumerator);
|
|
||||||
|
|
||||||
release_query:
|
|
||||||
SysFreeString (query);
|
|
||||||
|
|
||||||
release_queryLanguageName:
|
|
||||||
SysFreeString (queryLanguageName);
|
|
||||||
|
|
||||||
release_namespaceUnknown:
|
|
||||||
namespaceUnknown->lpVtbl->Release (namespaceUnknown);
|
|
||||||
|
|
||||||
release_namespace:
|
|
||||||
namespace->lpVtbl->Release (namespace);
|
|
||||||
|
|
||||||
release_locator:
|
|
||||||
locator->lpVtbl->Release (locator);
|
|
||||||
SysFreeString (namespaceName);
|
|
||||||
|
|
||||||
exit:
|
|
||||||
if (result == NULL)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return g_string_free (result, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *read_os_name (IWbemClassObject *object)
|
|
||||||
{
|
|
||||||
HRESULT hr;
|
|
||||||
VARIANT caption_variant;
|
|
||||||
char *caption_utf8;
|
|
||||||
|
|
||||||
hr = object->lpVtbl->Get (object, L"Caption", 0, &caption_variant, NULL, NULL);
|
|
||||||
if (FAILED (hr))
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
caption_utf8 = bstr_to_utf8 (caption_variant.bstrVal);
|
|
||||||
|
|
||||||
VariantClear(&caption_variant);
|
|
||||||
|
|
||||||
if (caption_utf8 == NULL)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_strchomp (caption_utf8);
|
|
||||||
|
|
||||||
return caption_utf8;
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *read_cpu_info (IWbemClassObject *object)
|
|
||||||
{
|
|
||||||
HRESULT hr;
|
|
||||||
VARIANT name_variant;
|
|
||||||
char *name_utf8;
|
|
||||||
VARIANT max_clock_speed_variant;
|
|
||||||
guint cpu_freq_mhz;
|
|
||||||
char *result;
|
|
||||||
|
|
||||||
hr = object->lpVtbl->Get (object, L"Name", 0, &name_variant, NULL, NULL);
|
|
||||||
if (FAILED (hr))
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
name_utf8 = bstr_to_utf8 (name_variant.bstrVal);
|
|
||||||
|
|
||||||
VariantClear (&name_variant);
|
|
||||||
|
|
||||||
if (name_utf8 == NULL)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr = object->lpVtbl->Get (object, L"MaxClockSpeed", 0, &max_clock_speed_variant, NULL, NULL);
|
|
||||||
if (FAILED (hr))
|
|
||||||
{
|
|
||||||
g_free (name_utf8);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
cpu_freq_mhz = max_clock_speed_variant.uintVal;
|
|
||||||
|
|
||||||
VariantClear (&max_clock_speed_variant);
|
|
||||||
|
|
||||||
if (cpu_freq_mhz > 1000)
|
|
||||||
{
|
|
||||||
result = g_strdup_printf ("%s (%.2fGHz)", name_utf8, cpu_freq_mhz / 1000.f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = g_strdup_printf ("%s (%" G_GUINT32_FORMAT "MHz)", name_utf8, cpu_freq_mhz);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free (name_utf8);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *read_vga_name (IWbemClassObject *object)
|
|
||||||
{
|
|
||||||
HRESULT hr;
|
|
||||||
VARIANT name_variant;
|
|
||||||
char *name_utf8;
|
|
||||||
|
|
||||||
hr = object->lpVtbl->Get (object, L"Name", 0, &name_variant, NULL, NULL);
|
|
||||||
if (FAILED (hr))
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
name_utf8 = bstr_to_utf8 (name_variant.bstrVal);
|
|
||||||
|
|
||||||
VariantClear (&name_variant);
|
|
||||||
|
|
||||||
if (name_utf8 == NULL)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return name_utf8;
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *read_hdd_info (IWbemClassObject *object)
|
|
||||||
{
|
|
||||||
HRESULT hr;
|
|
||||||
VARIANT name_variant;
|
|
||||||
BSTR name_bstr;
|
|
||||||
gsize name_len;
|
|
||||||
VARIANT capacity_variant;
|
|
||||||
guint64 capacity;
|
|
||||||
VARIANT free_space_variant;
|
|
||||||
guint64 free_space;
|
|
||||||
|
|
||||||
hr = object->lpVtbl->Get (object, L"Name", 0, &name_variant, NULL, NULL);
|
|
||||||
if (FAILED (hr))
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
name_bstr = name_variant.bstrVal;
|
|
||||||
name_len = SysStringLen (name_variant.bstrVal);
|
|
||||||
|
|
||||||
if (name_len >= 4 && name_bstr[0] == L'\\' && name_bstr[1] == L'\\' && name_bstr[2] == L'?' && name_bstr[3] == L'\\')
|
|
||||||
{
|
|
||||||
// This is not a named volume. Skip it.
|
|
||||||
VariantClear (&name_variant);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
VariantClear (&name_variant);
|
|
||||||
|
|
||||||
hr = object->lpVtbl->Get (object, L"Capacity", 0, &capacity_variant, NULL, NULL);
|
|
||||||
if (FAILED (hr))
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
capacity = variant_to_uint64 (&capacity_variant);
|
|
||||||
|
|
||||||
VariantClear (&capacity_variant);
|
|
||||||
|
|
||||||
if (capacity == 0)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr = object->lpVtbl->Get (object, L"FreeSpace", 0, &free_space_variant, NULL, NULL);
|
|
||||||
if (FAILED (hr))
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
free_space = variant_to_uint64 (&free_space_variant);
|
|
||||||
|
|
||||||
VariantClear (&free_space_variant);
|
|
||||||
|
|
||||||
if (free_space == 0)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
hdd_capacity += capacity;
|
|
||||||
hdd_free_space += free_space;
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *get_memory_info (void)
|
static char *get_memory_info (void)
|
||||||
@@ -471,23 +115,3 @@ static char *get_memory_info (void)
|
|||||||
|
|
||||||
return sysinfo_format_memory (meminfo.ullTotalPhys, meminfo.ullAvailPhys);
|
return sysinfo_format_memory (meminfo.ullTotalPhys, meminfo.ullAvailPhys);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *bstr_to_utf8 (BSTR bstr)
|
|
||||||
{
|
|
||||||
return g_utf16_to_utf8 (bstr, SysStringLen (bstr), NULL, NULL, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static guint64 variant_to_uint64 (VARIANT *variant)
|
|
||||||
{
|
|
||||||
switch (V_VT (variant))
|
|
||||||
{
|
|
||||||
case VT_UI8:
|
|
||||||
return variant->ullVal;
|
|
||||||
|
|
||||||
case VT_BSTR:
|
|
||||||
return wcstoull (variant->bstrVal, NULL, 10);
|
|
||||||
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <glib.h>
|
||||||
|
|
||||||
#include "hexchat-plugin.h"
|
#include "hexchat-plugin.h"
|
||||||
|
|
||||||
@@ -21,163 +22,127 @@
|
|||||||
|
|
||||||
static hexchat_plugin *ph; /* plugin handle */
|
static hexchat_plugin *ph; /* plugin handle */
|
||||||
|
|
||||||
BOOL winamp_found = FALSE;
|
|
||||||
|
|
||||||
int status = 0;
|
|
||||||
|
|
||||||
/* Slightly modified from X-Chat's log_escape_strcpy */
|
|
||||||
static char *
|
|
||||||
song_strcpy (char *dest, char *src)
|
|
||||||
{
|
|
||||||
while (*src)
|
|
||||||
{
|
|
||||||
*dest = *src;
|
|
||||||
dest++;
|
|
||||||
src++;
|
|
||||||
|
|
||||||
if (*src == '%')
|
|
||||||
{
|
|
||||||
dest[0] = '%';
|
|
||||||
dest++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dest[0] = 0;
|
|
||||||
return dest - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
winamp(char *word[], char *word_eol[], void *userdata)
|
winamp(char *word[], char *word_eol[], void *userdata)
|
||||||
{
|
{
|
||||||
|
HWND hwndWinamp = FindWindowW(L"Winamp v1.x",NULL);
|
||||||
|
|
||||||
char current_play[2048], *p;
|
if (hwndWinamp)
|
||||||
char p_esc[2048];
|
|
||||||
char cur_esc[2048];
|
|
||||||
char truc[2048];
|
|
||||||
HWND hwndWinamp = FindWindow("Winamp v1.x",NULL);
|
|
||||||
|
|
||||||
if (hwndWinamp)
|
|
||||||
{
|
{
|
||||||
{
|
if (!stricmp("PAUSE", word[2]))
|
||||||
if (!stricmp("PAUSE", word[2]))
|
{
|
||||||
|
if (SendMessage(hwndWinamp,WM_USER, 0, 104))
|
||||||
{
|
{
|
||||||
if (SendMessage(hwndWinamp,WM_USER, 0, 104))
|
SendMessage(hwndWinamp, WM_COMMAND, 40046, 0);
|
||||||
{
|
|
||||||
SendMessage(hwndWinamp, WM_COMMAND, 40046, 0);
|
|
||||||
|
|
||||||
if (SendMessage(hwndWinamp, WM_USER, 0, 104) == PLAYING)
|
if (SendMessage(hwndWinamp, WM_USER, 0, 104) == PLAYING)
|
||||||
hexchat_printf(ph, "Winamp: playing");
|
hexchat_printf(ph, "Winamp: playing");
|
||||||
else
|
else
|
||||||
hexchat_printf(ph, "Winamp: paused");
|
hexchat_printf(ph, "Winamp: paused");
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (!stricmp("STOP", word[2]))
|
|
||||||
{
|
|
||||||
SendMessage(hwndWinamp, WM_COMMAND, 40047, 0);
|
|
||||||
hexchat_printf(ph, "Winamp: stopped");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (!stricmp("PLAY", word[2]))
|
|
||||||
{
|
|
||||||
SendMessage(hwndWinamp, WM_COMMAND, 40045, 0);
|
|
||||||
hexchat_printf(ph, "Winamp: playing");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
|
|
||||||
if (!stricmp("NEXT", word[2]))
|
|
||||||
{
|
|
||||||
SendMessage(hwndWinamp, WM_COMMAND, 40048, 0);
|
|
||||||
hexchat_printf(ph, "Winamp: next playlist entry");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
|
|
||||||
if (!stricmp("PREV", word[2]))
|
|
||||||
{
|
|
||||||
SendMessage(hwndWinamp, WM_COMMAND, 40044, 0);
|
|
||||||
hexchat_printf(ph, "Winamp: previous playlist entry");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
|
|
||||||
if (!stricmp("START", word[2]))
|
|
||||||
{
|
|
||||||
SendMessage(hwndWinamp, WM_COMMAND, 40154, 0);
|
|
||||||
hexchat_printf(ph, "Winamp: playlist start");
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
if (!word_eol[2][0])
|
|
||||||
{
|
|
||||||
GetWindowText(hwndWinamp, current_play, sizeof(current_play));
|
|
||||||
|
|
||||||
if (strchr(current_play, '-'))
|
|
||||||
{
|
|
||||||
|
|
||||||
p = current_play + strlen(current_play) - 8;
|
|
||||||
while (p >= current_play)
|
|
||||||
{
|
|
||||||
if (!strnicmp(p, "- Winamp", 8)) break;
|
|
||||||
p--;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p >= current_play) p--;
|
|
||||||
|
|
||||||
while (p >= current_play && *p == ' ') p--;
|
|
||||||
*++p=0;
|
|
||||||
|
|
||||||
|
|
||||||
p = strchr(current_play, '.') + 1;
|
|
||||||
|
|
||||||
song_strcpy(p_esc, p);
|
|
||||||
song_strcpy(cur_esc, current_play);
|
|
||||||
|
|
||||||
if (p)
|
|
||||||
{
|
|
||||||
sprintf(truc, "me is now playing:%s", p_esc);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sprintf(truc, "me is now playing:%s", cur_esc);
|
|
||||||
}
|
|
||||||
|
|
||||||
hexchat_commandf(ph, truc);
|
|
||||||
|
|
||||||
}
|
|
||||||
else hexchat_print(ph, "Winamp: Nothing being played.");
|
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
hexchat_printf(ph, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START]\n");
|
else if (!stricmp("STOP", word[2]))
|
||||||
}
|
{
|
||||||
|
SendMessage(hwndWinamp, WM_COMMAND, 40047, 0);
|
||||||
|
hexchat_printf(ph, "Winamp: stopped");
|
||||||
|
}
|
||||||
|
else if (!stricmp("PLAY", word[2]))
|
||||||
|
{
|
||||||
|
SendMessage(hwndWinamp, WM_COMMAND, 40045, 0);
|
||||||
|
hexchat_printf(ph, "Winamp: playing");
|
||||||
|
}
|
||||||
|
else if (!stricmp("NEXT", word[2]))
|
||||||
|
{
|
||||||
|
SendMessage(hwndWinamp, WM_COMMAND, 40048, 0);
|
||||||
|
hexchat_printf(ph, "Winamp: next playlist entry");
|
||||||
|
}
|
||||||
|
else if (!stricmp("PREV", word[2]))
|
||||||
|
{
|
||||||
|
SendMessage(hwndWinamp, WM_COMMAND, 40044, 0);
|
||||||
|
hexchat_printf(ph, "Winamp: previous playlist entry");
|
||||||
|
}
|
||||||
|
else if (!stricmp("START", word[2]))
|
||||||
|
{
|
||||||
|
SendMessage(hwndWinamp, WM_COMMAND, 40154, 0);
|
||||||
|
hexchat_printf(ph, "Winamp: playlist start");
|
||||||
|
}
|
||||||
|
else if (!word_eol[2][0])
|
||||||
|
{
|
||||||
|
wchar_t wcurrent_play[2048];
|
||||||
|
char *current_play, *p;
|
||||||
|
int len = GetWindowTextW(hwndWinamp, wcurrent_play, G_N_ELEMENTS(wcurrent_play));
|
||||||
|
|
||||||
|
current_play = g_utf16_to_utf8 (wcurrent_play, len, NULL, NULL, NULL);
|
||||||
|
if (!current_play)
|
||||||
|
{
|
||||||
|
hexchat_print (ph, "Winamp: Error getting song information.");
|
||||||
|
return HEXCHAT_EAT_ALL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strchr(current_play, '-'))
|
||||||
|
{
|
||||||
|
/* Remove any trailing text and whitespace */
|
||||||
|
p = current_play + strlen(current_play) - 8;
|
||||||
|
while (p >= current_play)
|
||||||
|
{
|
||||||
|
if (!strnicmp(p, "- Winamp", 8))
|
||||||
|
break;
|
||||||
|
p--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (p >= current_play)
|
||||||
|
p--;
|
||||||
|
|
||||||
|
while (p >= current_play && *p == ' ')
|
||||||
|
p--;
|
||||||
|
*++p = '\0';
|
||||||
|
|
||||||
|
/* Ignore any leading track number */
|
||||||
|
p = strstr (current_play, ". ");
|
||||||
|
if (p)
|
||||||
|
p += 2;
|
||||||
|
else
|
||||||
|
p = current_play;
|
||||||
|
|
||||||
|
if (*p != '\0')
|
||||||
|
hexchat_commandf (ph, "me is now playing: %s", p);
|
||||||
|
else
|
||||||
|
hexchat_print (ph, "Winamp: No song information found.");
|
||||||
|
g_free (current_play);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
hexchat_print(ph, "Winamp: Nothing being played.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
hexchat_printf(ph, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START]\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hexchat_print(ph, "Winamp not found.\n");
|
hexchat_print(ph, "Winamp not found.\n");
|
||||||
}
|
}
|
||||||
return HEXCHAT_EAT_ALL;
|
return HEXCHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
hexchat_plugin_init(hexchat_plugin *plugin_handle,
|
hexchat_plugin_init(hexchat_plugin *plugin_handle,
|
||||||
char **plugin_name,
|
char **plugin_name,
|
||||||
char **plugin_desc,
|
char **plugin_desc,
|
||||||
char **plugin_version,
|
char **plugin_version,
|
||||||
char *arg)
|
char *arg)
|
||||||
{
|
{
|
||||||
/* we need to save this for use with any hexchat_* functions */
|
/* we need to save this for use with any hexchat_* functions */
|
||||||
ph = plugin_handle;
|
ph = plugin_handle;
|
||||||
|
|
||||||
*plugin_name = "Winamp";
|
*plugin_name = "Winamp";
|
||||||
*plugin_desc = "Winamp plugin for HexChat";
|
*plugin_desc = "Winamp plugin for HexChat";
|
||||||
*plugin_version = "0.5";
|
*plugin_version = "0.6";
|
||||||
|
|
||||||
hexchat_hook_command (ph, "WINAMP", HEXCHAT_PRI_NORM, winamp, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START] - control Winamp or show what's currently playing", 0);
|
hexchat_hook_command (ph, "WINAMP", HEXCHAT_PRI_NORM, winamp, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START] - control Winamp or show what's currently playing", 0);
|
||||||
hexchat_command (ph, "MENU -ishare\\music.png ADD \"Window/Display Current Song (Winamp)\" \"WINAMP\"");
|
hexchat_command (ph, "MENU -ishare\\music.png ADD \"Window/Display Current Song (Winamp)\" \"WINAMP\"");
|
||||||
|
|
||||||
hexchat_print (ph, "Winamp plugin loaded\n");
|
hexchat_print (ph, "Winamp plugin loaded\n");
|
||||||
|
|
||||||
return 1; /* return 1 for success */
|
return 1; /* return 1 for success */
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
@@ -30,19 +30,21 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WINAMP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;WINAMP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
|
||||||
<ModuleDefinitionFile>winamp.def</ModuleDefinitionFile>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;WINAMP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;WINAMP_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
</ClCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup>
|
||||||
|
<ClCompile>
|
||||||
|
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<ModuleDefinitionFile>winamp.def</ModuleDefinitionFile>
|
<ModuleDefinitionFile>winamp.def</ModuleDefinitionFile>
|
||||||
|
<AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@@ -32,7 +32,7 @@ src/fe-gtk/joind.c
|
|||||||
src/fe-gtk/maingui.c
|
src/fe-gtk/maingui.c
|
||||||
src/fe-gtk/menu.c
|
src/fe-gtk/menu.c
|
||||||
src/fe-gtk/notifygui.c
|
src/fe-gtk/notifygui.c
|
||||||
src/fe-gtk/plugin-notifications.c
|
src/fe-gtk/plugin-notification.c
|
||||||
src/fe-gtk/plugin-tray.c
|
src/fe-gtk/plugin-tray.c
|
||||||
src/fe-gtk/plugingui.c
|
src/fe-gtk/plugingui.c
|
||||||
src/fe-gtk/rawlog.c
|
src/fe-gtk/rawlog.c
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# HexChat [](https://travis-ci.org/hexchat/hexchat) [](http://nekomimi.cloudapp.net:8080/job/hexchat/)
|
# HexChat [](https://travis-ci.org/hexchat/hexchat) [](http://node1.sored.pl:8090/job/hexchat/)
|
||||||
|
|
||||||
HexChat is an IRC client for Windows and UNIX-like operating systems.
|
HexChat is an IRC client for Windows and UNIX-like operating systems.
|
||||||
See [IRCHelp.org](http://irchelp.org) for information about IRC in general.
|
See [IRCHelp.org](http://irchelp.org) for information about IRC in general.
|
||||||
|
@@ -20,6 +20,7 @@ EXTRA_DIST = \
|
|||||||
inbound.h \
|
inbound.h \
|
||||||
inet.h \
|
inet.h \
|
||||||
make-te.c \
|
make-te.c \
|
||||||
|
marshalers.list \
|
||||||
modes.h \
|
modes.h \
|
||||||
network.h \
|
network.h \
|
||||||
notify.h \
|
notify.h \
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEF_FONT "Monospace 9"
|
#define DEF_FONT "Monospace 9"
|
||||||
#define DEF_FONT_ALTER "Arial Unicode MS,Lucida Sans Unicode,Meiryo,Symbola,Unifont"
|
#define DEF_FONT_ALTER "Arial Unicode MS,Segoe UI Emoji,Lucida Sans Unicode,Meiryo,Symbola,Unifont"
|
||||||
|
|
||||||
const char * const languages[LANGUAGES_LENGTH] = {
|
const char * const languages[LANGUAGES_LENGTH] = {
|
||||||
"af", "sq", "am", "ast", "az", "eu", "be", "bg", "ca", "zh_CN", /* 0 .. 9 */
|
"af", "sq", "am", "ast", "az", "eu", "be", "bg", "ca", "zh_CN", /* 0 .. 9 */
|
||||||
@@ -226,12 +226,12 @@ cfg_put_str (int fh, char *var, char *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
cfg_put_color (int fh, int r, int g, int b, char *var)
|
cfg_put_color (int fh, guint16 r, guint16 g, guint16 b, char *var)
|
||||||
{
|
{
|
||||||
char buf[400];
|
char buf[400];
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
g_snprintf (buf, sizeof buf, "%s = %04x %04x %04x\n", var, r, g, b);
|
g_snprintf (buf, sizeof buf, "%s = %04hx %04hx %04hx\n", var, r, g, b);
|
||||||
len = strlen (buf);
|
len = strlen (buf);
|
||||||
return (write (fh, buf, len) == len);
|
return (write (fh, buf, len) == len);
|
||||||
}
|
}
|
||||||
@@ -251,14 +251,14 @@ cfg_put_int (int fh, int value, char *var)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
cfg_get_color (char *cfg, char *var, int *r, int *g, int *b)
|
cfg_get_color (char *cfg, char *var, guint16 *r, guint16 *g, guint16 *b)
|
||||||
{
|
{
|
||||||
char str[128];
|
char str[128];
|
||||||
|
|
||||||
if (!cfg_get_str (cfg, var, str, sizeof (str)))
|
if (!cfg_get_str (cfg, var, str, sizeof (str)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
sscanf (str, "%04x %04x %04x", r, g, b);
|
sscanf (str, "%04hx %04hx %04hx", r, g, b);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,9 +373,7 @@ const struct prefs vars[] =
|
|||||||
{"dcc_blocksize", P_OFFINT (hex_dcc_blocksize), TYPE_INT},
|
{"dcc_blocksize", P_OFFINT (hex_dcc_blocksize), TYPE_INT},
|
||||||
{"dcc_completed_dir", P_OFFSET (hex_dcc_completed_dir), TYPE_STR},
|
{"dcc_completed_dir", P_OFFSET (hex_dcc_completed_dir), TYPE_STR},
|
||||||
{"dcc_dir", P_OFFSET (hex_dcc_dir), TYPE_STR},
|
{"dcc_dir", P_OFFSET (hex_dcc_dir), TYPE_STR},
|
||||||
#ifndef WIN32
|
|
||||||
{"dcc_fast_send", P_OFFINT (hex_dcc_fast_send), TYPE_BOOL},
|
{"dcc_fast_send", P_OFFINT (hex_dcc_fast_send), TYPE_BOOL},
|
||||||
#endif
|
|
||||||
{"dcc_global_max_get_cps", P_OFFINT (hex_dcc_global_max_get_cps), TYPE_INT},
|
{"dcc_global_max_get_cps", P_OFFINT (hex_dcc_global_max_get_cps), TYPE_INT},
|
||||||
{"dcc_global_max_send_cps", P_OFFINT (hex_dcc_global_max_send_cps), TYPE_INT},
|
{"dcc_global_max_send_cps", P_OFFINT (hex_dcc_global_max_send_cps), TYPE_INT},
|
||||||
{"dcc_ip", P_OFFSET (hex_dcc_ip), TYPE_STR},
|
{"dcc_ip", P_OFFSET (hex_dcc_ip), TYPE_STR},
|
||||||
@@ -476,7 +474,7 @@ const struct prefs vars[] =
|
|||||||
{"gui_win_ucount", P_OFFINT (hex_gui_win_ucount), TYPE_BOOL},
|
{"gui_win_ucount", P_OFFINT (hex_gui_win_ucount), TYPE_BOOL},
|
||||||
{"gui_win_width", P_OFFINT (hex_gui_win_width), TYPE_INT},
|
{"gui_win_width", P_OFFINT (hex_gui_win_width), TYPE_INT},
|
||||||
|
|
||||||
{"identd", P_OFFINT (hex_identd), TYPE_BOOL},
|
{"identd_server", P_OFFINT (hex_identd_server), TYPE_BOOL},
|
||||||
{"identd_port", P_OFFINT (hex_identd_port), TYPE_INT},
|
{"identd_port", P_OFFINT (hex_identd_port), TYPE_INT},
|
||||||
|
|
||||||
{"input_balloon_chans", P_OFFINT (hex_input_balloon_chans), TYPE_BOOL},
|
{"input_balloon_chans", P_OFFINT (hex_input_balloon_chans), TYPE_BOOL},
|
||||||
@@ -585,16 +583,17 @@ const struct prefs vars[] =
|
|||||||
{0, 0, 0},
|
{0, 0, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *
|
|
||||||
convert_with_fallback (const char *str, const char *fallback)
|
static char *
|
||||||
|
convert_with_fallback (char *str, const char *fallback)
|
||||||
{
|
{
|
||||||
const char *utf;
|
char *utf;
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
/* On non-Windows, g_get_user_name and g_get_real_name return a string in system locale, so convert it to utf-8. */
|
/* On non-Windows, g_get_user_name and g_get_real_name return a string in system locale, so convert it to utf-8. */
|
||||||
utf = g_locale_to_utf8 (str, -1, NULL, NULL, 0);
|
utf = g_locale_to_utf8 (str, -1, NULL, NULL, 0);
|
||||||
|
|
||||||
g_free ((char*)str);
|
g_free (str);
|
||||||
|
|
||||||
/* The returned string is NULL if conversion from locale to utf-8 failed for any reason. Return the fallback. */
|
/* The returned string is NULL if conversion from locale to utf-8 failed for any reason. Return the fallback. */
|
||||||
if (!utf)
|
if (!utf)
|
||||||
@@ -711,14 +710,15 @@ get_default_spell_languages (void)
|
|||||||
void
|
void
|
||||||
load_default_config(void)
|
load_default_config(void)
|
||||||
{
|
{
|
||||||
const char *username, *realname, *font, *langs;
|
char *username, *realname, *langs;
|
||||||
|
const char *font;
|
||||||
char *sp;
|
char *sp;
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
wchar_t* roaming_path_wide;
|
wchar_t* roaming_path_wide;
|
||||||
gchar* roaming_path;
|
gchar* roaming_path;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
username = g_get_user_name ();
|
username = g_strdup(g_get_user_name ());
|
||||||
if (!username)
|
if (!username)
|
||||||
username = g_strdup ("root");
|
username = g_strdup ("root");
|
||||||
|
|
||||||
@@ -739,9 +739,7 @@ load_default_config(void)
|
|||||||
prefs.hex_away_show_once = 1;
|
prefs.hex_away_show_once = 1;
|
||||||
prefs.hex_away_track = 1;
|
prefs.hex_away_track = 1;
|
||||||
prefs.hex_dcc_auto_resume = 1;
|
prefs.hex_dcc_auto_resume = 1;
|
||||||
#ifndef WIN32
|
|
||||||
prefs.hex_dcc_fast_send = 1;
|
prefs.hex_dcc_fast_send = 1;
|
||||||
#endif
|
|
||||||
prefs.hex_gui_autoopen_chat = 1;
|
prefs.hex_gui_autoopen_chat = 1;
|
||||||
prefs.hex_gui_autoopen_dialog = 1;
|
prefs.hex_gui_autoopen_dialog = 1;
|
||||||
prefs.hex_gui_autoopen_recv = 1;
|
prefs.hex_gui_autoopen_recv = 1;
|
||||||
@@ -904,9 +902,9 @@ load_default_config(void)
|
|||||||
if (sp)
|
if (sp)
|
||||||
sp[0] = 0; /* spaces in username would break the login */
|
sp[0] = 0; /* spaces in username would break the login */
|
||||||
|
|
||||||
g_free ((char *)username);
|
g_free (username);
|
||||||
g_free ((char *)realname);
|
g_free (realname);
|
||||||
g_free ((char *)langs);
|
g_free (langs);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@@ -34,8 +34,8 @@ int cfg_get_bool (char *var);
|
|||||||
int cfg_get_int_with_result (char *cfg, char *var, int *result);
|
int cfg_get_int_with_result (char *cfg, char *var, int *result);
|
||||||
int cfg_get_int (char *cfg, char *var);
|
int cfg_get_int (char *cfg, char *var);
|
||||||
int cfg_put_int (int fh, int value, char *var);
|
int cfg_put_int (int fh, int value, char *var);
|
||||||
int cfg_get_color (char *cfg, char *var, int *r, int *g, int *b);
|
int cfg_get_color (char *cfg, char *var, guint16 *r, guint16 *g, guint16 *b);
|
||||||
int cfg_put_color (int fh, int r, int g, int b, char *var);
|
int cfg_put_color (int fh, guint16 r, guint16 g, guint16 b, char *var);
|
||||||
char *get_xdir (void);
|
char *get_xdir (void);
|
||||||
int check_config_dir (void);
|
int check_config_dir (void);
|
||||||
void load_default_config (void);
|
void load_default_config (void);
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
@@ -36,6 +36,7 @@
|
|||||||
<ClInclude Include="server.h" />
|
<ClInclude Include="server.h" />
|
||||||
<ClInclude Include="servlist.h" />
|
<ClInclude Include="servlist.h" />
|
||||||
<ClInclude Include="ssl.h" />
|
<ClInclude Include="ssl.h" />
|
||||||
|
<ClInclude Include="sysinfo\sysinfo.h" />
|
||||||
<ClInclude Include="text.h" />
|
<ClInclude Include="text.h" />
|
||||||
<ClInclude Include="$(HexChatLib)textenums.h" />
|
<ClInclude Include="$(HexChatLib)textenums.h" />
|
||||||
<ClInclude Include="$(HexChatLib)textevents.h" />
|
<ClInclude Include="$(HexChatLib)textevents.h" />
|
||||||
@@ -68,6 +69,7 @@
|
|||||||
<ClCompile Include="server.c" />
|
<ClCompile Include="server.c" />
|
||||||
<ClCompile Include="servlist.c" />
|
<ClCompile Include="servlist.c" />
|
||||||
<ClCompile Include="ssl.c" />
|
<ClCompile Include="ssl.c" />
|
||||||
|
<ClCompile Include="sysinfo\win32\backend.c" />
|
||||||
<ClCompile Include="text.c" />
|
<ClCompile Include="text.c" />
|
||||||
<ClCompile Include="tree.c" />
|
<ClCompile Include="tree.c" />
|
||||||
<ClCompile Include="url.c" />
|
<ClCompile Include="url.c" />
|
||||||
|
@@ -9,6 +9,12 @@
|
|||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="Source Files\sysinfo">
|
||||||
|
<UniqueIdentifier>{d5a3d281-8400-4663-b60d-036ade5fbff7}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Source Files\sysinfo\win32">
|
||||||
|
<UniqueIdentifier>{a6d80da7-bc0a-4f1f-a156-c8cdafb7831d}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="cfgfiles.h">
|
<ClInclude Include="cfgfiles.h">
|
||||||
@@ -110,6 +116,9 @@
|
|||||||
<ClInclude Include="plugin-identd.h">
|
<ClInclude Include="plugin-identd.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="sysinfo\sysinfo.h">
|
||||||
|
<Filter>Source Files\sysinfo</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="cfgfiles.c">
|
<ClCompile Include="cfgfiles.c">
|
||||||
@@ -187,6 +196,9 @@
|
|||||||
<ClCompile Include="plugin-identd.c">
|
<ClCompile Include="plugin-identd.c">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="sysinfo\win32\backend.c">
|
||||||
|
<Filter>Source Files\sysinfo\win32</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\win32\config.h.tt" />
|
<None Include="..\..\win32\config.h.tt" />
|
||||||
|
@@ -366,6 +366,7 @@ remote_object_connect (RemoteObject *obj,
|
|||||||
static guint count = 0;
|
static guint count = 0;
|
||||||
char *sender, *path;
|
char *sender, *path;
|
||||||
RemoteObject *remote_object;
|
RemoteObject *remote_object;
|
||||||
|
gchar count_buffer[15];
|
||||||
|
|
||||||
sender = dbus_g_method_get_sender (context);
|
sender = dbus_g_method_get_sender (context);
|
||||||
remote_object = g_hash_table_lookup (clients, sender);
|
remote_object = g_hash_table_lookup (clients, sender);
|
||||||
@@ -374,7 +375,8 @@ remote_object_connect (RemoteObject *obj,
|
|||||||
g_free (sender);
|
g_free (sender);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
path = g_build_filename (DBUS_OBJECT_PATH, count++, NULL);
|
g_snprintf(count_buffer, sizeof(count_buffer), "%u", count++);
|
||||||
|
path = g_build_filename (DBUS_OBJECT_PATH, count_buffer, NULL);
|
||||||
remote_object = g_object_new (REMOTE_TYPE_OBJECT, NULL);
|
remote_object = g_object_new (REMOTE_TYPE_OBJECT, NULL);
|
||||||
remote_object->dbus_path = path;
|
remote_object->dbus_path = path;
|
||||||
remote_object->filename = g_path_get_basename (filename);
|
remote_object->filename = g_path_get_basename (filename);
|
||||||
|
168
src/common/dcc.c
@@ -328,15 +328,16 @@ dcc_lookup_proxy (char *host, struct sockaddr_in *addr)
|
|||||||
|
|
||||||
#define DCC_USE_PROXY() (prefs.hex_net_proxy_host[0] && prefs.hex_net_proxy_type>0 && prefs.hex_net_proxy_type<5 && prefs.hex_net_proxy_use!=1)
|
#define DCC_USE_PROXY() (prefs.hex_net_proxy_host[0] && prefs.hex_net_proxy_type>0 && prefs.hex_net_proxy_type<5 && prefs.hex_net_proxy_use!=1)
|
||||||
|
|
||||||
static int
|
static void
|
||||||
dcc_connect_sok (struct DCC *dcc)
|
dcc_connect_sok (struct DCC *dcc)
|
||||||
{
|
{
|
||||||
int sok;
|
|
||||||
struct sockaddr_in addr;
|
struct sockaddr_in addr;
|
||||||
|
|
||||||
sok = socket (AF_INET, SOCK_STREAM, 0);
|
dcc->sok = socket(AF_INET, SOCK_STREAM, 0);
|
||||||
if (sok == -1)
|
if (dcc->sok == -1)
|
||||||
return -1;
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
memset (&addr, 0, sizeof (addr));
|
memset (&addr, 0, sizeof (addr));
|
||||||
addr.sin_family = AF_INET;
|
addr.sin_family = AF_INET;
|
||||||
@@ -344,8 +345,9 @@ dcc_connect_sok (struct DCC *dcc)
|
|||||||
{
|
{
|
||||||
if (!dcc_lookup_proxy (prefs.hex_net_proxy_host, &addr))
|
if (!dcc_lookup_proxy (prefs.hex_net_proxy_host, &addr))
|
||||||
{
|
{
|
||||||
closesocket (sok);
|
closesocket (dcc->sok);
|
||||||
return -1;
|
dcc->sok = - 1;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
addr.sin_port = htons (prefs.hex_net_proxy_port);
|
addr.sin_port = htons (prefs.hex_net_proxy_port);
|
||||||
}
|
}
|
||||||
@@ -355,10 +357,14 @@ dcc_connect_sok (struct DCC *dcc)
|
|||||||
addr.sin_addr.s_addr = htonl (dcc->addr);
|
addr.sin_addr.s_addr = htonl (dcc->addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_nonblocking (sok);
|
set_nonblocking (dcc->sok);
|
||||||
connect (sok, (struct sockaddr *) &addr, sizeof (addr));
|
connect (dcc->sok, (struct sockaddr *) &addr, sizeof (addr));
|
||||||
|
|
||||||
return sok;
|
#ifdef WIN32
|
||||||
|
dcc->channel = g_io_channel_win32_new_socket (dcc->sok);
|
||||||
|
#else
|
||||||
|
dcc->channel = g_io_channel_unix_new (dcc->sok);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -366,16 +372,22 @@ dcc_close (struct DCC *dcc, int dccstat, int destroy)
|
|||||||
{
|
{
|
||||||
if (dcc->wiotag)
|
if (dcc->wiotag)
|
||||||
{
|
{
|
||||||
fe_input_remove (dcc->wiotag);
|
g_source_remove (dcc->wiotag);
|
||||||
dcc->wiotag = 0;
|
dcc->wiotag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dcc->iotag)
|
if (dcc->iotag)
|
||||||
{
|
{
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dcc->channel != NULL)
|
||||||
|
{
|
||||||
|
g_io_channel_unref (dcc->channel);
|
||||||
|
dcc->channel = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (dcc->sok != -1)
|
if (dcc->sok != -1)
|
||||||
{
|
{
|
||||||
closesocket (dcc->sok);
|
closesocket (dcc->sok);
|
||||||
@@ -569,13 +581,15 @@ dcc_read_chat (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
|||||||
{
|
{
|
||||||
if (dcc->throttled)
|
if (dcc->throttled)
|
||||||
{
|
{
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dcc->iotag)
|
if (!dcc->iotag)
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_read_chat, dcc);
|
{
|
||||||
|
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read_chat, dcc);
|
||||||
|
}
|
||||||
|
|
||||||
len = recv (dcc->sok, lbuf, sizeof (lbuf) - 2, 0);
|
len = recv (dcc->sok, lbuf, sizeof (lbuf) - 2, 0);
|
||||||
if (len < 1)
|
if (len < 1)
|
||||||
@@ -708,13 +722,15 @@ dcc_read (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
|||||||
if (need_ack)
|
if (need_ack)
|
||||||
dcc_send_ack (dcc);
|
dcc_send_ack (dcc);
|
||||||
|
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dcc->iotag)
|
if (!dcc->iotag)
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_read, dcc);
|
{
|
||||||
|
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read, dcc);
|
||||||
|
}
|
||||||
|
|
||||||
n = recv (dcc->sok, buf, sizeof (buf), 0);
|
n = recv (dcc->sok, buf, sizeof (buf), 0);
|
||||||
if (n < 1)
|
if (n < 1)
|
||||||
@@ -828,7 +844,7 @@ dcc_connect_finished (GIOChannel *source, GIOCondition condition, struct DCC *dc
|
|||||||
|
|
||||||
if (dcc->iotag)
|
if (dcc->iotag)
|
||||||
{
|
{
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -841,24 +857,22 @@ dcc_connect_finished (GIOChannel *source, GIOCondition condition, struct DCC *dc
|
|||||||
switch (dcc->type)
|
switch (dcc->type)
|
||||||
{
|
{
|
||||||
case TYPE_RECV:
|
case TYPE_RECV:
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_read, dcc);
|
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read, dcc);
|
||||||
EMIT_SIGNAL (XP_TE_DCCCONRECV, dcc->serv->front_session,
|
EMIT_SIGNAL (XP_TE_DCCCONRECV, dcc->serv->front_session,
|
||||||
dcc->nick, host, dcc->file, NULL, 0);
|
dcc->nick, host, dcc->file, NULL, 0);
|
||||||
break;
|
break;
|
||||||
case TYPE_SEND:
|
case TYPE_SEND:
|
||||||
/* passive send */
|
/* passive send */
|
||||||
dcc->fastsend = prefs.hex_dcc_fast_send;
|
dcc->fastsend = prefs.hex_dcc_fast_send;
|
||||||
if (dcc->fastsend)
|
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read_ack, dcc);
|
||||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE, dcc_send_data, dcc);
|
dcc_send_data (NULL, 0, (gpointer) dcc);
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_read_ack, dcc);
|
|
||||||
dcc_send_data (NULL, 0, (gpointer)dcc);
|
|
||||||
EMIT_SIGNAL (XP_TE_DCCCONSEND, dcc->serv->front_session,
|
EMIT_SIGNAL (XP_TE_DCCCONSEND, dcc->serv->front_session,
|
||||||
dcc->nick, host, dcc->file, NULL, 0);
|
dcc->nick, host, dcc->file, NULL, 0);
|
||||||
break;
|
break;
|
||||||
case TYPE_CHATSEND: /* pchat */
|
case TYPE_CHATSEND: /* pchat */
|
||||||
dcc_open_query (dcc->serv, dcc->nick);
|
dcc_open_query (dcc->serv, dcc->nick);
|
||||||
case TYPE_CHATRECV: /* normal chat */
|
case TYPE_CHATRECV: /* normal chat */
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_read_chat, dcc);
|
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read_chat, dcc);
|
||||||
dcc->dccchat = g_new0 (struct dcc_chat, 1);
|
dcc->dccchat = g_new0 (struct dcc_chat, 1);
|
||||||
EMIT_SIGNAL (XP_TE_DCCCONCHAT, dcc->serv->front_session,
|
EMIT_SIGNAL (XP_TE_DCCCONCHAT, dcc->serv->front_session,
|
||||||
dcc->nick, host, NULL, NULL, 0);
|
dcc->nick, host, NULL, NULL, 0);
|
||||||
@@ -891,7 +905,7 @@ read_proxy (struct DCC *dcc)
|
|||||||
fe_dcc_update (dcc);
|
fe_dcc_update (dcc);
|
||||||
if (dcc->iotag)
|
if (dcc->iotag)
|
||||||
{
|
{
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -921,7 +935,7 @@ write_proxy (struct DCC *dcc)
|
|||||||
fe_dcc_update (dcc);
|
fe_dcc_update (dcc);
|
||||||
if (dcc->wiotag)
|
if (dcc->wiotag)
|
||||||
{
|
{
|
||||||
fe_input_remove (dcc->wiotag);
|
g_source_remove (dcc->wiotag);
|
||||||
dcc->wiotag = 0;
|
dcc->wiotag = 0;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -959,15 +973,14 @@ dcc_wingate_proxy_traverse (GIOChannel *source, GIOCondition condition, struct D
|
|||||||
"%s %d\r\n", net_ip(dcc->addr),
|
"%s %d\r\n", net_ip(dcc->addr),
|
||||||
dcc->port);
|
dcc->port);
|
||||||
proxy->bufferused = 0;
|
proxy->bufferused = 0;
|
||||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX,
|
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_wingate_proxy_traverse, dcc);
|
||||||
dcc_wingate_proxy_traverse, dcc);
|
|
||||||
++proxy->phase;
|
++proxy->phase;
|
||||||
}
|
}
|
||||||
if (proxy->phase == 1)
|
if (proxy->phase == 1)
|
||||||
{
|
{
|
||||||
if (!read_proxy (dcc))
|
if (!read_proxy (dcc))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
fe_input_remove (dcc->wiotag);
|
g_source_remove (dcc->wiotag);
|
||||||
dcc->wiotag = 0;
|
dcc->wiotag = 0;
|
||||||
dcc_connect_finished (source, 0, dcc);
|
dcc_connect_finished (source, 0, dcc);
|
||||||
}
|
}
|
||||||
@@ -998,8 +1011,7 @@ dcc_socks_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
|||||||
memcpy (proxy->buffer, &sc, sizeof (sc));
|
memcpy (proxy->buffer, &sc, sizeof (sc));
|
||||||
proxy->buffersize = 8 + strlen (sc.username) + 1;
|
proxy->buffersize = 8 + strlen (sc.username) + 1;
|
||||||
proxy->bufferused = 0;
|
proxy->bufferused = 0;
|
||||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX,
|
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_socks_proxy_traverse, dcc);
|
||||||
dcc_socks_proxy_traverse, dcc);
|
|
||||||
++proxy->phase;
|
++proxy->phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1007,12 +1019,11 @@ dcc_socks_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
|||||||
{
|
{
|
||||||
if (!write_proxy (dcc))
|
if (!write_proxy (dcc))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
fe_input_remove (dcc->wiotag);
|
g_source_remove (dcc->wiotag);
|
||||||
dcc->wiotag = 0;
|
dcc->wiotag = 0;
|
||||||
proxy->bufferused = 0;
|
proxy->bufferused = 0;
|
||||||
proxy->buffersize = 8;
|
proxy->buffersize = 8;
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX,
|
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_socks_proxy_traverse, dcc);
|
||||||
dcc_socks_proxy_traverse, dcc);
|
|
||||||
++proxy->phase;
|
++proxy->phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1020,7 +1031,7 @@ dcc_socks_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
|||||||
{
|
{
|
||||||
if (!read_proxy (dcc))
|
if (!read_proxy (dcc))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
if (proxy->buffer[1] == 90)
|
if (proxy->buffer[1] == 90)
|
||||||
dcc_connect_finished (source, 0, dcc);
|
dcc_connect_finished (source, 0, dcc);
|
||||||
@@ -1058,8 +1069,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
|||||||
memcpy (proxy->buffer, &sc1, 3);
|
memcpy (proxy->buffer, &sc1, 3);
|
||||||
proxy->buffersize = 3;
|
proxy->buffersize = 3;
|
||||||
proxy->bufferused = 0;
|
proxy->bufferused = 0;
|
||||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX,
|
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_socks5_proxy_traverse, dcc);
|
||||||
dcc_socks5_proxy_traverse, dcc);
|
|
||||||
++proxy->phase;
|
++proxy->phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1067,12 +1077,11 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
|||||||
{
|
{
|
||||||
if (!write_proxy (dcc))
|
if (!write_proxy (dcc))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
fe_input_remove (dcc->wiotag);
|
g_source_remove (dcc->wiotag);
|
||||||
dcc->wiotag = 0;
|
dcc->wiotag = 0;
|
||||||
proxy->bufferused = 0;
|
proxy->bufferused = 0;
|
||||||
proxy->buffersize = 2;
|
proxy->buffersize = 2;
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX,
|
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_socks5_proxy_traverse, dcc);
|
||||||
dcc_socks5_proxy_traverse, dcc);
|
|
||||||
++proxy->phase;
|
++proxy->phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1080,7 +1089,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
|||||||
{
|
{
|
||||||
if (!read_proxy (dcc))
|
if (!read_proxy (dcc))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
|
|
||||||
/* did the server say no auth required? */
|
/* did the server say no auth required? */
|
||||||
@@ -1114,8 +1123,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
|||||||
|
|
||||||
proxy->buffersize = 3 + len_u + len_p;
|
proxy->buffersize = 3 + len_u + len_p;
|
||||||
proxy->bufferused = 0;
|
proxy->bufferused = 0;
|
||||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX,
|
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_socks5_proxy_traverse, dcc);
|
||||||
dcc_socks5_proxy_traverse, dcc);
|
|
||||||
++proxy->phase;
|
++proxy->phase;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1135,12 +1143,11 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
|||||||
{
|
{
|
||||||
if (!write_proxy (dcc))
|
if (!write_proxy (dcc))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
fe_input_remove (dcc->wiotag);
|
g_source_remove (dcc->wiotag);
|
||||||
dcc->wiotag = 0;
|
dcc->wiotag = 0;
|
||||||
proxy->buffersize = 2;
|
proxy->buffersize = 2;
|
||||||
proxy->bufferused = 0;
|
proxy->bufferused = 0;
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX,
|
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_socks5_proxy_traverse, dcc);
|
||||||
dcc_socks5_proxy_traverse, dcc);
|
|
||||||
++proxy->phase;
|
++proxy->phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1150,7 +1157,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
if (dcc->iotag)
|
if (dcc->iotag)
|
||||||
{
|
{
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
}
|
}
|
||||||
if (proxy->buffer[1] != 0)
|
if (proxy->buffer[1] != 0)
|
||||||
@@ -1178,8 +1185,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
|||||||
proxy->buffer[9] = (dcc->port & 0xFF);
|
proxy->buffer[9] = (dcc->port & 0xFF);
|
||||||
proxy->buffersize = 10;
|
proxy->buffersize = 10;
|
||||||
proxy->bufferused = 0;
|
proxy->bufferused = 0;
|
||||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX,
|
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_socks5_proxy_traverse, dcc);
|
||||||
dcc_socks5_proxy_traverse, dcc);
|
|
||||||
++proxy->phase;
|
++proxy->phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1187,12 +1193,11 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
|||||||
{
|
{
|
||||||
if (!write_proxy (dcc))
|
if (!write_proxy (dcc))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
fe_input_remove (dcc->wiotag);
|
g_source_remove (dcc->wiotag);
|
||||||
dcc->wiotag = 0;
|
dcc->wiotag = 0;
|
||||||
proxy->buffersize = 4;
|
proxy->buffersize = 4;
|
||||||
proxy->bufferused = 0;
|
proxy->bufferused = 0;
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX,
|
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_socks5_proxy_traverse, dcc);
|
||||||
dcc_socks5_proxy_traverse, dcc);
|
|
||||||
++proxy->phase;
|
++proxy->phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1202,7 +1207,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
if (proxy->buffer[0] != 5 || proxy->buffer[1] != 0)
|
if (proxy->buffer[0] != 5 || proxy->buffer[1] != 0)
|
||||||
{
|
{
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
if (proxy->buffer[1] == 2)
|
if (proxy->buffer[1] == 2)
|
||||||
PrintText (dcc->serv->front_session, "SOCKS\tProxy refused to connect to host (not allowed).\n");
|
PrintText (dcc->serv->front_session, "SOCKS\tProxy refused to connect to host (not allowed).\n");
|
||||||
@@ -1233,7 +1238,7 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
|||||||
/* everything done? */
|
/* everything done? */
|
||||||
if (proxy->bufferused == proxy->buffersize)
|
if (proxy->bufferused == proxy->buffersize)
|
||||||
{
|
{
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
dcc_connect_finished (source, 0, dcc);
|
dcc_connect_finished (source, 0, dcc);
|
||||||
}
|
}
|
||||||
@@ -1266,8 +1271,7 @@ dcc_http_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
|||||||
proxy->buffersize = n;
|
proxy->buffersize = n;
|
||||||
proxy->bufferused = 0;
|
proxy->bufferused = 0;
|
||||||
memcpy (proxy->buffer, buf, proxy->buffersize);
|
memcpy (proxy->buffer, buf, proxy->buffersize);
|
||||||
dcc->wiotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX,
|
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_http_proxy_traverse, dcc);
|
||||||
dcc_http_proxy_traverse, dcc);
|
|
||||||
++proxy->phase;
|
++proxy->phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1275,11 +1279,10 @@ dcc_http_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
|||||||
{
|
{
|
||||||
if (!write_proxy (dcc))
|
if (!write_proxy (dcc))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
fe_input_remove (dcc->wiotag);
|
g_source_remove (dcc->wiotag);
|
||||||
dcc->wiotag = 0;
|
dcc->wiotag = 0;
|
||||||
proxy->bufferused = 0;
|
proxy->bufferused = 0;
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX,
|
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_http_proxy_traverse, dcc);
|
||||||
dcc_http_proxy_traverse, dcc);
|
|
||||||
++proxy->phase;
|
++proxy->phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1291,7 +1294,7 @@ dcc_http_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
|||||||
if (proxy->bufferused < 12 ||
|
if (proxy->bufferused < 12 ||
|
||||||
memcmp (proxy->buffer, "HTTP/", 5) || memcmp (proxy->buffer + 9, "200", 3))
|
memcmp (proxy->buffer, "HTTP/", 5) || memcmp (proxy->buffer + 9, "200", 3))
|
||||||
{
|
{
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
PrintText (dcc->serv->front_session, proxy->buffer);
|
PrintText (dcc->serv->front_session, proxy->buffer);
|
||||||
dcc->dccstat = STAT_FAILED;
|
dcc->dccstat = STAT_FAILED;
|
||||||
@@ -1321,7 +1324,7 @@ dcc_http_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
|||||||
else
|
else
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
dcc_connect_finished (source, 0, dcc);
|
dcc_connect_finished (source, 0, dcc);
|
||||||
}
|
}
|
||||||
@@ -1332,7 +1335,7 @@ dcc_http_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
|||||||
static gboolean
|
static gboolean
|
||||||
dcc_proxy_connect (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
dcc_proxy_connect (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
||||||
{
|
{
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
|
|
||||||
if (!dcc_did_connect (source, condition, dcc))
|
if (!dcc_did_connect (source, condition, dcc))
|
||||||
@@ -1384,7 +1387,7 @@ dcc_connect (struct DCC *dcc)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dcc->sok = dcc_connect_sok (dcc);
|
dcc_connect_sok (dcc);
|
||||||
if (dcc->sok == -1)
|
if (dcc->sok == -1)
|
||||||
{
|
{
|
||||||
dcc->dccstat = STAT_FAILED;
|
dcc->dccstat = STAT_FAILED;
|
||||||
@@ -1392,9 +1395,13 @@ dcc_connect (struct DCC *dcc)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (DCC_USE_PROXY ())
|
if (DCC_USE_PROXY ())
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX, dcc_proxy_connect, dcc);
|
{
|
||||||
|
g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_proxy_connect, dcc);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_WRITE|FIA_EX, dcc_connect_finished, dcc);
|
{
|
||||||
|
g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR | G_IO_PRI, dcc_connect_finished, dcc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fe_dcc_update (dcc);
|
fe_dcc_update (dcc);
|
||||||
@@ -1414,7 +1421,7 @@ dcc_send_data (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
|||||||
|
|
||||||
if (dcc->throttled)
|
if (dcc->throttled)
|
||||||
{
|
{
|
||||||
fe_input_remove (dcc->wiotag);
|
g_source_remove (dcc->wiotag);
|
||||||
dcc->wiotag = 0;
|
dcc->wiotag = 0;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -1424,8 +1431,6 @@ dcc_send_data (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
|||||||
if (dcc->ack < (dcc->pos & 0xFFFFFFFF))
|
if (dcc->ack < (dcc->pos & 0xFFFFFFFF))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else if (!dcc->wiotag)
|
|
||||||
dcc->wiotag = fe_input_add (sok, FIA_WRITE, dcc_send_data, dcc);
|
|
||||||
|
|
||||||
buf = g_malloc (prefs.hex_dcc_blocksize);
|
buf = g_malloc (prefs.hex_dcc_blocksize);
|
||||||
|
|
||||||
@@ -1451,13 +1456,18 @@ abortit:
|
|||||||
dcc->lasttime = time (0);
|
dcc->lasttime = time (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* have we sent it all yet? */
|
if (dcc->pos < dcc->size)
|
||||||
if (dcc->pos >= dcc->size)
|
{
|
||||||
|
if (!dcc->wiotag)
|
||||||
|
{
|
||||||
|
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_HUP | G_IO_ERR, dcc_send_data, dcc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
/* it's all sent now, so remove the WRITE/SEND handler */
|
|
||||||
if (dcc->wiotag)
|
if (dcc->wiotag)
|
||||||
{
|
{
|
||||||
fe_input_remove (dcc->wiotag);
|
g_source_remove (dcc->wiotag);
|
||||||
dcc->wiotag = 0;
|
dcc->wiotag = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1556,7 +1566,7 @@ dcc_accept (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
|||||||
|
|
||||||
len = sizeof (CAddr);
|
len = sizeof (CAddr);
|
||||||
sok = accept (dcc->sok, (struct sockaddr *) &CAddr, &len);
|
sok = accept (dcc->sok, (struct sockaddr *) &CAddr, &len);
|
||||||
fe_input_remove (dcc->iotag);
|
g_source_remove (dcc->iotag);
|
||||||
dcc->iotag = 0;
|
dcc->iotag = 0;
|
||||||
closesocket (dcc->sok);
|
closesocket (dcc->sok);
|
||||||
if (sok < 0)
|
if (sok < 0)
|
||||||
@@ -1582,16 +1592,18 @@ dcc_accept (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
|||||||
{
|
{
|
||||||
case TYPE_SEND:
|
case TYPE_SEND:
|
||||||
if (dcc->fastsend)
|
if (dcc->fastsend)
|
||||||
dcc->wiotag = fe_input_add (sok, FIA_WRITE, dcc_send_data, dcc);
|
{
|
||||||
dcc->iotag = fe_input_add (sok, FIA_READ|FIA_EX, dcc_read_ack, dcc);
|
dcc->wiotag = g_io_add_watch (dcc->channel, G_IO_OUT | G_IO_ERR, dcc_send_data, dcc);
|
||||||
dcc_send_data (NULL, 0, (gpointer)dcc);
|
}
|
||||||
|
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read_ack, dcc);
|
||||||
|
dcc_send_data (NULL, 0, (gpointer) dcc);
|
||||||
EMIT_SIGNAL (XP_TE_DCCCONSEND, dcc->serv->front_session,
|
EMIT_SIGNAL (XP_TE_DCCCONSEND, dcc->serv->front_session,
|
||||||
dcc->nick, host, dcc->file, NULL, 0);
|
dcc->nick, host, dcc->file, NULL, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_CHATSEND:
|
case TYPE_CHATSEND:
|
||||||
dcc_open_query (dcc->serv, dcc->nick);
|
dcc_open_query (dcc->serv, dcc->nick);
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_read_chat, dcc);
|
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_read_chat, dcc);
|
||||||
dcc->dccchat = g_new0 (struct dcc_chat, 1);
|
dcc->dccchat = g_new0 (struct dcc_chat, 1);
|
||||||
EMIT_SIGNAL (XP_TE_DCCCONCHAT, dcc->serv->front_session,
|
EMIT_SIGNAL (XP_TE_DCCCONCHAT, dcc->serv->front_session,
|
||||||
dcc->nick, host, NULL, NULL, 0);
|
dcc->nick, host, NULL, NULL, 0);
|
||||||
@@ -1708,7 +1720,7 @@ dcc_listen_init (struct DCC *dcc, session *sess)
|
|||||||
listen (dcc->sok, 1);
|
listen (dcc->sok, 1);
|
||||||
set_blocking (dcc->sok);
|
set_blocking (dcc->sok);
|
||||||
|
|
||||||
dcc->iotag = fe_input_add (dcc->sok, FIA_READ|FIA_EX, dcc_accept, dcc);
|
dcc->iotag = g_io_add_watch (dcc->channel, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, dcc_accept, dcc);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -2122,6 +2134,8 @@ update_is_resumable (struct DCC *dcc)
|
|||||||
dcc->resume_error = 1;
|
dcc->resume_error = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_free (filename_fs);
|
||||||
|
|
||||||
/* Now verify that this DCC is not already in progress from someone else */
|
/* Now verify that this DCC is not already in progress from someone else */
|
||||||
if (dcc->resumable)
|
if (dcc->resumable)
|
||||||
{
|
{
|
||||||
|
@@ -47,6 +47,7 @@ struct DCC
|
|||||||
guint32 addr; /* the 32bit IP number, host byte order */
|
guint32 addr; /* the 32bit IP number, host byte order */
|
||||||
int fp; /* file pointer */
|
int fp; /* file pointer */
|
||||||
int sok;
|
int sok;
|
||||||
|
GIOChannel* channel;
|
||||||
int iotag; /* reading io tag */
|
int iotag; /* reading io tag */
|
||||||
int wiotag; /* writing/sending io tag */
|
int wiotag; /* writing/sending io tag */
|
||||||
int port;
|
int port;
|
||||||
|
@@ -64,7 +64,7 @@ void fe_message (char *msg, int flags);
|
|||||||
#define FIA_WRITE 2
|
#define FIA_WRITE 2
|
||||||
#define FIA_EX 4
|
#define FIA_EX 4
|
||||||
#define FIA_FD 8
|
#define FIA_FD 8
|
||||||
int fe_input_add (int sok, int flags, void *func, void *data);
|
int fe_input_add (int sok, int flags, GIOFunc func, void *data);
|
||||||
void fe_input_remove (int tag);
|
void fe_input_remove (int tag);
|
||||||
void fe_idle_add (void *func, void *data);
|
void fe_idle_add (void *func, void *data);
|
||||||
void fe_set_topic (struct session *sess, char *topic, char *stripped_topic);
|
void fe_set_topic (struct session *sess, char *topic, char *stripped_topic);
|
||||||
|
@@ -257,39 +257,35 @@ lag_check (void)
|
|||||||
GSList *list = serv_list;
|
GSList *list = serv_list;
|
||||||
unsigned long tim;
|
unsigned long tim;
|
||||||
char tbuf[128];
|
char tbuf[128];
|
||||||
time_t now = time(NULL);
|
time_t now = time (0);
|
||||||
|
time_t lag;
|
||||||
|
|
||||||
tim = make_ping_time ();
|
tim = make_ping_time ();
|
||||||
|
|
||||||
time_t ping_interval = 15;
|
|
||||||
time_t ping_timeout = 30;
|
|
||||||
|
|
||||||
if (prefs.hex_net_ping_timeout != 0)
|
|
||||||
{
|
|
||||||
ping_timeout = prefs.hex_net_ping_timeout;
|
|
||||||
ping_interval = ping_timeout/2;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (list)
|
while (list)
|
||||||
{
|
{
|
||||||
serv = list->data;
|
serv = list->data;
|
||||||
if (serv->connected && serv->end_of_motd)
|
if (serv->connected && serv->end_of_motd)
|
||||||
{
|
{
|
||||||
if(!serv->lag_sent && (now - serv->ping_recv) > ping_interval)
|
lag = now - serv->ping_recv;
|
||||||
|
if (prefs.hex_net_ping_timeout != 0 && lag > prefs.hex_net_ping_timeout && lag > 0)
|
||||||
|
{
|
||||||
|
sprintf (tbuf, "%" G_GINT64_FORMAT, (gint64) lag);
|
||||||
|
EMIT_SIGNAL (XP_TE_PINGTIMEOUT, serv->server_session, tbuf, NULL,
|
||||||
|
NULL, NULL, 0);
|
||||||
|
if (prefs.hex_net_auto_reconnect)
|
||||||
|
serv->auto_reconnect (serv, FALSE, -1);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
g_snprintf (tbuf, sizeof (tbuf), "LAG%lu", tim);
|
g_snprintf (tbuf, sizeof (tbuf), "LAG%lu", tim);
|
||||||
serv->p_ping (serv, "", tbuf);
|
serv->p_ping (serv, "", tbuf);
|
||||||
serv->lag_sent = tim;
|
|
||||||
fe_set_lag (serv, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (prefs.hex_net_ping_timeout != 0 && (now - serv->socket_recv) > ping_timeout)
|
if (!serv->lag_sent)
|
||||||
{
|
{
|
||||||
sprintf (tbuf, "%" G_GINT64_FORMAT, (gint64) now - serv->socket_recv);
|
serv->lag_sent = tim;
|
||||||
EMIT_SIGNAL (XP_TE_PINGTIMEOUT, serv->server_session, tbuf, NULL,
|
fe_set_lag (serv, -1);
|
||||||
NULL, NULL, 0);
|
}
|
||||||
if (prefs.hex_net_auto_reconnect)
|
|
||||||
serv->auto_reconnect (serv, FALSE, -1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list = list->next;
|
list = list->next;
|
||||||
@@ -370,11 +366,10 @@ hexchat_misc_checks (void) /* this gets called every 1/2 second */
|
|||||||
if (count % 2)
|
if (count % 2)
|
||||||
dcc_check_timeouts (); /* every 1 second */
|
dcc_check_timeouts (); /* every 1 second */
|
||||||
|
|
||||||
if (count % 2) /* every 1 second*/
|
if (count >= 60) /* every 30 seconds */
|
||||||
lag_check ();
|
|
||||||
|
|
||||||
if (count > 3600)
|
|
||||||
{
|
{
|
||||||
|
if (prefs.hex_gui_lagometer)
|
||||||
|
lag_check ();
|
||||||
count = 0;
|
count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -154,7 +154,7 @@ struct hexchatprefs
|
|||||||
unsigned int hex_gui_win_save;
|
unsigned int hex_gui_win_save;
|
||||||
unsigned int hex_gui_win_swap;
|
unsigned int hex_gui_win_swap;
|
||||||
unsigned int hex_gui_win_ucount;
|
unsigned int hex_gui_win_ucount;
|
||||||
unsigned int hex_identd;
|
unsigned int hex_identd_server;
|
||||||
unsigned int hex_input_balloon_chans;
|
unsigned int hex_input_balloon_chans;
|
||||||
unsigned int hex_input_balloon_hilight;
|
unsigned int hex_input_balloon_hilight;
|
||||||
unsigned int hex_input_balloon_priv;
|
unsigned int hex_input_balloon_priv;
|
||||||
@@ -422,9 +422,7 @@ typedef struct session
|
|||||||
|
|
||||||
/* SASL Mechanisms */
|
/* SASL Mechanisms */
|
||||||
#define MECH_PLAIN 0
|
#define MECH_PLAIN 0
|
||||||
#define MECH_BLOWFISH 1
|
#define MECH_EXTERNAL 1
|
||||||
#define MECH_AES 2
|
|
||||||
#define MECH_EXTERNAL 3
|
|
||||||
|
|
||||||
typedef struct server
|
typedef struct server
|
||||||
{
|
{
|
||||||
@@ -530,7 +528,6 @@ typedef struct server
|
|||||||
/*time_t connect_time;*/ /* when did it connect? */
|
/*time_t connect_time;*/ /* when did it connect? */
|
||||||
unsigned long lag_sent; /* we are still waiting for this ping response*/
|
unsigned long lag_sent; /* we are still waiting for this ping response*/
|
||||||
time_t ping_recv; /* when we last got a ping reply */
|
time_t ping_recv; /* when we last got a ping reply */
|
||||||
time_t socket_recv; /* when we last received something from the socket */
|
|
||||||
time_t away_time; /* when we were marked away */
|
time_t away_time; /* when we were marked away */
|
||||||
|
|
||||||
char *encoding;
|
char *encoding;
|
||||||
@@ -547,7 +544,6 @@ typedef struct server
|
|||||||
unsigned int skip_next_whois:1; /* hide whois output */
|
unsigned int skip_next_whois:1; /* hide whois output */
|
||||||
unsigned int inside_whois:1;
|
unsigned int inside_whois:1;
|
||||||
unsigned int doing_dns:1; /* /dns has been done */
|
unsigned int doing_dns:1; /* /dns has been done */
|
||||||
unsigned int retry_sasl:1; /* retrying another sasl mech */
|
|
||||||
unsigned int end_of_motd:1; /* end of motd reached (logged in) */
|
unsigned int end_of_motd:1; /* end of motd reached (logged in) */
|
||||||
unsigned int sent_quit:1; /* sent a QUIT already? */
|
unsigned int sent_quit:1; /* sent a QUIT already? */
|
||||||
unsigned int use_listargs:1; /* undernet and dalnet need /list >0,<10000 */
|
unsigned int use_listargs:1; /* undernet and dalnet need /list >0,<10000 */
|
||||||
@@ -571,8 +567,8 @@ typedef struct server
|
|||||||
unsigned int have_cert:1; /* have loaded a cert */
|
unsigned int have_cert:1; /* have loaded a cert */
|
||||||
unsigned int use_who:1; /* whether to use WHO command to get dcc_ip */
|
unsigned int use_who:1; /* whether to use WHO command to get dcc_ip */
|
||||||
unsigned int sasl_mech; /* mechanism for sasl auth */
|
unsigned int sasl_mech; /* mechanism for sasl auth */
|
||||||
unsigned int sent_saslauth:1; /* have sent AUTHENICATE yet */
|
|
||||||
unsigned int sent_capend:1; /* have sent CAP END yet */
|
unsigned int sent_capend:1; /* have sent CAP END yet */
|
||||||
|
unsigned int waiting_on_cap:1; /* waiting on another line of CAP LS */
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
unsigned int use_ssl:1; /* is server SSL capable? */
|
unsigned int use_ssl:1; /* is server SSL capable? */
|
||||||
unsigned int accept_invalid_cert:1;/* ignore result of server's cert. verify */
|
unsigned int accept_invalid_cert:1;/* ignore result of server's cert. verify */
|
||||||
|
@@ -1633,6 +1633,58 @@ inbound_identified (server *serv) /* 'MODE +e MYSELF' on freenode */
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *sasl_mechanisms[] =
|
||||||
|
{
|
||||||
|
"PLAIN",
|
||||||
|
"EXTERNAL"
|
||||||
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
inbound_toggle_caps (server *serv, const char *extensions_str, gboolean enable)
|
||||||
|
{
|
||||||
|
char **extensions;
|
||||||
|
gsize i;
|
||||||
|
|
||||||
|
extensions = g_strsplit (extensions_str, " ", 0);
|
||||||
|
|
||||||
|
for (i = 0; extensions[i]; i++)
|
||||||
|
{
|
||||||
|
const char *extension = extensions[i];
|
||||||
|
|
||||||
|
if (!strcmp (extension, "identify-msg"))
|
||||||
|
serv->have_idmsg = enable;
|
||||||
|
else if (!strcmp (extension, "multi-prefix"))
|
||||||
|
serv->have_namesx = enable;
|
||||||
|
else if (!strcmp (extension, "account-notify"))
|
||||||
|
serv->have_accnotify = enable;
|
||||||
|
else if (!strcmp (extension, "extended-join"))
|
||||||
|
serv->have_extjoin = enable;
|
||||||
|
else if (!strcmp (extension, "userhost-in-names"))
|
||||||
|
serv->have_uhnames = enable;
|
||||||
|
else if (!strcmp (extension, "server-time")
|
||||||
|
|| !strcmp (extension, "znc.in/server-time")
|
||||||
|
|| !strcmp (extension, "znc.in/server-time-iso"))
|
||||||
|
serv->have_server_time = enable;
|
||||||
|
else if (!strcmp (extension, "away-notify"))
|
||||||
|
serv->have_awaynotify = enable;
|
||||||
|
else if (!strcmp (extension, "sasl"))
|
||||||
|
{
|
||||||
|
serv->have_sasl = enable;
|
||||||
|
if (enable)
|
||||||
|
{
|
||||||
|
#ifdef USE_OPENSSL
|
||||||
|
if (serv->loginmethod == LOGIN_SASLEXTERNAL)
|
||||||
|
serv->sasl_mech = MECH_EXTERNAL;
|
||||||
|
#endif
|
||||||
|
/* Mechanism either defaulted to PLAIN or server gave us list */
|
||||||
|
tcp_sendf (serv, "AUTHENTICATE %s\r\n", sasl_mechanisms[serv->sasl_mech]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
g_strfreev (extensions);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
inbound_cap_ack (server *serv, char *nick, char *extensions,
|
inbound_cap_ack (server *serv, char *nick, char *extensions,
|
||||||
const message_tags_data *tags_data)
|
const message_tags_data *tags_data)
|
||||||
@@ -1640,79 +1692,97 @@ inbound_cap_ack (server *serv, char *nick, char *extensions,
|
|||||||
EMIT_SIGNAL_TIMESTAMP (XP_TE_CAPACK, serv->server_session, nick, extensions,
|
EMIT_SIGNAL_TIMESTAMP (XP_TE_CAPACK, serv->server_session, nick, extensions,
|
||||||
NULL, NULL, 0, tags_data->timestamp);
|
NULL, NULL, 0, tags_data->timestamp);
|
||||||
|
|
||||||
if (strstr (extensions, "identify-msg") != NULL)
|
inbound_toggle_caps (serv, extensions, TRUE);
|
||||||
{
|
}
|
||||||
serv->have_idmsg = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strstr (extensions, "multi-prefix") != NULL)
|
void
|
||||||
{
|
inbound_cap_del (server *serv, char *nick, char *extensions,
|
||||||
serv->have_namesx = TRUE;
|
const message_tags_data *tags_data)
|
||||||
}
|
{
|
||||||
|
EMIT_SIGNAL_TIMESTAMP (XP_TE_CAPDEL, serv->server_session, nick, extensions,
|
||||||
|
NULL, NULL, 0, tags_data->timestamp);
|
||||||
|
|
||||||
if (strstr (extensions, "away-notify") != NULL)
|
inbound_toggle_caps (serv, extensions, FALSE);
|
||||||
{
|
}
|
||||||
serv->have_awaynotify = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strstr (extensions, "account-notify") != NULL)
|
static const char * const supported_caps[] = {
|
||||||
{
|
"identify-msg",
|
||||||
serv->have_accnotify = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strstr (extensions, "extended-join") != NULL)
|
/* IRCv3.1 */
|
||||||
{
|
"multi-prefix",
|
||||||
serv->have_extjoin = TRUE;
|
"away-notify",
|
||||||
}
|
"account-notify",
|
||||||
|
"extended-join",
|
||||||
|
/* "sasl", Handled manually */
|
||||||
|
|
||||||
if (strstr (extensions, "userhost-in-names") != NULL)
|
/* IRCv3.2 */
|
||||||
{
|
"server-time",
|
||||||
serv->have_uhnames = TRUE;
|
"userhost-in-names",
|
||||||
}
|
"cap-notify",
|
||||||
|
"chghost",
|
||||||
|
|
||||||
if (strstr (extensions, "server-time") != NULL)
|
/* ZNC */
|
||||||
{
|
"znc.in/server-time-iso",
|
||||||
serv->have_server_time = TRUE;
|
"znc.in/server-time",
|
||||||
}
|
|
||||||
|
|
||||||
if (strstr (extensions, "sasl") != NULL)
|
/* Twitch */
|
||||||
{
|
"twitch.tv/membership",
|
||||||
serv->have_sasl = TRUE;
|
};
|
||||||
serv->sent_saslauth = FALSE;
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
get_supported_mech (server *serv, const char *list)
|
||||||
|
{
|
||||||
|
char **mechs = g_strsplit (list, ",", 0);
|
||||||
|
gsize i;
|
||||||
|
int ret = -1;
|
||||||
|
|
||||||
|
for (i = 0; mechs[i]; ++i)
|
||||||
|
{
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
if (serv->loginmethod == LOGIN_SASLEXTERNAL)
|
if (serv->loginmethod == LOGIN_SASLEXTERNAL)
|
||||||
{
|
{
|
||||||
serv->sasl_mech = MECH_EXTERNAL;
|
if (!strcmp (mechs[i], "EXTERNAL"))
|
||||||
tcp_send_len (serv, "AUTHENTICATE EXTERNAL\r\n", 23);
|
{
|
||||||
|
ret = MECH_EXTERNAL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
/* default to most secure, it will fallback if not supported */
|
|
||||||
serv->sasl_mech = MECH_AES;
|
|
||||||
tcp_send_len (serv, "AUTHENTICATE DH-AES\r\n", 21);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
serv->sasl_mech = MECH_PLAIN;
|
|
||||||
tcp_send_len (serv, "AUTHENTICATE PLAIN\r\n", 20);
|
|
||||||
#endif
|
#endif
|
||||||
|
if (!strcmp (mechs[i], "PLAIN"))
|
||||||
|
{
|
||||||
|
ret = MECH_PLAIN;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_strfreev (mechs);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
inbound_cap_ls (server *serv, char *nick, char *extensions_str,
|
inbound_cap_ls (server *serv, char *nick, char *extensions_str,
|
||||||
const message_tags_data *tags_data)
|
const message_tags_data *tags_data)
|
||||||
{
|
{
|
||||||
char buffer[256]; /* buffer for requesting capabilities and emitting the signal */
|
char buffer[500]; /* buffer for requesting capabilities and emitting the signal */
|
||||||
guint32 want_cap; /* format the CAP REQ string based on previous capabilities being requested or not */
|
gboolean want_cap = FALSE; /* format the CAP REQ string based on previous capabilities being requested or not */
|
||||||
guint32 want_sasl; /* CAP END shouldn't be sent when SASL is requested, it needs further responses */
|
gboolean want_sasl = FALSE; /* CAP END shouldn't be sent when SASL is requested, it needs further responses */
|
||||||
char **extensions;
|
char **extensions;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (g_str_has_prefix (extensions_str, "* "))
|
||||||
|
{
|
||||||
|
serv->waiting_on_cap = TRUE;
|
||||||
|
extensions_str += 2;
|
||||||
|
extensions_str += extensions_str[0] == ':' ? 1 : 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
serv->waiting_on_cap = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
EMIT_SIGNAL_TIMESTAMP (XP_TE_CAPLIST, serv->server_session, nick,
|
EMIT_SIGNAL_TIMESTAMP (XP_TE_CAPLIST, serv->server_session, nick,
|
||||||
extensions_str, NULL, NULL, 0, tags_data->timestamp);
|
extensions_str, NULL, NULL, 0, tags_data->timestamp);
|
||||||
want_cap = 0;
|
|
||||||
want_sasl = 0;
|
|
||||||
|
|
||||||
extensions = g_strsplit (extensions_str, " ", 0);
|
extensions = g_strsplit (extensions_str, " ", 0);
|
||||||
|
|
||||||
@@ -1720,67 +1790,43 @@ inbound_cap_ls (server *serv, char *nick, char *extensions_str,
|
|||||||
|
|
||||||
for (i=0; extensions[i]; i++)
|
for (i=0; extensions[i]; i++)
|
||||||
{
|
{
|
||||||
const char *extension = extensions[i];
|
char *extension = extensions[i];
|
||||||
|
char *value;
|
||||||
|
gsize x;
|
||||||
|
|
||||||
if (!strcmp (extension, "identify-msg"))
|
/* CAP 3.2 can provide values */
|
||||||
|
if ((value = strchr (extension, '=')))
|
||||||
{
|
{
|
||||||
strcat (buffer, "identify-msg ");
|
*value = '\0';
|
||||||
want_cap = 1;
|
value++;
|
||||||
}
|
|
||||||
if (!strcmp (extension, "multi-prefix"))
|
|
||||||
{
|
|
||||||
strcat (buffer, "multi-prefix ");
|
|
||||||
want_cap = 1;
|
|
||||||
}
|
|
||||||
if (!strcmp (extension, "away-notify"))
|
|
||||||
{
|
|
||||||
strcat (buffer, "away-notify ");
|
|
||||||
want_cap = 1;
|
|
||||||
}
|
|
||||||
if (!strcmp (extension, "account-notify"))
|
|
||||||
{
|
|
||||||
strcat (buffer, "account-notify ");
|
|
||||||
want_cap = 1;
|
|
||||||
}
|
|
||||||
if (!strcmp (extension, "extended-join"))
|
|
||||||
{
|
|
||||||
strcat (buffer, "extended-join ");
|
|
||||||
want_cap = 1;
|
|
||||||
}
|
|
||||||
if (!strcmp (extension, "userhost-in-names"))
|
|
||||||
{
|
|
||||||
strcat (buffer, "userhost-in-names ");
|
|
||||||
want_cap = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* bouncers can prefix a name space to the extension so we should use.
|
|
||||||
* znc <= 1.0 uses "znc.in/server-time" and newer use "znc.in/server-time-iso".
|
|
||||||
*/
|
|
||||||
if (!strcmp (extension, "znc.in/server-time-iso"))
|
|
||||||
{
|
|
||||||
strcat (buffer, "znc.in/server-time-iso ");
|
|
||||||
want_cap = 1;
|
|
||||||
}
|
|
||||||
if (!strcmp (extension, "znc.in/server-time"))
|
|
||||||
{
|
|
||||||
strcat (buffer, "znc.in/server-time ");
|
|
||||||
want_cap = 1;
|
|
||||||
}
|
|
||||||
if (prefs.hex_irc_cap_server_time
|
|
||||||
&& !strcmp (extension, "server-time"))
|
|
||||||
{
|
|
||||||
strcat (buffer, "server-time ");
|
|
||||||
want_cap = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if the SASL password is set AND auth mode is set to SASL, request SASL auth */
|
/* if the SASL password is set AND auth mode is set to SASL, request SASL auth */
|
||||||
if (!strcmp (extension, "sasl")
|
if (!g_strcmp0 (extension, "sasl") &&
|
||||||
&& ((serv->loginmethod == LOGIN_SASL && strlen (serv->password) != 0)
|
((serv->loginmethod == LOGIN_SASL && strlen (serv->password) != 0)
|
||||||
|| (serv->loginmethod == LOGIN_SASLEXTERNAL && serv->have_cert)))
|
|| (serv->loginmethod == LOGIN_SASLEXTERNAL && serv->have_cert)))
|
||||||
{
|
{
|
||||||
strcat (buffer, "sasl ");
|
if (value)
|
||||||
want_cap = 1;
|
{
|
||||||
want_sasl = 1;
|
int sasl_mech = get_supported_mech (serv, value);
|
||||||
|
if (sasl_mech == -1) /* No supported mech */
|
||||||
|
continue;
|
||||||
|
serv->sasl_mech = sasl_mech;
|
||||||
|
}
|
||||||
|
want_cap = TRUE;
|
||||||
|
want_sasl = TRUE;
|
||||||
|
g_strlcat (buffer, "sasl ", sizeof(buffer));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (x = 0; x < G_N_ELEMENTS(supported_caps); ++x)
|
||||||
|
{
|
||||||
|
if (!g_strcmp0 (extension, supported_caps[x]))
|
||||||
|
{
|
||||||
|
g_strlcat (buffer, extension, sizeof(buffer));
|
||||||
|
g_strlcat (buffer, " ", sizeof(buffer));
|
||||||
|
want_cap = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1794,7 +1840,7 @@ inbound_cap_ls (server *serv, char *nick, char *extensions_str,
|
|||||||
tags_data->timestamp);
|
tags_data->timestamp);
|
||||||
tcp_sendf (serv, "%s\r\n", g_strchomp (buffer));
|
tcp_sendf (serv, "%s\r\n", g_strchomp (buffer));
|
||||||
}
|
}
|
||||||
if (!want_sasl)
|
if (!want_sasl && !serv->waiting_on_cap)
|
||||||
{
|
{
|
||||||
/* if we use SASL, CAP END is dealt via raw numerics */
|
/* if we use SASL, CAP END is dealt via raw numerics */
|
||||||
serv->sent_capend = TRUE;
|
serv->sent_capend = TRUE;
|
||||||
@@ -1805,52 +1851,26 @@ inbound_cap_ls (server *serv, char *nick, char *extensions_str,
|
|||||||
void
|
void
|
||||||
inbound_cap_nak (server *serv, const message_tags_data *tags_data)
|
inbound_cap_nak (server *serv, const message_tags_data *tags_data)
|
||||||
{
|
{
|
||||||
serv->sent_capend = TRUE;
|
if (!serv->waiting_on_cap && !serv->sent_capend)
|
||||||
tcp_send_len (serv, "CAP END\r\n", 9);
|
{
|
||||||
|
serv->sent_capend = TRUE;
|
||||||
|
tcp_send_len (serv, "CAP END\r\n", 9);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
inbound_cap_list (server *serv, char *nick, char *extensions,
|
inbound_cap_list (server *serv, char *nick, char *extensions,
|
||||||
const message_tags_data *tags_data)
|
const message_tags_data *tags_data)
|
||||||
{
|
{
|
||||||
|
if (g_str_has_prefix (extensions, "* "))
|
||||||
|
{
|
||||||
|
extensions += 2;
|
||||||
|
extensions += extensions[0] == ':' ? 1 : 0;
|
||||||
|
}
|
||||||
EMIT_SIGNAL_TIMESTAMP (XP_TE_CAPACK, serv->server_session, nick, extensions,
|
EMIT_SIGNAL_TIMESTAMP (XP_TE_CAPACK, serv->server_session, nick, extensions,
|
||||||
NULL, NULL, 0, tags_data->timestamp);
|
NULL, NULL, 0, tags_data->timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *sasl_mechanisms[] =
|
|
||||||
{
|
|
||||||
"PLAIN",
|
|
||||||
"DH-BLOWFISH",
|
|
||||||
"DH-AES",
|
|
||||||
"EXTERNAL"
|
|
||||||
};
|
|
||||||
|
|
||||||
void
|
|
||||||
inbound_sasl_supportedmechs (server *serv, char *list)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (serv->sasl_mech != MECH_EXTERNAL)
|
|
||||||
{
|
|
||||||
/* Use most secure one supported */
|
|
||||||
for (i = MECH_AES; i >= MECH_PLAIN; i--)
|
|
||||||
{
|
|
||||||
if (strstr (list, sasl_mechanisms[i]) != NULL)
|
|
||||||
{
|
|
||||||
serv->sasl_mech = i;
|
|
||||||
serv->retry_sasl = TRUE;
|
|
||||||
tcp_sendf (serv, "AUTHENTICATE %s\r\n", sasl_mechanisms[i]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Abort, none supported */
|
|
||||||
serv->sent_saslauth = TRUE;
|
|
||||||
tcp_sendf (serv, "AUTHENTICATE *\r\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
inbound_sasl_authenticate (server *serv, char *data)
|
inbound_sasl_authenticate (server *serv, char *data)
|
||||||
{
|
{
|
||||||
@@ -1858,12 +1878,10 @@ inbound_sasl_authenticate (server *serv, char *data)
|
|||||||
char *user, *pass = NULL;
|
char *user, *pass = NULL;
|
||||||
const char *mech = sasl_mechanisms[serv->sasl_mech];
|
const char *mech = sasl_mechanisms[serv->sasl_mech];
|
||||||
|
|
||||||
/* Got a list of supported mechanisms from inspircd */
|
/* Got a list of supported mechanisms from outdated inspircd
|
||||||
|
* just ignore it as it goes against spec */
|
||||||
if (strchr (data, ',') != NULL)
|
if (strchr (data, ',') != NULL)
|
||||||
{
|
|
||||||
inbound_sasl_supportedmechs (serv, data);
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (net->user && !(net->flags & FLAG_USE_GLOBAL))
|
if (net->user && !(net->flags & FLAG_USE_GLOBAL))
|
||||||
user = net->user;
|
user = net->user;
|
||||||
@@ -1876,12 +1894,6 @@ inbound_sasl_authenticate (server *serv, char *data)
|
|||||||
pass = encode_sasl_pass_plain (user, serv->password);
|
pass = encode_sasl_pass_plain (user, serv->password);
|
||||||
break;
|
break;
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
case MECH_BLOWFISH:
|
|
||||||
pass = encode_sasl_pass_blowfish (user, serv->password, data);
|
|
||||||
break;
|
|
||||||
case MECH_AES:
|
|
||||||
pass = encode_sasl_pass_aes (user, serv->password, data);
|
|
||||||
break;
|
|
||||||
case MECH_EXTERNAL:
|
case MECH_EXTERNAL:
|
||||||
pass = g_strdup ("+");
|
pass = g_strdup ("+");
|
||||||
break;
|
break;
|
||||||
@@ -1891,12 +1903,10 @@ inbound_sasl_authenticate (server *serv, char *data)
|
|||||||
if (pass == NULL)
|
if (pass == NULL)
|
||||||
{
|
{
|
||||||
/* something went wrong abort */
|
/* something went wrong abort */
|
||||||
serv->sent_saslauth = TRUE; /* prevent trying PLAIN */
|
|
||||||
tcp_sendf (serv, "AUTHENTICATE *\r\n");
|
tcp_sendf (serv, "AUTHENTICATE *\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
serv->sent_saslauth = TRUE;
|
|
||||||
tcp_sendf (serv, "AUTHENTICATE %s\r\n", pass);
|
tcp_sendf (serv, "AUTHENTICATE %s\r\n", pass);
|
||||||
g_free (pass);
|
g_free (pass);
|
||||||
|
|
||||||
@@ -1905,19 +1915,9 @@ inbound_sasl_authenticate (server *serv, char *data)
|
|||||||
NULL, NULL, 0, 0);
|
NULL, NULL, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
void
|
||||||
inbound_sasl_error (server *serv)
|
inbound_sasl_error (server *serv)
|
||||||
{
|
{
|
||||||
if (serv->retry_sasl && !serv->sent_saslauth)
|
/* Just abort, not much we can do */
|
||||||
return 1;
|
tcp_sendf (serv, "AUTHENTICATE *\r\n");
|
||||||
|
|
||||||
/* If server sent 904 before we sent password,
|
|
||||||
* mech not support so fallback to next mech */
|
|
||||||
if (!serv->sent_saslauth && serv->sasl_mech != MECH_EXTERNAL && serv->sasl_mech != MECH_PLAIN)
|
|
||||||
{
|
|
||||||
serv->sasl_mech -= 1;
|
|
||||||
tcp_sendf (serv, "AUTHENTICATE %s\r\n", sasl_mechanisms[serv->sasl_mech]);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
@@ -95,9 +95,10 @@ void inbound_cap_ls (server *serv, char *nick, char *extensions,
|
|||||||
void inbound_cap_nak (server *serv, const message_tags_data *tags_data);
|
void inbound_cap_nak (server *serv, const message_tags_data *tags_data);
|
||||||
void inbound_cap_list (server *serv, char *nick, char *extensions,
|
void inbound_cap_list (server *serv, char *nick, char *extensions,
|
||||||
const message_tags_data *tags_data);
|
const message_tags_data *tags_data);
|
||||||
|
void inbound_cap_del (server *serv, char *nick, char *extensions,
|
||||||
|
const message_tags_data *tags_data);
|
||||||
void inbound_sasl_authenticate (server *serv, char *data);
|
void inbound_sasl_authenticate (server *serv, char *data);
|
||||||
int inbound_sasl_error (server *serv);
|
void inbound_sasl_error (server *serv);
|
||||||
void inbound_sasl_supportedmechs (server *serv, char *list);
|
|
||||||
void do_dns (session *sess, char *nick, char *host,
|
void do_dns (session *sess, char *nick, char *host,
|
||||||
const message_tags_data *tags_data);
|
const message_tags_data *tags_data);
|
||||||
gboolean alert_match_word (char *word, char *masks);
|
gboolean alert_match_word (char *word, char *masks);
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
@@ -2679,17 +2679,26 @@ cmd_me (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
|||||||
static int
|
static int
|
||||||
cmd_mode (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
cmd_mode (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
||||||
{
|
{
|
||||||
/* +channel channels are dying, let those servers whine about modes.
|
/* We allow omitting the target, so we have to figure it out:
|
||||||
* return info about current channel if available and no info is given */
|
* - Can only use info from channels or dialogs
|
||||||
if ((*word[2] == '+') || (*word[2] == 0) || (!is_channel(sess->server, word[2]) &&
|
* - Empty arg is always sess info
|
||||||
!(rfc_casecmp(sess->server->nick, word[2]) == 0)))
|
* - Assume + is mode not channel
|
||||||
|
* - We know valid channels and our nick
|
||||||
|
* - We cannot easily know if other nick or valid mode (Need to store 004)
|
||||||
|
*/
|
||||||
|
if ((sess->type != SESS_CHANNEL && sess->type != SESS_DIALOG)
|
||||||
|
|| (!(*word[2] == '-' || *word[2] == '+' || *word[2] == '\0')
|
||||||
|
&& (is_channel (sess->server, word[2]) || !rfc_casecmp (sess->server->nick, word[2])))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
sess->server->p_mode (sess->server, word[2], word_eol[3]);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if(sess->channel[0] == 0)
|
if(sess->channel[0] == 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
sess->server->p_mode (sess->server, sess->channel, word_eol[2]);
|
sess->server->p_mode (sess->server, sess->channel, word_eol[2]);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
sess->server->p_mode (sess->server, word[2], word_eol[3]);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3404,8 +3413,9 @@ cmd_server (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
|||||||
safe_strcpy (serv->password, net->pass, sizeof (serv->password));
|
safe_strcpy (serv->password, net->pass, sizeof (serv->password));
|
||||||
serv->loginmethod = net->logintype;
|
serv->loginmethod = net->logintype;
|
||||||
}
|
}
|
||||||
else /* Otherwise ensure no password is sent */
|
else /* Otherwise ensure no password is sent or SASL started */
|
||||||
{
|
{
|
||||||
|
serv->loginmethod = LOGIN_DEFAULT;
|
||||||
serv->password[0] = 0;
|
serv->password[0] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3853,7 +3863,7 @@ const struct commands xc_cmds[] = {
|
|||||||
N_("ALLCHANL <cmd>, sends a command to all channels on the current server")},
|
N_("ALLCHANL <cmd>, sends a command to all channels on the current server")},
|
||||||
{"ALLSERV", cmd_allservers, 0, 0, 1,
|
{"ALLSERV", cmd_allservers, 0, 0, 1,
|
||||||
N_("ALLSERV <cmd>, sends a command to all servers you're in")},
|
N_("ALLSERV <cmd>, sends a command to all servers you're in")},
|
||||||
{"AWAY", cmd_away, 1, 0, 1, N_("AWAY [<reason>], sets you away")},
|
{"AWAY", cmd_away, 1, 0, 1, N_("AWAY [<reason>], sets you away (use /BACK to unset)")},
|
||||||
{"BACK", cmd_back, 1, 0, 1, N_("BACK, sets you back (not away)")},
|
{"BACK", cmd_back, 1, 0, 1, N_("BACK, sets you back (not away)")},
|
||||||
{"BAN", cmd_ban, 1, 1, 1,
|
{"BAN", cmd_ban, 1, 1, 1,
|
||||||
N_("BAN <mask> [<bantype>], bans everyone matching the mask from the current channel. If they are already on the channel this doesn't kick them (needs chanop)")},
|
N_("BAN <mask> [<bantype>], bans everyone matching the mask from the current channel. If they are already on the channel this doesn't kick them (needs chanop)")},
|
||||||
|
@@ -22,17 +22,17 @@
|
|||||||
#include "hexchat-plugin.h"
|
#include "hexchat-plugin.h"
|
||||||
|
|
||||||
#define _(x) hexchat_gettext(ph,x)
|
#define _(x) hexchat_gettext(ph,x)
|
||||||
|
static void identd_start_server (void);
|
||||||
|
|
||||||
static hexchat_plugin *ph;
|
static hexchat_plugin *ph;
|
||||||
static GSocketService *service;
|
static GSocketService *service;
|
||||||
static GHashTable *responses;
|
static GHashTable *responses;
|
||||||
|
|
||||||
struct ident_info
|
typedef struct ident_info
|
||||||
{
|
{
|
||||||
GSocketConnection *conn;
|
GSocketConnection *conn;
|
||||||
gchar *username;
|
gchar *username;
|
||||||
gchar read_buf[16];
|
} ident_info;
|
||||||
} typedef ident_info;
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
identd_cleanup_response_cb (gpointer userdata)
|
identd_cleanup_response_cb (gpointer userdata)
|
||||||
@@ -49,6 +49,20 @@ identd_command_cb (char *word[], char *word_eol[], void *userdata)
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (responses != NULL, HEXCHAT_EAT_ALL);
|
g_return_val_if_fail (responses != NULL, HEXCHAT_EAT_ALL);
|
||||||
|
|
||||||
|
if (!g_strcmp0 (word[2], "reload"))
|
||||||
|
{
|
||||||
|
if (service)
|
||||||
|
{
|
||||||
|
g_socket_service_stop (service);
|
||||||
|
g_clear_object (&service);
|
||||||
|
}
|
||||||
|
|
||||||
|
identd_start_server ();
|
||||||
|
|
||||||
|
if (service)
|
||||||
|
return HEXCHAT_EAT_ALL;
|
||||||
|
}
|
||||||
|
|
||||||
if (service == NULL) /* If we are not running plugins can handle it */
|
if (service == NULL) /* If we are not running plugins can handle it */
|
||||||
return HEXCHAT_EAT_HEXCHAT;
|
return HEXCHAT_EAT_HEXCHAT;
|
||||||
|
|
||||||
@@ -82,21 +96,25 @@ identd_write_ready (GOutputStream *stream, GAsyncResult *res, ident_info *info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
identd_read_ready (GInputStream *in_stream, GAsyncResult *res, ident_info *info)
|
identd_read_ready (GDataInputStream *in_stream, GAsyncResult *res, ident_info *info)
|
||||||
{
|
{
|
||||||
GSocketAddress *sok_addr;
|
GSocketAddress *sok_addr;
|
||||||
GOutputStream *out_stream;
|
GOutputStream *out_stream;
|
||||||
guint64 local, remote;
|
guint64 local, remote;
|
||||||
gchar buf[512], *p;
|
gchar *read_buf, buf[512], *p;
|
||||||
|
|
||||||
if (g_input_stream_read_finish (in_stream, res, NULL))
|
if ((read_buf = g_data_input_stream_read_line_finish (in_stream, res, NULL, NULL)))
|
||||||
{
|
{
|
||||||
local = g_ascii_strtoull (info->read_buf, NULL, 0);
|
local = g_ascii_strtoull (read_buf, NULL, 0);
|
||||||
p = strchr (info->read_buf, ',');
|
p = strchr (read_buf, ',');
|
||||||
if (!p)
|
if (!p)
|
||||||
|
{
|
||||||
|
g_free (read_buf);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
remote = g_ascii_strtoull (p + 1, NULL, 0);
|
remote = g_ascii_strtoull (p + 1, NULL, 0);
|
||||||
|
g_free (read_buf);
|
||||||
|
|
||||||
if (!local || !remote || local > G_MAXUINT16 || remote > G_MAXUINT16)
|
if (!local || !remote || local > G_MAXUINT16 || remote > G_MAXUINT16)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -138,6 +156,7 @@ static gboolean
|
|||||||
identd_incoming_cb (GSocketService *service, GSocketConnection *conn,
|
identd_incoming_cb (GSocketService *service, GSocketConnection *conn,
|
||||||
GObject *source, gpointer userdata)
|
GObject *source, gpointer userdata)
|
||||||
{
|
{
|
||||||
|
GDataInputStream *data_stream;
|
||||||
GInputStream *stream;
|
GInputStream *stream;
|
||||||
ident_info *info;
|
ident_info *info;
|
||||||
|
|
||||||
@@ -147,8 +166,10 @@ identd_incoming_cb (GSocketService *service, GSocketConnection *conn,
|
|||||||
g_object_ref (conn);
|
g_object_ref (conn);
|
||||||
|
|
||||||
stream = g_io_stream_get_input_stream (G_IO_STREAM (conn));
|
stream = g_io_stream_get_input_stream (G_IO_STREAM (conn));
|
||||||
g_input_stream_read_async (stream, info->read_buf, sizeof (info->read_buf), G_PRIORITY_DEFAULT,
|
data_stream = g_data_input_stream_new (stream);
|
||||||
NULL, (GAsyncReadyCallback)identd_read_ready, info);
|
g_data_input_stream_set_newline_type (data_stream, G_DATA_STREAM_NEWLINE_TYPE_CR_LF);
|
||||||
|
g_data_input_stream_read_line_async (data_stream, G_PRIORITY_DEFAULT,
|
||||||
|
NULL, (GAsyncReadyCallback)identd_read_ready, info);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -159,7 +180,7 @@ identd_start_server (void)
|
|||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
int enabled, port = 113;
|
int enabled, port = 113;
|
||||||
|
|
||||||
if (hexchat_get_prefs (ph, "identd", NULL, &enabled) == 3)
|
if (hexchat_get_prefs (ph, "identd_server", NULL, &enabled) == 3)
|
||||||
{
|
{
|
||||||
if (!enabled)
|
if (!enabled)
|
||||||
return;
|
return;
|
||||||
@@ -176,8 +197,7 @@ identd_start_server (void)
|
|||||||
{
|
{
|
||||||
hexchat_printf (ph, _("*\tError starting identd server: %s"), error->message);
|
hexchat_printf (ph, _("*\tError starting identd server: %s"), error->message);
|
||||||
|
|
||||||
g_object_unref (service);
|
g_clear_object (&service);
|
||||||
service = NULL;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/*hexchat_printf (ph, "*\tIdentd listening on port: %d", port); */
|
/*hexchat_printf (ph, "*\tIdentd listening on port: %d", port); */
|
||||||
|
@@ -1821,7 +1821,7 @@ hexchat_pluginpref_set_str_real (hexchat_plugin *pl, const char *var, const char
|
|||||||
{
|
{
|
||||||
prevSetting = 0;
|
prevSetting = 0;
|
||||||
|
|
||||||
while (fscanf (fpIn, " %[^\n]", line_bufp) != EOF) /* read whole lines including whitespaces */
|
while (fscanf (fpIn, " %511[^\n]", line_bufp) != EOF) /* read whole lines including whitespaces */
|
||||||
{
|
{
|
||||||
buffer_tmp = g_strdup_printf ("%s ", var); /* add one space, this way it works against var - var2 checks too */
|
buffer_tmp = g_strdup_printf ("%s ", var); /* add one space, this way it works against var - var2 checks too */
|
||||||
|
|
||||||
|
@@ -48,7 +48,7 @@
|
|||||||
static void
|
static void
|
||||||
irc_login (server *serv, char *user, char *realname)
|
irc_login (server *serv, char *user, char *realname)
|
||||||
{
|
{
|
||||||
tcp_sendf (serv, "CAP LS\r\n"); /* start with CAP LS as Charybdis sasl.txt suggests */
|
tcp_sendf (serv, "CAP LS 302\r\n"); /* start with CAP LS as Charybdis sasl.txt suggests */
|
||||||
serv->sent_capend = FALSE; /* track if we have finished */
|
serv->sent_capend = FALSE; /* track if we have finished */
|
||||||
|
|
||||||
if (serv->password[0] && serv->loginmethod == LOGIN_PASS)
|
if (serv->password[0] && serv->loginmethod == LOGIN_PASS)
|
||||||
@@ -569,7 +569,8 @@ process_numeric (session * sess, int n,
|
|||||||
inbound_user_info_start (sess, word[4], tags_data);
|
inbound_user_info_start (sess, word[4], tags_data);
|
||||||
if (!serv->skip_next_whois)
|
if (!serv->skip_next_whois)
|
||||||
EMIT_SIGNAL_TIMESTAMP (XP_TE_WHOIS1, whois_sess, word[4], word[5],
|
EMIT_SIGNAL_TIMESTAMP (XP_TE_WHOIS1, whois_sess, word[4], word[5],
|
||||||
word[6], word_eol[8] + 1, 0, tags_data->timestamp);
|
word[6], (word_eol[8][0] == ':') ? word_eol[8] + 1 : word_eol[8],
|
||||||
|
0, tags_data->timestamp);
|
||||||
else
|
else
|
||||||
inbound_user_info (sess, NULL, word[5], word[6], NULL, word[4],
|
inbound_user_info (sess, NULL, word[5], word[6], NULL, word[4],
|
||||||
word_eol[8][0] == ':' ? word_eol[8] + 1 : word_eol[8],
|
word_eol[8][0] == ':' ? word_eol[8] + 1 : word_eol[8],
|
||||||
@@ -666,7 +667,6 @@ process_numeric (session * sess, int n,
|
|||||||
EMIT_SIGNAL_TIMESTAMP (XP_TE_CHANMODES, sess, word[4], word_eol[5],
|
EMIT_SIGNAL_TIMESTAMP (XP_TE_CHANMODES, sess, word[4], word_eol[5],
|
||||||
NULL, NULL, 0, tags_data->timestamp);
|
NULL, NULL, 0, tags_data->timestamp);
|
||||||
fe_update_mode_buttons (sess, 'c', '-');
|
fe_update_mode_buttons (sess, 'c', '-');
|
||||||
fe_update_mode_buttons (sess, 'r', '-');
|
|
||||||
fe_update_mode_buttons (sess, 't', '-');
|
fe_update_mode_buttons (sess, 't', '-');
|
||||||
fe_update_mode_buttons (sess, 'n', '-');
|
fe_update_mode_buttons (sess, 'n', '-');
|
||||||
fe_update_mode_buttons (sess, 'i', '-');
|
fe_update_mode_buttons (sess, 'i', '-');
|
||||||
@@ -680,7 +680,7 @@ process_numeric (session * sess, int n,
|
|||||||
sess = find_channel (serv, word[4]);
|
sess = find_channel (serv, word[4]);
|
||||||
if (sess)
|
if (sess)
|
||||||
{
|
{
|
||||||
EMIT_SIGNAL_TIMESTAMP (XP_TE_CHANURL, sess, word[4], word[5] + 1,
|
EMIT_SIGNAL_TIMESTAMP (XP_TE_CHANURL, sess, word[4], (word_eol[5][0] == ':') ? word_eol[5] + 1 : word_eol[5],
|
||||||
NULL, NULL, 0, tags_data->timestamp);
|
NULL, NULL, 0, tags_data->timestamp);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -946,10 +946,9 @@ process_numeric (session * sess, int n,
|
|||||||
word_eol[6]+1, word[1], word[2], NULL, 0,
|
word_eol[6]+1, word[1], word[2], NULL, 0,
|
||||||
tags_data->timestamp);
|
tags_data->timestamp);
|
||||||
break;
|
break;
|
||||||
case 903: /* successful SASL auth */
|
|
||||||
case 904: /* failed SASL auth */
|
case 904: /* failed SASL auth */
|
||||||
if (inbound_sasl_error (serv))
|
inbound_sasl_error (serv);
|
||||||
break; /* might retry */
|
case 903: /* successful SASL auth */
|
||||||
case 905: /* failed SASL auth */
|
case 905: /* failed SASL auth */
|
||||||
case 906: /* aborted */
|
case 906: /* aborted */
|
||||||
case 907: /* attempting to re-auth after a successful auth */
|
case 907: /* attempting to re-auth after a successful auth */
|
||||||
@@ -963,7 +962,7 @@ process_numeric (session * sess, int n,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 908: /* Supported SASL Mechs */
|
case 908: /* Supported SASL Mechs */
|
||||||
inbound_sasl_supportedmechs (serv, word[4]);
|
/* ignored for now, SASL 3.2 is a better solution and we only do PLAIN atm */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -1105,6 +1104,10 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case WORDL('P', 'I', 'N', 'G'):
|
||||||
|
tcp_sendf (sess->server, "PONG %s\r\n", word_eol[3]);
|
||||||
|
return;
|
||||||
|
|
||||||
case WORDL('P','O','N','G'):
|
case WORDL('P','O','N','G'):
|
||||||
inbound_ping_reply (serv->server_session,
|
inbound_ping_reply (serv->server_session,
|
||||||
(word[4][0] == ':') ? word[4] + 1 : word[4],
|
(word[4][0] == ':') ? word[4] + 1 : word[4],
|
||||||
@@ -1140,6 +1143,15 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
|||||||
inbound_account (serv, nick, word[3], tags_data);
|
inbound_account (serv, nick, word[3], tags_data);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case WORDL('A', 'U', 'T', 'H'):
|
||||||
|
inbound_sasl_authenticate (sess->server, word_eol[3]);
|
||||||
|
return;
|
||||||
|
|
||||||
|
case WORDL('C', 'H', 'G', 'H'):
|
||||||
|
inbound_user_info (sess, NULL, word[3], word[4], NULL, nick, NULL,
|
||||||
|
NULL, 0xff, tags_data);
|
||||||
|
return;
|
||||||
|
|
||||||
case WORDL('I','N','V','I'):
|
case WORDL('I','N','V','I'):
|
||||||
if (ignore_check (word[1], IG_INVI))
|
if (ignore_check (word[1], IG_INVI))
|
||||||
return;
|
return;
|
||||||
@@ -1281,7 +1293,7 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
|||||||
word[5][0] == ':' ? word_eol[5] + 1 : word_eol[5],
|
word[5][0] == ':' ? word_eol[5] + 1 : word_eol[5],
|
||||||
tags_data);
|
tags_data);
|
||||||
}
|
}
|
||||||
else if (strncasecmp (word[4], "LS", 2) == 0)
|
else if (strncasecmp (word[4], "LS", 2) == 0 || strncasecmp (word[4], "NEW", 3) == 0)
|
||||||
{
|
{
|
||||||
inbound_cap_ls (serv, word[1],
|
inbound_cap_ls (serv, word[1],
|
||||||
word[5][0] == ':' ? word_eol[5] + 1 : word_eol[5],
|
word[5][0] == ':' ? word_eol[5] + 1 : word_eol[5],
|
||||||
@@ -1297,6 +1309,12 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
|
|||||||
word[5][0] == ':' ? word_eol[5] + 1 : word_eol[5],
|
word[5][0] == ':' ? word_eol[5] + 1 : word_eol[5],
|
||||||
tags_data);
|
tags_data);
|
||||||
}
|
}
|
||||||
|
else if (strncasecmp (word[4], "DEL", 3) == 0)
|
||||||
|
{
|
||||||
|
inbound_cap_del (serv, word[1],
|
||||||
|
word[5][0] == ':' ? word_eol[5] + 1 : word_eol[5],
|
||||||
|
tags_data);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -314,8 +314,6 @@ server_read (GIOChannel *source, GIOCondition condition, server *serv)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
serv->socket_recv = time (NULL);
|
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
lbuf[len] = 0;
|
lbuf[len] = 0;
|
||||||
@@ -489,6 +487,10 @@ ssl_do_connect (server * serv)
|
|||||||
char buf[128];
|
char buf[128];
|
||||||
|
|
||||||
g_sess = serv->server_session;
|
g_sess = serv->server_session;
|
||||||
|
|
||||||
|
/* Set SNI hostname before connect */
|
||||||
|
SSL_set_tlsext_host_name(serv->ssl, serv->hostname);
|
||||||
|
|
||||||
if (SSL_connect (serv->ssl) <= 0)
|
if (SSL_connect (serv->ssl) <= 0)
|
||||||
{
|
{
|
||||||
char err_buf[128];
|
char err_buf[128];
|
||||||
@@ -1725,11 +1727,13 @@ server_set_defaults (server *serv)
|
|||||||
serv->chanmodes = g_strdup ("beI,k,l");
|
serv->chanmodes = g_strdup ("beI,k,l");
|
||||||
serv->nick_prefixes = g_strdup ("@%+");
|
serv->nick_prefixes = g_strdup ("@%+");
|
||||||
serv->nick_modes = g_strdup ("ohv");
|
serv->nick_modes = g_strdup ("ohv");
|
||||||
|
serv->sasl_mech = MECH_PLAIN;
|
||||||
|
|
||||||
server_set_encoding (serv, "UTF-8");
|
server_set_encoding (serv, "UTF-8");
|
||||||
|
|
||||||
serv->nickcount = 1;
|
serv->nickcount = 1;
|
||||||
serv->end_of_motd = FALSE;
|
serv->end_of_motd = FALSE;
|
||||||
|
serv->sent_capend = FALSE;
|
||||||
serv->is_away = FALSE;
|
serv->is_away = FALSE;
|
||||||
serv->supports_watch = FALSE;
|
serv->supports_watch = FALSE;
|
||||||
serv->supports_monitor = FALSE;
|
serv->supports_monitor = FALSE;
|
||||||
|
@@ -280,9 +280,6 @@ static const struct defaultserver def[] =
|
|||||||
{"SeilEn.de", 0},
|
{"SeilEn.de", 0},
|
||||||
{0, "irc.seilen.de"},
|
{0, "irc.seilen.de"},
|
||||||
|
|
||||||
{"SeionIRC", 0, 0, 0, LOGIN_SASL, 0, TRUE},
|
|
||||||
{0, "irc.seion.us"},
|
|
||||||
|
|
||||||
{"Serenity-IRC", 0},
|
{"Serenity-IRC", 0},
|
||||||
{0, "irc.serenity-irc.net"},
|
{0, "irc.serenity-irc.net"},
|
||||||
|
|
||||||
|
13
src/common/sysinfo/sysinfo.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#ifndef HEXCHAT_SYSINFO_H
|
||||||
|
#define HEXCHAT_SYSINFO_H
|
||||||
|
|
||||||
|
#include <glib.h>
|
||||||
|
|
||||||
|
int sysinfo_get_cpu_arch (void);
|
||||||
|
int sysinfo_get_build_arch (void);
|
||||||
|
char *sysinfo_get_cpu (void);
|
||||||
|
char *sysinfo_get_os (void);
|
||||||
|
void sysinfo_get_hdd_info (guint64 *hdd_capacity_out, guint64 *hdd_free_space_out);
|
||||||
|
char *sysinfo_get_gpu (void);
|
||||||
|
|
||||||
|
#endif
|
478
src/common/sysinfo/win32/backend.c
Normal file
@@ -0,0 +1,478 @@
|
|||||||
|
/* HexChat
|
||||||
|
* Copyright (c) 2011-2012 Berke Viktor.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <windows.h>
|
||||||
|
#include <wbemidl.h>
|
||||||
|
|
||||||
|
#include "../sysinfo.h"
|
||||||
|
|
||||||
|
/* Cache */
|
||||||
|
static int cpu_arch = 0;
|
||||||
|
static int build_arch = 0;
|
||||||
|
static char *os_name = NULL;
|
||||||
|
static char *cpu_info = NULL;
|
||||||
|
static char *vga_name = NULL;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
QUERY_WMI_OS,
|
||||||
|
QUERY_WMI_CPU,
|
||||||
|
QUERY_WMI_VGA,
|
||||||
|
QUERY_WMI_HDD,
|
||||||
|
} QueryWmiType;
|
||||||
|
|
||||||
|
char *query_wmi (QueryWmiType mode);
|
||||||
|
char *read_os_name (IWbemClassObject *object);
|
||||||
|
char *read_cpu_info (IWbemClassObject *object);
|
||||||
|
char *read_vga_name (IWbemClassObject *object);
|
||||||
|
|
||||||
|
guint64 hdd_capacity;
|
||||||
|
guint64 hdd_free_space;
|
||||||
|
char *read_hdd_info (IWbemClassObject *object);
|
||||||
|
|
||||||
|
char *bstr_to_utf8 (BSTR bstr);
|
||||||
|
guint64 variant_to_uint64 (VARIANT *variant);
|
||||||
|
|
||||||
|
char *
|
||||||
|
sysinfo_get_cpu (void)
|
||||||
|
{
|
||||||
|
if (cpu_info == NULL)
|
||||||
|
cpu_info = query_wmi (QUERY_WMI_CPU);
|
||||||
|
|
||||||
|
return g_strdup (cpu_info);
|
||||||
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
sysinfo_get_os (void)
|
||||||
|
{
|
||||||
|
if (os_name == NULL)
|
||||||
|
os_name = query_wmi (QUERY_WMI_OS);
|
||||||
|
|
||||||
|
return g_strdup_printf ("%s (x%d)", os_name, sysinfo_get_cpu_arch ());
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
sysinfo_get_cpu_arch (void)
|
||||||
|
{
|
||||||
|
SYSTEM_INFO si;
|
||||||
|
|
||||||
|
if (cpu_arch != 0)
|
||||||
|
{
|
||||||
|
return cpu_arch;
|
||||||
|
}
|
||||||
|
|
||||||
|
GetNativeSystemInfo (&si);
|
||||||
|
|
||||||
|
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
|
||||||
|
{
|
||||||
|
return cpu_arch = 64;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return cpu_arch = 86;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
sysinfo_get_build_arch (void)
|
||||||
|
{
|
||||||
|
SYSTEM_INFO si;
|
||||||
|
|
||||||
|
if (build_arch != 0)
|
||||||
|
{
|
||||||
|
return build_arch;
|
||||||
|
}
|
||||||
|
|
||||||
|
GetSystemInfo (&si);
|
||||||
|
|
||||||
|
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
|
||||||
|
{
|
||||||
|
return build_arch = 64;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return build_arch = 86;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
sysinfo_get_gpu (void)
|
||||||
|
{
|
||||||
|
if (vga_name == NULL)
|
||||||
|
vga_name = query_wmi (QUERY_WMI_VGA);
|
||||||
|
|
||||||
|
return g_strdup (vga_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
sysinfo_get_hdd_info (guint64 *hdd_capacity_out, guint64 *hdd_free_space_out)
|
||||||
|
{
|
||||||
|
char *hdd_info;
|
||||||
|
|
||||||
|
/* HDD information is always loaded dynamically since it includes the current amount of free space */
|
||||||
|
*hdd_capacity_out = hdd_capacity = 0;
|
||||||
|
*hdd_free_space_out = hdd_free_space = 0;
|
||||||
|
|
||||||
|
hdd_info = query_wmi (QUERY_WMI_HDD);
|
||||||
|
if (hdd_info == NULL)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
*hdd_capacity_out = hdd_capacity;
|
||||||
|
*hdd_free_space_out = hdd_free_space;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* https://msdn.microsoft.com/en-us/library/aa390423 */
|
||||||
|
static char *query_wmi (QueryWmiType type)
|
||||||
|
{
|
||||||
|
GString *result = NULL;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
IWbemLocator *locator = NULL;
|
||||||
|
BSTR namespaceName = NULL;
|
||||||
|
BSTR queryLanguageName = NULL;
|
||||||
|
BSTR query = NULL;
|
||||||
|
IWbemServices *namespace = NULL;
|
||||||
|
IUnknown *namespaceUnknown = NULL;
|
||||||
|
IEnumWbemClassObject *enumerator = NULL;
|
||||||
|
int i;
|
||||||
|
gboolean atleast_one_appended = FALSE;
|
||||||
|
|
||||||
|
hr = CoCreateInstance (&CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, &IID_IWbemLocator, (LPVOID *) &locator);
|
||||||
|
if (FAILED (hr))
|
||||||
|
{
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespaceName = SysAllocString (L"root\\CIMV2");
|
||||||
|
|
||||||
|
hr = locator->lpVtbl->ConnectServer (locator, namespaceName, NULL, NULL, NULL, 0, NULL, NULL, &namespace);
|
||||||
|
if (FAILED (hr))
|
||||||
|
{
|
||||||
|
goto release_locator;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr = namespace->lpVtbl->QueryInterface (namespace, &IID_IUnknown, &namespaceUnknown);
|
||||||
|
if (FAILED (hr))
|
||||||
|
{
|
||||||
|
goto release_namespace;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr = CoSetProxyBlanket (namespaceUnknown, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE);
|
||||||
|
if (FAILED (hr))
|
||||||
|
{
|
||||||
|
goto release_namespaceUnknown;
|
||||||
|
}
|
||||||
|
|
||||||
|
queryLanguageName = SysAllocString (L"WQL");
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case QUERY_WMI_OS:
|
||||||
|
query = SysAllocString (L"SELECT Caption FROM Win32_OperatingSystem");
|
||||||
|
break;
|
||||||
|
case QUERY_WMI_CPU:
|
||||||
|
query = SysAllocString (L"SELECT Name, MaxClockSpeed FROM Win32_Processor");
|
||||||
|
break;
|
||||||
|
case QUERY_WMI_VGA:
|
||||||
|
query = SysAllocString (L"SELECT Name FROM Win32_VideoController");
|
||||||
|
break;
|
||||||
|
case QUERY_WMI_HDD:
|
||||||
|
query = SysAllocString (L"SELECT Name, Capacity, FreeSpace FROM Win32_Volume");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
goto release_queryLanguageName;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr = namespace->lpVtbl->ExecQuery (namespace, queryLanguageName, query, WBEM_FLAG_FORWARD_ONLY, NULL, &enumerator);
|
||||||
|
if (FAILED (hr))
|
||||||
|
{
|
||||||
|
goto release_query;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = g_string_new ("");
|
||||||
|
|
||||||
|
for (i = 0;; i++)
|
||||||
|
{
|
||||||
|
ULONG numReturned = 0;
|
||||||
|
IWbemClassObject *object;
|
||||||
|
char *line;
|
||||||
|
|
||||||
|
hr = enumerator->lpVtbl->Next (enumerator, WBEM_INFINITE, 1, &object, &numReturned);
|
||||||
|
if (FAILED (hr) || numReturned == 0)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case QUERY_WMI_OS:
|
||||||
|
line = read_os_name (object);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case QUERY_WMI_CPU:
|
||||||
|
line = read_cpu_info (object);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case QUERY_WMI_VGA:
|
||||||
|
line = read_vga_name (object);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case QUERY_WMI_HDD:
|
||||||
|
line = read_hdd_info (object);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
object->lpVtbl->Release (object);
|
||||||
|
|
||||||
|
if (line != NULL)
|
||||||
|
{
|
||||||
|
if (atleast_one_appended)
|
||||||
|
{
|
||||||
|
g_string_append (result, ", ");
|
||||||
|
}
|
||||||
|
|
||||||
|
g_string_append (result, line);
|
||||||
|
|
||||||
|
g_free (line);
|
||||||
|
|
||||||
|
atleast_one_appended = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enumerator->lpVtbl->Release (enumerator);
|
||||||
|
|
||||||
|
release_query:
|
||||||
|
SysFreeString (query);
|
||||||
|
|
||||||
|
release_queryLanguageName:
|
||||||
|
SysFreeString (queryLanguageName);
|
||||||
|
|
||||||
|
release_namespaceUnknown:
|
||||||
|
namespaceUnknown->lpVtbl->Release (namespaceUnknown);
|
||||||
|
|
||||||
|
release_namespace:
|
||||||
|
namespace->lpVtbl->Release (namespace);
|
||||||
|
|
||||||
|
release_locator:
|
||||||
|
locator->lpVtbl->Release (locator);
|
||||||
|
SysFreeString (namespaceName);
|
||||||
|
|
||||||
|
exit:
|
||||||
|
if (result == NULL)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_string_free (result, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *read_os_name (IWbemClassObject *object)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
VARIANT caption_variant;
|
||||||
|
char *caption_utf8;
|
||||||
|
|
||||||
|
hr = object->lpVtbl->Get (object, L"Caption", 0, &caption_variant, NULL, NULL);
|
||||||
|
if (FAILED (hr))
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
caption_utf8 = bstr_to_utf8 (caption_variant.bstrVal);
|
||||||
|
|
||||||
|
VariantClear(&caption_variant);
|
||||||
|
|
||||||
|
if (caption_utf8 == NULL)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_strchomp (caption_utf8);
|
||||||
|
|
||||||
|
return caption_utf8;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *read_cpu_info (IWbemClassObject *object)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
VARIANT name_variant;
|
||||||
|
char *name_utf8;
|
||||||
|
VARIANT max_clock_speed_variant;
|
||||||
|
guint cpu_freq_mhz;
|
||||||
|
char *result;
|
||||||
|
|
||||||
|
hr = object->lpVtbl->Get (object, L"Name", 0, &name_variant, NULL, NULL);
|
||||||
|
if (FAILED (hr))
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
name_utf8 = bstr_to_utf8 (name_variant.bstrVal);
|
||||||
|
|
||||||
|
VariantClear (&name_variant);
|
||||||
|
|
||||||
|
if (name_utf8 == NULL)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr = object->lpVtbl->Get (object, L"MaxClockSpeed", 0, &max_clock_speed_variant, NULL, NULL);
|
||||||
|
if (FAILED (hr))
|
||||||
|
{
|
||||||
|
g_free (name_utf8);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
cpu_freq_mhz = max_clock_speed_variant.uintVal;
|
||||||
|
|
||||||
|
VariantClear (&max_clock_speed_variant);
|
||||||
|
|
||||||
|
if (cpu_freq_mhz > 1000)
|
||||||
|
{
|
||||||
|
result = g_strdup_printf ("%s (%.2fGHz)", name_utf8, cpu_freq_mhz / 1000.f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = g_strdup_printf ("%s (%" G_GUINT32_FORMAT "MHz)", name_utf8, cpu_freq_mhz);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_free (name_utf8);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *read_vga_name (IWbemClassObject *object)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
VARIANT name_variant;
|
||||||
|
char *name_utf8;
|
||||||
|
|
||||||
|
hr = object->lpVtbl->Get (object, L"Name", 0, &name_variant, NULL, NULL);
|
||||||
|
if (FAILED (hr))
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
name_utf8 = bstr_to_utf8 (name_variant.bstrVal);
|
||||||
|
|
||||||
|
VariantClear (&name_variant);
|
||||||
|
|
||||||
|
if (name_utf8 == NULL)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_strchomp (name_utf8);
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *read_hdd_info (IWbemClassObject *object)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
VARIANT name_variant;
|
||||||
|
BSTR name_bstr;
|
||||||
|
gsize name_len;
|
||||||
|
VARIANT capacity_variant;
|
||||||
|
guint64 capacity;
|
||||||
|
VARIANT free_space_variant;
|
||||||
|
guint64 free_space;
|
||||||
|
|
||||||
|
hr = object->lpVtbl->Get (object, L"Name", 0, &name_variant, NULL, NULL);
|
||||||
|
if (FAILED (hr))
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
name_bstr = name_variant.bstrVal;
|
||||||
|
name_len = SysStringLen (name_variant.bstrVal);
|
||||||
|
|
||||||
|
if (name_len >= 4 && name_bstr[0] == L'\\' && name_bstr[1] == L'\\' && name_bstr[2] == L'?' && name_bstr[3] == L'\\')
|
||||||
|
{
|
||||||
|
// This is not a named volume. Skip it.
|
||||||
|
VariantClear (&name_variant);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
VariantClear (&name_variant);
|
||||||
|
|
||||||
|
hr = object->lpVtbl->Get (object, L"Capacity", 0, &capacity_variant, NULL, NULL);
|
||||||
|
if (FAILED (hr))
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
capacity = variant_to_uint64 (&capacity_variant);
|
||||||
|
|
||||||
|
VariantClear (&capacity_variant);
|
||||||
|
|
||||||
|
if (capacity == 0)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr = object->lpVtbl->Get (object, L"FreeSpace", 0, &free_space_variant, NULL, NULL);
|
||||||
|
if (FAILED (hr))
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
free_space = variant_to_uint64 (&free_space_variant);
|
||||||
|
|
||||||
|
VariantClear (&free_space_variant);
|
||||||
|
|
||||||
|
if (free_space == 0)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
hdd_capacity += capacity;
|
||||||
|
hdd_free_space += free_space;
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *bstr_to_utf8 (BSTR bstr)
|
||||||
|
{
|
||||||
|
return g_utf16_to_utf8 (bstr, SysStringLen (bstr), NULL, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static guint64 variant_to_uint64 (VARIANT *variant)
|
||||||
|
{
|
||||||
|
switch (V_VT (variant))
|
||||||
|
{
|
||||||
|
case VT_UI8:
|
||||||
|
return variant->ullVal;
|
||||||
|
|
||||||
|
case VT_BSTR:
|
||||||
|
return wcstoull (variant->bstrVal, NULL, 10);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
@@ -527,9 +527,12 @@ log_create_pathname (char *servname, char *channame, char *netname)
|
|||||||
channame = log_create_filename (channame);
|
channame = log_create_filename (channame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
servname = log_create_filename (servname);
|
||||||
|
|
||||||
log_insert_vars (fname, sizeof (fname), prefs.hex_irc_logmask, channame, netname, servname);
|
log_insert_vars (fname, sizeof (fname), prefs.hex_irc_logmask, channame, netname, servname);
|
||||||
g_free (channame);
|
g_free (channame);
|
||||||
g_free (netname);
|
g_free (netname);
|
||||||
|
g_free (servname);
|
||||||
|
|
||||||
/* insert time/date */
|
/* insert time/date */
|
||||||
now = time (NULL);
|
now = time (NULL);
|
||||||
@@ -976,6 +979,11 @@ static char * const pevt_capack_help[] = {
|
|||||||
N_("Acknowledged Capabilities")
|
N_("Acknowledged Capabilities")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static char * const pevt_capdel_help[] = {
|
||||||
|
N_("Server Name"),
|
||||||
|
N_("Removed Capabilities")
|
||||||
|
};
|
||||||
|
|
||||||
static char * const pevt_caplist_help[] = {
|
static char * const pevt_caplist_help[] = {
|
||||||
N_("Server Name"),
|
N_("Server Name"),
|
||||||
N_("Server Capabilities")
|
N_("Server Capabilities")
|
||||||
@@ -1127,26 +1135,26 @@ static char * const pevt_chanrmlimit_help[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static char * const pevt_chandeop_help[] = {
|
static char * const pevt_chandeop_help[] = {
|
||||||
N_("The nick of the person of did the deop'ing"),
|
N_("The nick of the person who did the deop'ing"),
|
||||||
N_("The nick of the person who has been deop'ed"),
|
N_("The nick of the person who has been deop'ed"),
|
||||||
};
|
};
|
||||||
static char * const pevt_chandehop_help[] = {
|
static char * const pevt_chandehop_help[] = {
|
||||||
N_("The nick of the person of did the dehalfop'ing"),
|
N_("The nick of the person who did the dehalfop'ing"),
|
||||||
N_("The nick of the person who has been dehalfop'ed"),
|
N_("The nick of the person who has been dehalfop'ed"),
|
||||||
};
|
};
|
||||||
|
|
||||||
static char * const pevt_chandevoice_help[] = {
|
static char * const pevt_chandevoice_help[] = {
|
||||||
N_("The nick of the person of did the devoice'ing"),
|
N_("The nick of the person who did the devoice'ing"),
|
||||||
N_("The nick of the person who has been devoice'ed"),
|
N_("The nick of the person who has been devoice'ed"),
|
||||||
};
|
};
|
||||||
|
|
||||||
static char * const pevt_chanunban_help[] = {
|
static char * const pevt_chanunban_help[] = {
|
||||||
N_("The nick of the person of did the unban'ing"),
|
N_("The nick of the person who did the unban'ing"),
|
||||||
N_("The ban mask"),
|
N_("The ban mask"),
|
||||||
};
|
};
|
||||||
|
|
||||||
static char * const pevt_chanunquiet_help[] = {
|
static char * const pevt_chanunquiet_help[] = {
|
||||||
N_("The nick of the person of did the unquiet'ing"),
|
N_("The nick of the person who did the unquiet'ing"),
|
||||||
N_("The quiet mask"),
|
N_("The quiet mask"),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2134,7 +2142,7 @@ char *sound_files[NUM_XP];
|
|||||||
void
|
void
|
||||||
sound_beep (session *sess)
|
sound_beep (session *sess)
|
||||||
{
|
{
|
||||||
if (!prefs.hex_gui_focus_omitalerts || !fe_gui_info (sess, 0) == 1)
|
if (!prefs.hex_gui_focus_omitalerts || fe_gui_info (sess, 0) != 1)
|
||||||
{
|
{
|
||||||
if (sound_files[XP_TE_BEEP] && sound_files[XP_TE_BEEP][0])
|
if (sound_files[XP_TE_BEEP] && sound_files[XP_TE_BEEP][0])
|
||||||
/* user defined beep _file_ */
|
/* user defined beep _file_ */
|
||||||
|
@@ -28,6 +28,12 @@ pevt_capack_help
|
|||||||
%C29*%O$tCapabilities acknowledged: %C29$2%O
|
%C29*%O$tCapabilities acknowledged: %C29$2%O
|
||||||
2
|
2
|
||||||
|
|
||||||
|
Capability Deleted
|
||||||
|
XP_TE_CAPDEL
|
||||||
|
pevt_capdel_help
|
||||||
|
%C29*%O$tCapabilities removed: %C29$2%O
|
||||||
|
2
|
||||||
|
|
||||||
Capability List
|
Capability List
|
||||||
XP_TE_CAPLIST
|
XP_TE_CAPLIST
|
||||||
pevt_caplist_help
|
pevt_caplist_help
|
||||||
|
@@ -123,10 +123,11 @@ userlist_add_hostname (struct session *sess, char *nick, char *hostname,
|
|||||||
user = userlist_find (sess, nick);
|
user = userlist_find (sess, nick);
|
||||||
if (user)
|
if (user)
|
||||||
{
|
{
|
||||||
if (!user->hostname && hostname)
|
if (hostname && (!user->hostname || strcmp(user->hostname, hostname)))
|
||||||
{
|
{
|
||||||
if (prefs.hex_gui_ulist_show_hosts)
|
if (prefs.hex_gui_ulist_show_hosts)
|
||||||
do_rehash = TRUE;
|
do_rehash = TRUE;
|
||||||
|
g_free (user->hostname);
|
||||||
user->hostname = g_strdup (hostname);
|
user->hostname = g_strdup (hostname);
|
||||||
}
|
}
|
||||||
if (!user->realname && realname && *realname)
|
if (!user->realname && realname && *realname)
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <sys/timeb.h>
|
#include <sys/timeb.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <VersionHelpers.h>
|
#include "./sysinfo/sysinfo.h"
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
@@ -56,8 +56,6 @@
|
|||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/blowfish.h>
|
|
||||||
#include <openssl/aes.h>
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -246,11 +244,11 @@ expand_homedir (char *file)
|
|||||||
|
|
||||||
if (file[0] == '~')
|
if (file[0] == '~')
|
||||||
{
|
{
|
||||||
|
char *slash_pos;
|
||||||
|
|
||||||
if (file[1] == '\0' || file[1] == '/')
|
if (file[1] == '\0' || file[1] == '/')
|
||||||
return g_strconcat (g_get_home_dir (), &file[1], NULL);
|
return g_strconcat (g_get_home_dir (), &file[1], NULL);
|
||||||
|
|
||||||
char *slash_pos;
|
|
||||||
|
|
||||||
user = g_strdup(file);
|
user = g_strdup(file);
|
||||||
|
|
||||||
slash_pos = strchr(user, '/');
|
slash_pos = strchr(user, '/');
|
||||||
@@ -458,158 +456,38 @@ get_cpu_info (double *mhz, int *cpus)
|
|||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
static int
|
|
||||||
get_mhz (void)
|
|
||||||
{
|
|
||||||
HKEY hKey;
|
|
||||||
int result, data, dataSize;
|
|
||||||
|
|
||||||
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "Hardware\\Description\\System\\"
|
|
||||||
"CentralProcessor\\0", 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
dataSize = sizeof (data);
|
|
||||||
result = RegQueryValueEx (hKey, "~MHz", 0, 0, (LPBYTE)&data, &dataSize);
|
|
||||||
RegCloseKey (hKey);
|
|
||||||
if (result == ERROR_SUCCESS)
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
return 0; /* fails on Win9x */
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
get_cpu_arch (void)
|
get_cpu_arch (void)
|
||||||
{
|
{
|
||||||
SYSTEM_INFO si;
|
return sysinfo_get_build_arch ();
|
||||||
|
|
||||||
GetSystemInfo (&si);
|
|
||||||
|
|
||||||
if (si.wProcessorArchitecture == 9)
|
|
||||||
{
|
|
||||||
return 64;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return 86;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
get_sys_str (int with_cpu)
|
get_sys_str (int with_cpu)
|
||||||
{
|
{
|
||||||
static char verbuf[64];
|
static char *without_cpu_buffer = NULL;
|
||||||
static char winver[20];
|
static char *with_cpu_buffer = NULL;
|
||||||
double mhz;
|
|
||||||
|
|
||||||
/* Broken since major bumped to 10, should start to work eventually.
|
if (with_cpu == 0)
|
||||||
* No, IsWindowsVersionOrGreater (10, 0, 0) doesn't work either.
|
|
||||||
* TODO: replace with IsWindows10OrGreater() once added to the SDK.
|
|
||||||
*/
|
|
||||||
if (IsWindowsVersionOrGreater (6, 4, 0))
|
|
||||||
{
|
{
|
||||||
if (IsWindowsServer ())
|
if (without_cpu_buffer == NULL)
|
||||||
{
|
{
|
||||||
strcpy (winver, "Server 10");
|
without_cpu_buffer = sysinfo_get_os ();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
return without_cpu_buffer;
|
||||||
strcpy (winver, "10");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (IsWindows8Point1OrGreater ())
|
|
||||||
{
|
|
||||||
if (IsWindowsServer ())
|
|
||||||
{
|
|
||||||
strcpy (winver, "Server 2012 R2");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcpy (winver, "8.1");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (IsWindows8OrGreater ())
|
|
||||||
{
|
|
||||||
if (IsWindowsServer ())
|
|
||||||
{
|
|
||||||
strcpy (winver, "Server 2012");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcpy (winver, "8");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (IsWindows7SP1OrGreater ())
|
|
||||||
{
|
|
||||||
if (IsWindowsServer ())
|
|
||||||
{
|
|
||||||
strcpy (winver, "Server 2008 R2 SP1");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcpy (winver, "7 SP1");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (IsWindows7OrGreater ())
|
|
||||||
{
|
|
||||||
if (IsWindowsServer ())
|
|
||||||
{
|
|
||||||
strcpy (winver, "Server 2008 R2");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcpy (winver, "7");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (IsWindowsVistaSP2OrGreater ())
|
|
||||||
{
|
|
||||||
if (IsWindowsServer ())
|
|
||||||
{
|
|
||||||
strcpy (winver, "Server 2008 SP2");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcpy (winver, "Vista SP2");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (IsWindowsVistaSP1OrGreater ())
|
|
||||||
{
|
|
||||||
if (IsWindowsServer ())
|
|
||||||
{
|
|
||||||
strcpy (winver, "Server 2008 SP1");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcpy (winver, "Vista SP1");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (IsWindowsVistaOrGreater ())
|
|
||||||
{
|
|
||||||
if (IsWindowsServer ())
|
|
||||||
{
|
|
||||||
strcpy (winver, "Server 2008");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcpy (winver, "Vista");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcpy (winver, "Unknown");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mhz = get_mhz ();
|
if (with_cpu_buffer == NULL)
|
||||||
if (mhz && with_cpu)
|
|
||||||
{
|
{
|
||||||
double cpuspeed = ( mhz > 1000 ) ? mhz / 1000 : mhz;
|
char *os = sysinfo_get_os ();
|
||||||
const char *cpuspeedstr = ( mhz > 1000 ) ? "GHz" : "MHz";
|
char *cpu = sysinfo_get_cpu ();
|
||||||
sprintf (verbuf, "Windows %s [%.2f%s]", winver, cpuspeed, cpuspeedstr);
|
with_cpu_buffer = g_strconcat (os, " [", cpu, "]", NULL);
|
||||||
}
|
g_free (cpu);
|
||||||
else
|
g_free (os);
|
||||||
{
|
|
||||||
sprintf (verbuf, "Windows %s", winver);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return verbuf;
|
return with_cpu_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -1462,14 +1340,24 @@ int
|
|||||||
portable_mode (void)
|
portable_mode (void)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
if ((_access( "portable-mode", 0 )) != -1)
|
static int is_portable = -1;
|
||||||
|
|
||||||
|
if (G_UNLIKELY(is_portable == -1))
|
||||||
{
|
{
|
||||||
return 1;
|
char *path = g_win32_get_package_installation_directory_of_module (NULL);
|
||||||
}
|
char *filename;
|
||||||
else
|
|
||||||
{
|
if (path == NULL)
|
||||||
return 0;
|
path = g_strdup (".");
|
||||||
|
|
||||||
|
filename = g_build_filename (path, "portable-mode", NULL);
|
||||||
|
is_portable = g_file_test (filename, G_FILE_TEST_EXISTS);
|
||||||
|
|
||||||
|
g_free (path);
|
||||||
|
g_free (filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return is_portable;
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -1503,227 +1391,6 @@ encode_sasl_pass_plain (char *user, char *pass)
|
|||||||
return encoded;
|
return encoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_OPENSSL
|
|
||||||
/* Adapted from ZNC's SASL module */
|
|
||||||
|
|
||||||
static int
|
|
||||||
parse_dh (char *str, DH **dh_out, unsigned char **secret_out, int *keysize_out)
|
|
||||||
{
|
|
||||||
DH *dh;
|
|
||||||
guchar *data, *decoded_data;
|
|
||||||
guchar *secret = NULL;
|
|
||||||
gsize data_len;
|
|
||||||
guint size;
|
|
||||||
guint16 size16;
|
|
||||||
BIGNUM *pubkey;
|
|
||||||
gint key_size;
|
|
||||||
|
|
||||||
dh = DH_new();
|
|
||||||
data = decoded_data = g_base64_decode (str, &data_len);
|
|
||||||
if (data_len < 2)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
/* prime number */
|
|
||||||
memcpy (&size16, data, sizeof(size16));
|
|
||||||
size = ntohs (size16);
|
|
||||||
data += 2;
|
|
||||||
data_len -= 2;
|
|
||||||
|
|
||||||
if (size > data_len)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
dh->p = BN_bin2bn (data, size, NULL);
|
|
||||||
data += size;
|
|
||||||
|
|
||||||
/* Generator */
|
|
||||||
if (data_len < 2)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
memcpy (&size16, data, sizeof(size16));
|
|
||||||
size = ntohs (size16);
|
|
||||||
data += 2;
|
|
||||||
data_len -= 2;
|
|
||||||
|
|
||||||
if (size > data_len)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
dh->g = BN_bin2bn (data, size, NULL);
|
|
||||||
data += size;
|
|
||||||
|
|
||||||
/* pub key */
|
|
||||||
if (data_len < 2)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
memcpy (&size16, data, sizeof(size16));
|
|
||||||
size = ntohs(size16);
|
|
||||||
data += 2;
|
|
||||||
data_len -= 2;
|
|
||||||
|
|
||||||
pubkey = BN_bin2bn (data, size, NULL);
|
|
||||||
if (!(DH_generate_key (dh)))
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
secret = g_malloc (DH_size (dh));
|
|
||||||
key_size = DH_compute_key (secret, pubkey, dh);
|
|
||||||
if (key_size == -1)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
g_free (decoded_data);
|
|
||||||
|
|
||||||
*dh_out = dh;
|
|
||||||
*secret_out = secret;
|
|
||||||
*keysize_out = key_size;
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
fail:
|
|
||||||
g_free (secret);
|
|
||||||
g_free (decoded_data);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *
|
|
||||||
encode_sasl_pass_blowfish (char *user, char *pass, char *data)
|
|
||||||
{
|
|
||||||
DH *dh;
|
|
||||||
char *response, *ret = NULL;
|
|
||||||
unsigned char *secret;
|
|
||||||
unsigned char *encrypted_pass;
|
|
||||||
char *plain_pass;
|
|
||||||
BF_KEY key;
|
|
||||||
int key_size, length;
|
|
||||||
int pass_len = strlen (pass) + (8 - (strlen (pass) % 8));
|
|
||||||
int user_len = strlen (user);
|
|
||||||
guint16 size16;
|
|
||||||
char *in_ptr, *out_ptr;
|
|
||||||
|
|
||||||
if (!parse_dh (data, &dh, &secret, &key_size))
|
|
||||||
return NULL;
|
|
||||||
BF_set_key (&key, key_size, secret);
|
|
||||||
|
|
||||||
encrypted_pass = g_malloc0 (pass_len);
|
|
||||||
plain_pass = g_malloc0 (pass_len);
|
|
||||||
memcpy (plain_pass, pass, strlen(pass));
|
|
||||||
out_ptr = (char*)encrypted_pass;
|
|
||||||
in_ptr = (char*)plain_pass;
|
|
||||||
|
|
||||||
for (length = pass_len; length; length -= 8, in_ptr += 8, out_ptr += 8)
|
|
||||||
BF_ecb_encrypt ((unsigned char*)in_ptr, (unsigned char*)out_ptr, &key, BF_ENCRYPT);
|
|
||||||
|
|
||||||
/* Create response */
|
|
||||||
length = 2 + BN_num_bytes (dh->pub_key) + pass_len + user_len + 1;
|
|
||||||
response = g_malloc0 (length);
|
|
||||||
out_ptr = response;
|
|
||||||
|
|
||||||
/* our key */
|
|
||||||
size16 = htons ((guint16)BN_num_bytes (dh->pub_key));
|
|
||||||
memcpy (out_ptr, &size16, sizeof(size16));
|
|
||||||
out_ptr += 2;
|
|
||||||
BN_bn2bin (dh->pub_key, (guchar*)out_ptr);
|
|
||||||
out_ptr += BN_num_bytes (dh->pub_key);
|
|
||||||
|
|
||||||
/* username */
|
|
||||||
memcpy (out_ptr, user, user_len + 1);
|
|
||||||
out_ptr += user_len + 1;
|
|
||||||
|
|
||||||
/* pass */
|
|
||||||
memcpy (out_ptr, encrypted_pass, pass_len);
|
|
||||||
|
|
||||||
ret = g_base64_encode ((const guchar*)response, length);
|
|
||||||
|
|
||||||
g_free (response);
|
|
||||||
|
|
||||||
DH_free(dh);
|
|
||||||
g_free (plain_pass);
|
|
||||||
g_free (encrypted_pass);
|
|
||||||
g_free (secret);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *
|
|
||||||
encode_sasl_pass_aes (char *user, char *pass, char *data)
|
|
||||||
{
|
|
||||||
DH *dh;
|
|
||||||
AES_KEY key;
|
|
||||||
char *response = NULL;
|
|
||||||
char *out_ptr, *ret = NULL;
|
|
||||||
unsigned char *secret, *ptr;
|
|
||||||
unsigned char *encrypted_userpass, *plain_userpass;
|
|
||||||
int key_size, length;
|
|
||||||
guint16 size16;
|
|
||||||
unsigned char iv[16], iv_copy[16];
|
|
||||||
int user_len = strlen (user) + 1;
|
|
||||||
int pass_len = strlen (pass) + 1;
|
|
||||||
int len = user_len + pass_len;
|
|
||||||
int padlen = 16 - (len % 16);
|
|
||||||
int userpass_len = len + padlen;
|
|
||||||
|
|
||||||
if (!parse_dh (data, &dh, &secret, &key_size))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
encrypted_userpass = g_malloc0 (userpass_len);
|
|
||||||
plain_userpass = g_malloc0 (userpass_len);
|
|
||||||
|
|
||||||
/* create message */
|
|
||||||
/* format of: <username>\0<password>\0<padding> */
|
|
||||||
ptr = plain_userpass;
|
|
||||||
memcpy (ptr, user, user_len);
|
|
||||||
ptr += user_len;
|
|
||||||
memcpy (ptr, pass, pass_len);
|
|
||||||
ptr += pass_len;
|
|
||||||
if (padlen)
|
|
||||||
{
|
|
||||||
/* Padding */
|
|
||||||
unsigned char randbytes[16];
|
|
||||||
if (!RAND_bytes (randbytes, padlen))
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
memcpy (ptr, randbytes, padlen);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!RAND_bytes (iv, sizeof (iv)))
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
memcpy (iv_copy, iv, sizeof(iv));
|
|
||||||
|
|
||||||
/* Encrypt */
|
|
||||||
AES_set_encrypt_key (secret, key_size * 8, &key);
|
|
||||||
AES_cbc_encrypt(plain_userpass, encrypted_userpass, userpass_len, &key, iv_copy, AES_ENCRYPT);
|
|
||||||
|
|
||||||
/* Create response */
|
|
||||||
/* format of: <size pubkey><pubkey><iv (always 16 bytes)><ciphertext> */
|
|
||||||
length = 2 + key_size + sizeof(iv) + userpass_len;
|
|
||||||
response = g_malloc (length);
|
|
||||||
out_ptr = response;
|
|
||||||
|
|
||||||
/* our key */
|
|
||||||
size16 = htons ((guint16)key_size);
|
|
||||||
memcpy (out_ptr, &size16, sizeof(size16));
|
|
||||||
out_ptr += 2;
|
|
||||||
BN_bn2bin (dh->pub_key, (guchar*)out_ptr);
|
|
||||||
out_ptr += key_size;
|
|
||||||
|
|
||||||
/* iv */
|
|
||||||
memcpy (out_ptr, iv, sizeof(iv));
|
|
||||||
out_ptr += sizeof(iv);
|
|
||||||
|
|
||||||
/* userpass */
|
|
||||||
memcpy (out_ptr, encrypted_userpass, userpass_len);
|
|
||||||
|
|
||||||
ret = g_base64_encode ((const guchar*)response, length);
|
|
||||||
|
|
||||||
end:
|
|
||||||
DH_free (dh);
|
|
||||||
g_free (plain_userpass);
|
|
||||||
g_free (encrypted_userpass);
|
|
||||||
g_free (secret);
|
|
||||||
g_free (response);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_OPENSSL
|
#ifdef USE_OPENSSL
|
||||||
static char *
|
static char *
|
||||||
str_sha256hash (char *string)
|
str_sha256hash (char *string)
|
||||||
|
@@ -76,9 +76,7 @@ void canonalize_key (char *key);
|
|||||||
int portable_mode (void);
|
int portable_mode (void);
|
||||||
int unity_mode (void);
|
int unity_mode (void);
|
||||||
char *encode_sasl_pass_plain (char *user, char *pass);
|
char *encode_sasl_pass_plain (char *user, char *pass);
|
||||||
char *encode_sasl_pass_blowfish (char *user, char *pass, char *data);
|
|
||||||
char *encode_sasl_pass_aes (char *user, char *pass, char *data);
|
|
||||||
char *challengeauth_response (char *username, char *password, char *challenge);
|
char *challengeauth_response (char *username, char *password, char *challenge);
|
||||||
size_t strftime_validated (char *dest, size_t destsize, const char *format, const struct tm *time);
|
size_t strftime_validated (char *dest, size_t destsize, const char *format, const struct tm *time);
|
||||||
size_t strftime_utf8 (char *dest, size_t destsize, const char *format, time_t time);
|
gsize strftime_utf8 (char *dest, gsize destsize, const char *format, time_t time);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -7,17 +7,16 @@ bin_PROGRAMS = hexchat
|
|||||||
|
|
||||||
AM_CPPFLAGS = $(GUI_CFLAGS) -DLOCALEDIR=\"$(localedir)\"
|
AM_CPPFLAGS = $(GUI_CFLAGS) -DLOCALEDIR=\"$(localedir)\"
|
||||||
|
|
||||||
hexchat_LDADD = ../common/libhexchatcommon.a $(GUI_LIBS)
|
hexchat_LDADD = $(top_builddir)/src/common/libhexchatcommon.a $(GUI_LIBS)
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
ascii.h banlist.h chanlist.h chanview.h chanview-tabs.c \
|
ascii.h banlist.h chanlist.h chanview.h chanview-tabs.c \
|
||||||
chanview-tree.c custom-list.h editlist.h fe-gtk.h fkeys.h gtkutil.h joind.h \
|
chanview-tree.c custom-list.h editlist.h fe-gtk.h fkeys.h gtkutil.h joind.h \
|
||||||
maingui.h menu.h notifygui.h notifications palette.h pixmaps.h plugin-notification.h \
|
maingui.h menu.h notifygui.h notifications palette.h pixmaps.h plugin-notification.h \
|
||||||
plugin-tray.h plugingui.c plugingui.h rawlog.h sexy-iso-codes.h \
|
plugin-tray.h plugingui.c plugingui.h rawlog.h servlistgui.h setup.h sexy-iso-codes.h \
|
||||||
sexy-spell-entry.h textgui.h urlgrab.h userlistgui.h xtext.h \
|
sexy-spell-entry.h textgui.h urlgrab.h userlistgui.h xtext.h
|
||||||
../../data/hexchat.gresource.xml
|
|
||||||
|
|
||||||
BUILT_SOURCES = resources.c
|
BUILT_SOURCES = resources.h resources.c
|
||||||
|
|
||||||
CLEANFILES = $(BUILT_SOURCES)
|
CLEANFILES = $(BUILT_SOURCES)
|
||||||
|
|
||||||
@@ -40,15 +39,23 @@ notify_c = notifications/notification-dummy.c
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
nodist_hexchat_SOURCES = resources.h resources.c
|
||||||
hexchat_SOURCES = ascii.c banlist.c chanlist.c chanview.c custom-list.c \
|
hexchat_SOURCES = ascii.c banlist.c chanlist.c chanview.c custom-list.c \
|
||||||
dccgui.c editlist.c fe-gtk.c fkeys.c gtkutil.c ignoregui.c joind.c menu.c \
|
dccgui.c editlist.c fe-gtk.c fkeys.c gtkutil.c ignoregui.c joind.c menu.c \
|
||||||
maingui.c notifygui.c $(notify_c) palette.c pixmaps.c plugin-tray.c $(plugingui_c) \
|
maingui.c notifygui.c $(notify_c) palette.c pixmaps.c plugin-tray.c $(plugingui_c) \
|
||||||
plugin-notification.c rawlog.c resources.c servlistgui.c setup.c $(iso_codes_c) \
|
plugin-notification.c rawlog.c servlistgui.c setup.c $(iso_codes_c) \
|
||||||
sexy-spell-entry.c textgui.c urlgrab.c userlistgui.c xtext.c
|
sexy-spell-entry.c textgui.c urlgrab.c userlistgui.c xtext.c
|
||||||
hexchat_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/common
|
hexchat_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/common
|
||||||
|
|
||||||
resources.c: $(top_srcdir)/data/hexchat.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/data --generate-dependencies $(top_srcdir)/data/hexchat.gresource.xml)
|
resources_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/data --generate-dependencies $(top_srcdir)/data/hexchat.gresource.xml)
|
||||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(top_srcdir)/data --generate-source $<
|
|
||||||
|
resources.h: $(top_srcdir)/data/hexchat.gresource.xml $(resources_files)
|
||||||
|
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(top_srcdir)/data --generate-header --manual-register $<
|
||||||
|
|
||||||
|
resources.c: $(top_srcdir)/data/hexchat.gresource.xml $(resources_files)
|
||||||
|
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(top_srcdir)/data --generate-source --manual-register $<
|
||||||
|
|
||||||
|
EXTRA_DIST += $(resources_files)
|
||||||
|
|
||||||
if DO_STATIC_ANALYSIS
|
if DO_STATIC_ANALYSIS
|
||||||
analyze_plists = $(hexchat_SOURCES:%.c=%.plist)
|
analyze_plists = $(hexchat_SOURCES:%.c=%.plist)
|
||||||
|
@@ -468,7 +468,7 @@ fe_input_remove (int tag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
fe_input_add (int sok, int flags, void *func, void *data)
|
fe_input_add (int sok, int flags, GIOFunc func, void *data)
|
||||||
{
|
{
|
||||||
int tag, type = 0;
|
int tag, type = 0;
|
||||||
GIOChannel *channel;
|
GIOChannel *channel;
|
||||||
@@ -489,7 +489,7 @@ fe_input_add (int sok, int flags, void *func, void *data)
|
|||||||
if (flags & FIA_EX)
|
if (flags & FIA_EX)
|
||||||
type |= G_IO_PRI;
|
type |= G_IO_PRI;
|
||||||
|
|
||||||
tag = g_io_add_watch (channel, type, (GIOFunc) func, data);
|
tag = g_io_add_watch (channel, type, func, data);
|
||||||
g_io_channel_unref (channel);
|
g_io_channel_unref (channel);
|
||||||
|
|
||||||
return tag;
|
return tag;
|
||||||
@@ -852,7 +852,7 @@ fe_ctrl_gui (session *sess, fe_gui_action action, int arg)
|
|||||||
mg_detach (sess, arg); /* arg: 0=toggle 1=detach 2=attach */
|
mg_detach (sess, arg); /* arg: 0=toggle 1=detach 2=attach */
|
||||||
break;
|
break;
|
||||||
case FE_GUI_APPLY:
|
case FE_GUI_APPLY:
|
||||||
setup_apply_real (TRUE, TRUE, TRUE);
|
setup_apply_real (TRUE, TRUE, TRUE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -39,14 +39,13 @@
|
|||||||
|
|
||||||
#define flag_c flag_wid[0]
|
#define flag_c flag_wid[0]
|
||||||
#define flag_n flag_wid[1]
|
#define flag_n flag_wid[1]
|
||||||
#define flag_r flag_wid[2]
|
#define flag_t flag_wid[2]
|
||||||
#define flag_t flag_wid[3]
|
#define flag_i flag_wid[3]
|
||||||
#define flag_i flag_wid[4]
|
#define flag_m flag_wid[4]
|
||||||
#define flag_m flag_wid[5]
|
#define flag_l flag_wid[5]
|
||||||
#define flag_l flag_wid[6]
|
#define flag_k flag_wid[6]
|
||||||
#define flag_k flag_wid[7]
|
#define flag_b flag_wid[7]
|
||||||
#define flag_b flag_wid[8]
|
#define NUM_FLAG_WIDS 8
|
||||||
#define NUM_FLAG_WIDS 9
|
|
||||||
|
|
||||||
#ifdef HAVE_GTK_MAC
|
#ifdef HAVE_GTK_MAC
|
||||||
extern GtkosxApplication *osx_app;
|
extern GtkosxApplication *osx_app;
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
@@ -29,29 +29,25 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<!-- WholeProgramOptimization must be turned off for gresource constructors to work, otherwise the .CRT$XCU section is not emitted. -->
|
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>..\common;$(HexChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\common;$(HexChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>$(DepLibs);$(HexChatLib)common.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>$(DepLibs);$(HexChatLib)common.lib;wbemuuid.lib;comsupp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<!-- WholeProgramOptimization must be turned off for gresource constructors to work, otherwise the .CRT$XCU section is not emitted. -->
|
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
|
||||||
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>..\common;$(HexChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\common;$(HexChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<DisableSpecificWarnings>4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<AdditionalDependencies>$(DepLibs);$(HexChatLib)common.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>$(DepLibs);$(HexChatLib)common.lib;wbemuuid.lib;comsupp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
|
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
@@ -62,7 +58,8 @@ SET SOLUTIONDIR=$(SolutionDir)..\
|
|||||||
powershell -File "$(SolutionDir)..\win32\version-template.ps1" "$(SolutionDir)..\src\fe-gtk\hexchat.rc.tt" "$(HexChatLib)hexchat.rc.utf8"
|
powershell -File "$(SolutionDir)..\win32\version-template.ps1" "$(SolutionDir)..\src\fe-gtk\hexchat.rc.tt" "$(HexChatLib)hexchat.rc.utf8"
|
||||||
REM hexchat.rc needs to be in UCS-2 or Resource Compiler will complain
|
REM hexchat.rc needs to be in UCS-2 or Resource Compiler will complain
|
||||||
powershell "Get-Content -Encoding UTF8 '$(HexChatLib)hexchat.rc.utf8' | Out-File '$(HexChatLib)hexchat.rc'; Remove-Item '$(HexChatLib)hexchat.rc.utf8'"
|
powershell "Get-Content -Encoding UTF8 '$(HexChatLib)hexchat.rc.utf8' | Out-File '$(HexChatLib)hexchat.rc'; Remove-Item '$(HexChatLib)hexchat.rc.utf8'"
|
||||||
"$(DepsRoot)\bin\glib-compile-resources.exe" --generate-source --sourcedir "$(DataDir)" --target "$(HexChatLib)resources.c" "$(DataDir)hexchat.gresource.xml"
|
"$(DepsRoot)\bin\glib-compile-resources.exe" --generate-header --manual-register --sourcedir "$(DataDir)" --target "$(HexChatLib)resources.h" "$(DataDir)hexchat.gresource.xml"
|
||||||
|
"$(DepsRoot)\bin\glib-compile-resources.exe" --generate-source --manual-register --sourcedir "$(DataDir)" --target "$(HexChatLib)resources.c" "$(DataDir)hexchat.gresource.xml"
|
||||||
]]></Command>
|
]]></Command>
|
||||||
<Message>Build hexchat.rc and gresource file</Message>
|
<Message>Build hexchat.rc and gresource file</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
|
@@ -1409,10 +1409,21 @@ key_action_tab_clean(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For use in sorting the user list for completion */
|
/* For use in sorting the user list for completion
|
||||||
|
|
||||||
|
This sorts everyone by the last talked time except your own nick
|
||||||
|
which is forced to the bottom of the list to avoid completing your
|
||||||
|
own name, which is very unlikely.
|
||||||
|
*/
|
||||||
static int
|
static int
|
||||||
talked_recent_cmp (struct User *a, struct User *b)
|
talked_recent_cmp (struct User *a, struct User *b)
|
||||||
{
|
{
|
||||||
|
if (a->me)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (b->me)
|
||||||
|
return 1;
|
||||||
|
|
||||||
if (a->lasttalk < b->lasttalk)
|
if (a->lasttalk < b->lasttalk)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@@ -78,7 +78,7 @@ static void mg_link_irctab (session *sess, int focus);
|
|||||||
static session_gui static_mg_gui;
|
static session_gui static_mg_gui;
|
||||||
static session_gui *mg_gui = NULL; /* the shared irc tab */
|
static session_gui *mg_gui = NULL; /* the shared irc tab */
|
||||||
static int ignore_chanmode = FALSE;
|
static int ignore_chanmode = FALSE;
|
||||||
static const char chan_flags[] = { 'c', 'n', 'r', 't', 'i', 'm', 'l', 'k' };
|
static const char chan_flags[] = { 'c', 'n', 't', 'i', 'm', 'l', 'k' };
|
||||||
|
|
||||||
static chan *active_tab = NULL; /* active tab */
|
static chan *active_tab = NULL; /* active tab */
|
||||||
GtkWidget *parent_window = NULL; /* the master window */
|
GtkWidget *parent_window = NULL; /* the master window */
|
||||||
@@ -2003,17 +2003,24 @@ mg_flagbutton_cb (GtkWidget *but, char *flag)
|
|||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
mg_create_flagbutton (char *tip, GtkWidget *box, char *face)
|
mg_create_flagbutton (char *tip, GtkWidget *box, char *face)
|
||||||
{
|
{
|
||||||
GtkWidget *wid;
|
GtkWidget *btn, *lbl;
|
||||||
|
char label_markup[16];
|
||||||
|
|
||||||
wid = gtk_toggle_button_new_with_label (face);
|
g_snprintf (label_markup, sizeof(label_markup), "<tt>%s</tt>", face);
|
||||||
gtk_widget_set_size_request (wid, 18, 0);
|
lbl = gtk_label_new (NULL);
|
||||||
gtk_widget_set_tooltip_text (wid, tip);
|
gtk_label_set_markup (GTK_LABEL(lbl), label_markup);
|
||||||
gtk_box_pack_start (GTK_BOX (box), wid, 0, 0, 0);
|
|
||||||
g_signal_connect (G_OBJECT (wid), "toggled",
|
btn = gtk_toggle_button_new ();
|
||||||
|
gtk_widget_set_size_request (btn, -1, 0);
|
||||||
|
gtk_widget_set_tooltip_text (btn, tip);
|
||||||
|
gtk_container_add (GTK_CONTAINER(btn), lbl);
|
||||||
|
|
||||||
|
gtk_box_pack_start (GTK_BOX (box), btn, 0, 0, 0);
|
||||||
|
g_signal_connect (G_OBJECT (btn), "toggled",
|
||||||
G_CALLBACK (mg_flagbutton_cb), face);
|
G_CALLBACK (mg_flagbutton_cb), face);
|
||||||
show_and_unfocus (wid);
|
show_and_unfocus (btn);
|
||||||
|
|
||||||
return wid;
|
return btn;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -2068,7 +2075,6 @@ mg_create_chanmodebuttons (session_gui *gui, GtkWidget *box)
|
|||||||
{
|
{
|
||||||
gui->flag_c = mg_create_flagbutton (_("Filter Colors"), box, "c");
|
gui->flag_c = mg_create_flagbutton (_("Filter Colors"), box, "c");
|
||||||
gui->flag_n = mg_create_flagbutton (_("No outside messages"), box, "n");
|
gui->flag_n = mg_create_flagbutton (_("No outside messages"), box, "n");
|
||||||
gui->flag_r = mg_create_flagbutton (_("Registered Only"), box, "r");
|
|
||||||
gui->flag_t = mg_create_flagbutton (_("Topic Protection"), box, "t");
|
gui->flag_t = mg_create_flagbutton (_("Topic Protection"), box, "t");
|
||||||
gui->flag_i = mg_create_flagbutton (_("Invite Only"), box, "i");
|
gui->flag_i = mg_create_flagbutton (_("Invite Only"), box, "i");
|
||||||
gui->flag_m = mg_create_flagbutton (_("Moderated"), box, "m");
|
gui->flag_m = mg_create_flagbutton (_("Moderated"), box, "m");
|
||||||
@@ -2942,7 +2948,7 @@ mg_create_search(session *sess, GtkWidget *box)
|
|||||||
gtk_box_pack_start(GTK_BOX(gui->shbox), next, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(gui->shbox), next, FALSE, FALSE, 0);
|
||||||
g_signal_connect(G_OBJECT(next), "clicked", G_CALLBACK(mg_search_handle_next), sess);
|
g_signal_connect(G_OBJECT(next), "clicked", G_CALLBACK(mg_search_handle_next), sess);
|
||||||
|
|
||||||
highlight = gtk_check_button_new_with_mnemonic (_("Highlight _all"));
|
highlight = gtk_check_button_new_with_mnemonic (_("_Highlight all"));
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(highlight), prefs.hex_text_search_highlight_all);
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(highlight), prefs.hex_text_search_highlight_all);
|
||||||
gtk_widget_set_can_focus (highlight, FALSE);
|
gtk_widget_set_can_focus (highlight, FALSE);
|
||||||
g_signal_connect (G_OBJECT (highlight), "toggled", G_CALLBACK (search_set_option), &prefs.hex_text_search_highlight_all);
|
g_signal_connect (G_OBJECT (highlight), "toggled", G_CALLBACK (search_set_option), &prefs.hex_text_search_highlight_all);
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@@ -110,7 +110,7 @@ palette_load (void)
|
|||||||
char prefname[256];
|
char prefname[256];
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *cfg;
|
char *cfg;
|
||||||
int red, green, blue;
|
guint16 red, green, blue;
|
||||||
|
|
||||||
fh = hexchat_open_file ("colors.conf", O_RDONLY, 0, 0);
|
fh = hexchat_open_file ("colors.conf", O_RDONLY, 0, 0);
|
||||||
if (fh != -1)
|
if (fh != -1)
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
#include "../common/cfgfiles.h"
|
#include "../common/cfgfiles.h"
|
||||||
#include "../common/hexchat.h"
|
#include "../common/hexchat.h"
|
||||||
#include "../common/fe.h"
|
#include "../common/fe.h"
|
||||||
|
#include "resources.h"
|
||||||
|
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||||
@@ -108,6 +109,8 @@ load_pixmap (const char *filename)
|
|||||||
void
|
void
|
||||||
pixmaps_init (void)
|
pixmaps_init (void)
|
||||||
{
|
{
|
||||||
|
hexchat_register_resource();
|
||||||
|
|
||||||
pix_ulist_voice = load_pixmap ("ulist_voice");
|
pix_ulist_voice = load_pixmap ("ulist_voice");
|
||||||
pix_ulist_halfop = load_pixmap ("ulist_halfop");
|
pix_ulist_halfop = load_pixmap ("ulist_halfop");
|
||||||
pix_ulist_op = load_pixmap ("ulist_op");
|
pix_ulist_op = load_pixmap ("ulist_op");
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
#include "../common/userlist.h"
|
#include "../common/userlist.h"
|
||||||
#include "../common/util.h"
|
#include "../common/util.h"
|
||||||
#include "../common/hexchatc.h"
|
#include "../common/hexchatc.h"
|
||||||
|
#include "../common/outbound.h"
|
||||||
#include "fe-gtk.h"
|
#include "fe-gtk.h"
|
||||||
#include "gtkutil.h"
|
#include "gtkutil.h"
|
||||||
#include "maingui.h"
|
#include "maingui.h"
|
||||||
@@ -657,6 +658,16 @@ static const setting network_settings[] =
|
|||||||
{ST_END, 0, 0, 0, 0, 0}
|
{ST_END, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const setting identd_settings[] =
|
||||||
|
{
|
||||||
|
{ST_HEADER, N_("Identd Server"), 0, 0, 0, 0},
|
||||||
|
{ST_TOGGLE, N_("Enabled"), P_OFFINTNL(hex_identd_server), N_("Server will respond with the networks username"), 0, 1},
|
||||||
|
{ST_NUMBER, N_("Port:"), P_OFFINTNL(hex_identd_port), N_("You must have permissions to listen on this port. "
|
||||||
|
"If not 113 (0 defaults to this) then you must configure port-forwarding."), 0, 65535},
|
||||||
|
|
||||||
|
{ST_END, 0, 0, 0, 0, 0}
|
||||||
|
};
|
||||||
|
|
||||||
#define setup_get_str(pr,set) (((char *)pr)+set->offset)
|
#define setup_get_str(pr,set) (((char *)pr)+set->offset)
|
||||||
#define setup_get_int(pr,set) *(((int *)pr)+set->offset)
|
#define setup_get_int(pr,set) *(((int *)pr)+set->offset)
|
||||||
#define setup_get_int3(pr,off) *(((int *)pr)+off)
|
#define setup_get_int3(pr,off) *(((int *)pr)+off)
|
||||||
@@ -1169,8 +1180,8 @@ setup_entry_cb (GtkEntry *entry, setting *set)
|
|||||||
{
|
{
|
||||||
int size;
|
int size;
|
||||||
int pos;
|
int pos;
|
||||||
int len = gtk_entry_get_text_length (entry);
|
|
||||||
unsigned char *p = (unsigned char*)gtk_entry_get_text (entry);
|
unsigned char *p = (unsigned char*)gtk_entry_get_text (entry);
|
||||||
|
int len = strlen (p);
|
||||||
|
|
||||||
/* need to truncate? */
|
/* need to truncate? */
|
||||||
if (len >= set->extra)
|
if (len >= set->extra)
|
||||||
@@ -1867,6 +1878,7 @@ static const char *const cata[] =
|
|||||||
N_("Network"),
|
N_("Network"),
|
||||||
N_("Network setup"),
|
N_("Network setup"),
|
||||||
N_("File transfers"),
|
N_("File transfers"),
|
||||||
|
N_("Identd"),
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
@@ -1909,6 +1921,7 @@ setup_create_pages (GtkWidget *box)
|
|||||||
|
|
||||||
setup_add_page (cata[15], book, setup_create_page (network_settings));
|
setup_add_page (cata[15], book, setup_create_page (network_settings));
|
||||||
setup_add_page (cata[16], book, setup_create_page (filexfer_settings));
|
setup_add_page (cata[16], book, setup_create_page (filexfer_settings));
|
||||||
|
setup_add_page (cata[17], book, setup_create_page (identd_settings));
|
||||||
|
|
||||||
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (book), FALSE);
|
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (book), FALSE);
|
||||||
gtk_notebook_set_show_border (GTK_NOTEBOOK (book), FALSE);
|
gtk_notebook_set_show_border (GTK_NOTEBOOK (book), FALSE);
|
||||||
@@ -2070,7 +2083,7 @@ unslash (char *dir)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
setup_apply_real (int new_pix, int do_ulist, int do_layout)
|
setup_apply_real (int new_pix, int do_ulist, int do_layout, int do_identd)
|
||||||
{
|
{
|
||||||
GSList *list;
|
GSList *list;
|
||||||
session *sess;
|
session *sess;
|
||||||
@@ -2122,6 +2135,9 @@ setup_apply_real (int new_pix, int do_ulist, int do_layout)
|
|||||||
|
|
||||||
if (do_layout)
|
if (do_layout)
|
||||||
menu_change_layout ();
|
menu_change_layout ();
|
||||||
|
|
||||||
|
if (do_identd)
|
||||||
|
handle_command (current_sess, "IDENTD reload", FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -2136,6 +2152,7 @@ setup_apply (struct hexchatprefs *pr)
|
|||||||
int noapply = FALSE;
|
int noapply = FALSE;
|
||||||
int do_ulist = FALSE;
|
int do_ulist = FALSE;
|
||||||
int do_layout = FALSE;
|
int do_layout = FALSE;
|
||||||
|
int do_identd = FALSE;
|
||||||
|
|
||||||
if (strcmp (pr->hex_text_background, prefs.hex_text_background) != 0)
|
if (strcmp (pr->hex_text_background, prefs.hex_text_background) != 0)
|
||||||
new_pix = TRUE;
|
new_pix = TRUE;
|
||||||
@@ -2184,6 +2201,9 @@ setup_apply (struct hexchatprefs *pr)
|
|||||||
if (DIFF (hex_gui_tab_layout))
|
if (DIFF (hex_gui_tab_layout))
|
||||||
do_layout = TRUE;
|
do_layout = TRUE;
|
||||||
|
|
||||||
|
if (DIFF (hex_identd_server) || DIFF (hex_identd_port))
|
||||||
|
do_identd = TRUE;
|
||||||
|
|
||||||
if (color_change || (DIFF (hex_gui_ulist_color)) || (DIFF (hex_away_size_max)) || (DIFF (hex_away_track)))
|
if (color_change || (DIFF (hex_gui_ulist_color)) || (DIFF (hex_away_size_max)) || (DIFF (hex_away_track)))
|
||||||
do_ulist = TRUE;
|
do_ulist = TRUE;
|
||||||
|
|
||||||
@@ -2225,7 +2245,7 @@ setup_apply (struct hexchatprefs *pr)
|
|||||||
strcpy (prefs.hex_irc_real_name, "realname");
|
strcpy (prefs.hex_irc_real_name, "realname");
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_apply_real (new_pix, do_ulist, do_layout);
|
setup_apply_real (new_pix, do_ulist, do_layout, do_identd);
|
||||||
|
|
||||||
if (noapply)
|
if (noapply)
|
||||||
fe_message (_("Some settings were changed that require a"
|
fe_message (_("Some settings were changed that require a"
|
||||||
|
@@ -20,6 +20,6 @@
|
|||||||
#ifndef HEXCHAT_SETUP_H
|
#ifndef HEXCHAT_SETUP_H
|
||||||
#define HEXCHAT_SETUP_H
|
#define HEXCHAT_SETUP_H
|
||||||
|
|
||||||
void setup_apply_real (int new_pix, int do_ulist, int do_layout);
|
void setup_apply_real (int new_pix, int do_ulist, int do_layout, int do_identd);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -141,6 +141,8 @@ enum
|
|||||||
};
|
};
|
||||||
static guint signals[LAST_SIGNAL] = {0};
|
static guint signals[LAST_SIGNAL] = {0};
|
||||||
|
|
||||||
|
static PangoAttrList *empty_attrs_list = NULL;
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
spell_accumulator(GSignalInvocationHint *hint, GValue *return_accu, const GValue *handler_return, gpointer data)
|
spell_accumulator(GSignalInvocationHint *hint, GValue *return_accu, const GValue *handler_return, gpointer data)
|
||||||
{
|
{
|
||||||
@@ -248,6 +250,11 @@ sexy_spell_entry_class_init(SexySpellEntryClass *klass)
|
|||||||
_hexchat_marshal_BOOLEAN__STRING,
|
_hexchat_marshal_BOOLEAN__STRING,
|
||||||
G_TYPE_BOOLEAN,
|
G_TYPE_BOOLEAN,
|
||||||
1, G_TYPE_STRING);
|
1, G_TYPE_STRING);
|
||||||
|
|
||||||
|
if (empty_attrs_list == NULL)
|
||||||
|
{
|
||||||
|
empty_attrs_list = pango_attr_list_new ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1040,7 +1047,7 @@ sexy_spell_entry_recheck_all(SexySpellEntry *entry)
|
|||||||
{
|
{
|
||||||
/* Check for attributes */
|
/* Check for attributes */
|
||||||
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||||
text_len = gtk_entry_get_text_length (GTK_ENTRY (entry));
|
text_len = strlen (text);
|
||||||
check_attributes (entry, text, text_len);
|
check_attributes (entry, text, text_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1080,7 +1087,14 @@ sexy_spell_entry_expose(GtkWidget *widget, GdkEventExpose *event)
|
|||||||
|
|
||||||
|
|
||||||
layout = gtk_entry_get_layout(gtk_entry);
|
layout = gtk_entry_get_layout(gtk_entry);
|
||||||
pango_layout_set_attributes(layout, entry->priv->attr_list);
|
if (gtk_entry->preedit_length == 0)
|
||||||
|
{
|
||||||
|
pango_layout_set_attributes(layout, entry->priv->attr_list);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pango_layout_set_attributes(layout, empty_attrs_list);
|
||||||
|
}
|
||||||
|
|
||||||
return GTK_WIDGET_CLASS(parent_class)->expose_event (widget, event);
|
return GTK_WIDGET_CLASS(parent_class)->expose_event (widget, event);
|
||||||
}
|
}
|
||||||
|
@@ -113,6 +113,7 @@ char *nocasestrstr (const char *text, const char *tofind); /* util.c */
|
|||||||
int xtext_get_stamp_str (time_t, char **);
|
int xtext_get_stamp_str (time_t, char **);
|
||||||
static void gtk_xtext_render_page (GtkXText * xtext);
|
static void gtk_xtext_render_page (GtkXText * xtext);
|
||||||
static void gtk_xtext_calc_lines (xtext_buffer *buf, int);
|
static void gtk_xtext_calc_lines (xtext_buffer *buf, int);
|
||||||
|
static gboolean gtk_xtext_is_selecting (GtkXText *xtext);
|
||||||
static char *gtk_xtext_selection_get_text (GtkXText *xtext, int *len_ret);
|
static char *gtk_xtext_selection_get_text (GtkXText *xtext, int *len_ret);
|
||||||
static textentry *gtk_xtext_nth (GtkXText *xtext, int line, int *subline);
|
static textentry *gtk_xtext_nth (GtkXText *xtext, int line, int *subline);
|
||||||
static void gtk_xtext_adjustment_changed (GtkAdjustment * adj,
|
static void gtk_xtext_adjustment_changed (GtkAdjustment * adj,
|
||||||
@@ -838,7 +839,6 @@ find_x (GtkXText *xtext, textentry *ent, int x, int subline, int indent)
|
|||||||
int off, len, wid, mbl, mbw;
|
int off, len, wid, mbl, mbw;
|
||||||
|
|
||||||
/* Skip to the first chunk of stuff for the subline */
|
/* Skip to the first chunk of stuff for the subline */
|
||||||
list = ent->slp;
|
|
||||||
if (subline > 0)
|
if (subline > 0)
|
||||||
{
|
{
|
||||||
suboff = GPOINTER_TO_INT (g_slist_nth_data (ent->sublines, subline - 1));
|
suboff = GPOINTER_TO_INT (g_slist_nth_data (ent->sublines, subline - 1));
|
||||||
@@ -855,6 +855,8 @@ find_x (GtkXText *xtext, textentry *ent, int x, int subline, int indent)
|
|||||||
list = ent->slp;
|
list = ent->slp;
|
||||||
}
|
}
|
||||||
/* Step to the first character of the subline */
|
/* Step to the first character of the subline */
|
||||||
|
if (list == NULL)
|
||||||
|
return 0;
|
||||||
meta = list->data;
|
meta = list->data;
|
||||||
off = meta->off;
|
off = meta->off;
|
||||||
len = meta->len;
|
len = meta->len;
|
||||||
@@ -943,12 +945,12 @@ gtk_xtext_find_x (GtkXText * xtext, int x, textentry * ent, int subline,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static textentry *
|
static textentry *
|
||||||
gtk_xtext_find_char (GtkXText * xtext, int x, int y, int *off,
|
gtk_xtext_find_char (GtkXText * xtext, int x, int y, int *off, int *out_of_bounds)
|
||||||
int *out_of_bounds, int *ret_subline)
|
|
||||||
{
|
{
|
||||||
textentry *ent;
|
textentry *ent;
|
||||||
int line;
|
int line;
|
||||||
int subline;
|
int subline;
|
||||||
|
int outofbounds;
|
||||||
|
|
||||||
/* Adjust y value for negative rounding, double to int */
|
/* Adjust y value for negative rounding, double to int */
|
||||||
if (y < 0)
|
if (y < 0)
|
||||||
@@ -960,10 +962,9 @@ gtk_xtext_find_char (GtkXText * xtext, int x, int y, int *off,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (off)
|
if (off)
|
||||||
*off = gtk_xtext_find_x (xtext, x, ent, subline, line, out_of_bounds);
|
*off = gtk_xtext_find_x (xtext, x, ent, subline, line, &outofbounds);
|
||||||
|
if (out_of_bounds)
|
||||||
if (ret_subline)
|
*out_of_bounds = outofbounds;
|
||||||
*ret_subline = subline;
|
|
||||||
|
|
||||||
return ent;
|
return ent;
|
||||||
}
|
}
|
||||||
@@ -1058,14 +1059,14 @@ gtk_xtext_paint (GtkWidget *widget, GdkRectangle *area)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ent_start = gtk_xtext_find_char (xtext, area->x, area->y, NULL, NULL, NULL);
|
ent_start = gtk_xtext_find_char (xtext, area->x, area->y, NULL, NULL);
|
||||||
if (!ent_start)
|
if (!ent_start)
|
||||||
{
|
{
|
||||||
xtext_draw_bg (xtext, area->x, area->y, area->width, area->height);
|
xtext_draw_bg (xtext, area->x, area->y, area->width, area->height);
|
||||||
goto xit;
|
goto xit;
|
||||||
}
|
}
|
||||||
ent_end = gtk_xtext_find_char (xtext, area->x + area->width,
|
ent_end = gtk_xtext_find_char (xtext, area->x + area->width,
|
||||||
area->y + area->height, NULL, NULL, NULL);
|
area->y + area->height, NULL, NULL);
|
||||||
if (!ent_end)
|
if (!ent_end)
|
||||||
ent_end = xtext->buffer->text_last;
|
ent_end = xtext->buffer->text_last;
|
||||||
|
|
||||||
@@ -1253,13 +1254,14 @@ lamejump:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* marking upward? */
|
/* marking upward? */
|
||||||
else if (xtext->buffer->last_ent_end == end_ent &&
|
else if (xtext->buffer->last_ent_start != NULL &&
|
||||||
|
xtext->buffer->last_ent_end == end_ent &&
|
||||||
xtext->buffer->last_offset_end == end_offset)
|
xtext->buffer->last_offset_end == end_offset)
|
||||||
{
|
{
|
||||||
ent = end_ent;
|
ent = end_ent;
|
||||||
while (ent)
|
while (ent)
|
||||||
{
|
{
|
||||||
if (ent == start_ent)
|
if (ent == start_ent && xtext->buffer->last_ent_start)
|
||||||
{
|
{
|
||||||
gtk_xtext_selection_up (xtext, xtext->buffer->last_ent_start, ent, start_offset);
|
gtk_xtext_selection_up (xtext, xtext->buffer->last_ent_start, ent, start_offset);
|
||||||
/*gtk_xtext_render_ents (xtext, xtext->buffer->last_ent_start, ent);*/
|
/*gtk_xtext_render_ents (xtext, xtext->buffer->last_ent_start, ent);*/
|
||||||
@@ -1308,99 +1310,104 @@ gtk_xtext_selection_draw (GtkXText * xtext, GdkEventMotion * event, gboolean ren
|
|||||||
textentry *ent;
|
textentry *ent;
|
||||||
textentry *ent_end;
|
textentry *ent_end;
|
||||||
textentry *ent_start;
|
textentry *ent_start;
|
||||||
int offset_start;
|
int offset_start = 0;
|
||||||
int offset_end;
|
int offset_end = 0;
|
||||||
int subline_start;
|
textentry *low_ent, *high_ent;
|
||||||
int subline_end;
|
int low_x, low_y, low_offs;
|
||||||
int oob;
|
int high_x, high_y, high_offs, high_len;
|
||||||
int marking_up = FALSE;
|
|
||||||
int len_start;
|
|
||||||
int len_end;
|
|
||||||
|
|
||||||
ent_start = gtk_xtext_find_char (xtext, xtext->select_start_x, xtext->select_start_y, &offset_start, &oob, &subline_start);
|
if (xtext->buffer->text_first == NULL)
|
||||||
ent_end = gtk_xtext_find_char (xtext, xtext->select_end_x, xtext->select_end_y, &offset_end, &oob, &subline_end);
|
|
||||||
|
|
||||||
if ((!ent_start || !ent_end) && !xtext->buffer->text_last && xtext->adj->value != xtext->buffer->old_value)
|
|
||||||
{
|
|
||||||
gtk_xtext_render_page (xtext);
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (!ent_start)
|
ent_start = gtk_xtext_find_char (xtext, xtext->select_start_x, xtext->select_start_y, &offset_start, NULL);
|
||||||
{
|
ent_end = gtk_xtext_find_char (xtext, xtext->select_end_x, xtext->select_end_y, &offset_end, NULL);
|
||||||
ent_start = xtext->buffer->text_last;
|
if (ent_start == NULL && ent_end == NULL)
|
||||||
offset_start = ent_start->str_len;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (!ent_end)
|
if ((ent_start != ent_end && xtext->select_start_y > xtext->select_end_y) || /* different entries */
|
||||||
|
(ent_start == ent_end && offset_start > offset_end)) /* same entry, different character offsets */
|
||||||
{
|
{
|
||||||
ent_end = xtext->buffer->text_last;
|
/* marking up */
|
||||||
offset_end = ent_end->str_len;
|
low_ent = ent_end;
|
||||||
|
low_x = xtext->select_end_x;
|
||||||
|
low_y = xtext->select_end_y;
|
||||||
|
low_offs = offset_end;
|
||||||
|
high_ent = ent_start;
|
||||||
|
high_x = xtext->select_start_x;
|
||||||
|
high_y = xtext->select_start_y;
|
||||||
|
high_offs = offset_start;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if ((ent_start != ent_end && xtext->select_start_y > xtext->select_end_y) || /* different entries */
|
|
||||||
(ent_start == ent_end && subline_start > subline_end) || /* different lines */
|
|
||||||
(ent_start == ent_end && subline_start == subline_end && xtext->select_start_x > xtext->select_end_x)) /* marking to the left */
|
|
||||||
{
|
{
|
||||||
marking_up = TRUE;
|
/* marking down */
|
||||||
|
low_ent = ent_start;
|
||||||
|
low_x = xtext->select_start_x;
|
||||||
|
low_y = xtext->select_start_y;
|
||||||
|
low_offs = offset_start;
|
||||||
|
high_ent = ent_end;
|
||||||
|
high_x = xtext->select_end_x;
|
||||||
|
high_y = xtext->select_end_y;
|
||||||
|
high_offs = offset_end;
|
||||||
|
}
|
||||||
|
if (low_ent == NULL)
|
||||||
|
{
|
||||||
|
low_ent = xtext->buffer->text_first;
|
||||||
|
low_offs = 0;
|
||||||
|
}
|
||||||
|
if (high_ent == NULL)
|
||||||
|
{
|
||||||
|
high_ent = xtext->buffer->text_last;
|
||||||
|
high_offs = high_ent->str_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* word selection */
|
/* word selection */
|
||||||
if (xtext->word_select)
|
if (xtext->word_select)
|
||||||
{
|
{
|
||||||
/* a word selection cannot be started if the cursor is out of bounds in gtk_xtext_button_press */
|
/* a word selection cannot be started if the cursor is out of bounds in gtk_xtext_button_press */
|
||||||
gtk_xtext_get_word (xtext, xtext->select_start_x, xtext->select_start_y, NULL, &offset_start, &len_start, NULL);
|
gtk_xtext_get_word (xtext, low_x, low_y, NULL, &low_offs, NULL, NULL);
|
||||||
|
|
||||||
/* in case the cursor is out of bounds we keep offset_end from gtk_xtext_find_char and fix the length */
|
/* in case the cursor is out of bounds we keep offset_end from gtk_xtext_find_char and fix the length */
|
||||||
if (gtk_xtext_get_word (xtext, xtext->select_end_x, xtext->select_end_y, NULL, &offset_end, &len_end, NULL) == NULL)
|
if (gtk_xtext_get_word (xtext, high_x, high_y, NULL, &high_offs, &high_len, NULL) == NULL)
|
||||||
len_end = offset_end == ent_end->str_len? 0: -1; /* -1 for the space, 0 if at the end */
|
high_len = high_offs == high_ent->str_len? 0: -1; /* -1 for the space, 0 if at the end */
|
||||||
|
high_offs += high_len;
|
||||||
if (!marking_up)
|
if (low_y < 0)
|
||||||
offset_end += len_end;
|
low_offs = xtext->buffer->last_offset_start;
|
||||||
else
|
if (high_y > xtext->buffer->window_height)
|
||||||
offset_start += len_start;
|
high_offs = xtext->buffer->last_offset_end;
|
||||||
}
|
}
|
||||||
/* line/ent selection */
|
/* line/ent selection */
|
||||||
else if (xtext->line_select)
|
else if (xtext->line_select)
|
||||||
{
|
{
|
||||||
offset_start = marking_up? ent_start->str_len: 0;
|
low_offs = 0;
|
||||||
offset_end = marking_up? 0: ent_end->str_len;
|
high_offs = high_ent->str_len;
|
||||||
}
|
}
|
||||||
|
/* character selection */
|
||||||
if (marking_up)
|
else
|
||||||
{
|
{
|
||||||
int temp;
|
if (low_y < 0)
|
||||||
|
low_offs = xtext->buffer->last_offset_start;
|
||||||
/* ensure ent_start is above ent_end */
|
if (high_y > xtext->buffer->window_height)
|
||||||
if (ent_start != ent_end)
|
high_offs = xtext->buffer->last_offset_end;
|
||||||
{
|
|
||||||
ent = ent_start;
|
|
||||||
ent_start = ent_end;
|
|
||||||
ent_end = ent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* switch offsets as well */
|
|
||||||
temp = offset_start;
|
|
||||||
offset_start = offset_end;
|
|
||||||
offset_end = temp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set all the old mark_ fields to -1 */
|
/* set all the old mark_ fields to -1 */
|
||||||
gtk_xtext_selection_clear (xtext->buffer);
|
gtk_xtext_selection_clear (xtext->buffer);
|
||||||
|
|
||||||
/* set the default values */
|
low_ent->mark_start = low_offs;
|
||||||
ent_start->mark_end = ent_start->str_len;
|
low_ent->mark_end = high_offs;
|
||||||
ent_end->mark_start = 0;
|
|
||||||
|
|
||||||
/* set the calculated values (this overwrites the default values if we're on the same ent) */
|
if (low_ent != high_ent)
|
||||||
ent_start->mark_start = offset_start;
|
|
||||||
ent_end->mark_end = offset_end;
|
|
||||||
|
|
||||||
/* set all the mark_ fields of the ents within the selection */
|
|
||||||
if (ent_start != ent_end)
|
|
||||||
{
|
{
|
||||||
ent = ent_start->next;
|
low_ent->mark_end = low_ent->str_len;
|
||||||
while (ent && ent != ent_end)
|
if (high_offs != 0)
|
||||||
|
{
|
||||||
|
high_ent->mark_start = 0;
|
||||||
|
high_ent->mark_end = high_offs;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* set all the mark_ fields of the ents within the selection */
|
||||||
|
ent = low_ent->next;
|
||||||
|
while (ent && ent != high_ent)
|
||||||
{
|
{
|
||||||
ent->mark_start = 0;
|
ent->mark_start = 0;
|
||||||
ent->mark_end = ent->str_len;
|
ent->mark_end = ent->str_len;
|
||||||
@@ -1409,7 +1416,7 @@ gtk_xtext_selection_draw (GtkXText * xtext, GdkEventMotion * event, gboolean ren
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (render)
|
if (render)
|
||||||
gtk_xtext_selection_render (xtext, ent_start, ent_end);
|
gtk_xtext_selection_render (xtext, low_ent, high_ent);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -1541,7 +1548,7 @@ gtk_xtext_get_word (GtkXText * xtext, int x, int y, textentry ** ret_ent,
|
|||||||
int out_of_bounds = 0;
|
int out_of_bounds = 0;
|
||||||
int len_to_offset = 0;
|
int len_to_offset = 0;
|
||||||
|
|
||||||
ent = gtk_xtext_find_char (xtext, x, y, &offset, &out_of_bounds, NULL);
|
ent = gtk_xtext_find_char (xtext, x, y, &offset, &out_of_bounds);
|
||||||
if (ent == NULL || out_of_bounds || offset < 0 || offset >= ent->str_len)
|
if (ent == NULL || out_of_bounds || offset < 0 || offset >= ent->str_len)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@@ -1766,7 +1773,6 @@ gtk_xtext_motion_notify (GtkWidget * widget, GdkEventMotion * event)
|
|||||||
xtext->select_end_x = x;
|
xtext->select_end_x = x;
|
||||||
xtext->select_end_y = y;
|
xtext->select_end_y = y;
|
||||||
gtk_xtext_selection_update (xtext, event, y, !redraw);
|
gtk_xtext_selection_update (xtext, event, y, !redraw);
|
||||||
xtext->hilighting = TRUE;
|
|
||||||
|
|
||||||
/* user has pressed or released SHIFT, must redraw entire selection */
|
/* user has pressed or released SHIFT, must redraw entire selection */
|
||||||
if (redraw)
|
if (redraw)
|
||||||
@@ -1967,13 +1973,10 @@ gtk_xtext_button_release (GtkWidget * widget, GdkEventButton * event)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!xtext->hilighting)
|
if (!gtk_xtext_is_selecting (xtext))
|
||||||
{
|
{
|
||||||
word = gtk_xtext_get_word (xtext, event->x, event->y, 0, 0, 0, 0);
|
word = gtk_xtext_get_word (xtext, event->x, event->y, 0, 0, 0, 0);
|
||||||
g_signal_emit (G_OBJECT (xtext), xtext_signals[WORD_CLICK], 0, word ? word : NULL, event);
|
g_signal_emit (G_OBJECT (xtext), xtext_signals[WORD_CLICK], 0, word ? word : NULL, event);
|
||||||
} else
|
|
||||||
{
|
|
||||||
xtext->hilighting = FALSE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2072,6 +2075,28 @@ gtk_xtext_selection_kill (GtkXText *xtext, GdkEventSelection *event)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gtk_xtext_is_selecting (GtkXText *xtext)
|
||||||
|
{
|
||||||
|
textentry *ent;
|
||||||
|
xtext_buffer *buf;
|
||||||
|
|
||||||
|
buf = xtext->selection_buffer;
|
||||||
|
if (!buf)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
for (ent = buf->last_ent_start; ent; ent = ent->next)
|
||||||
|
{
|
||||||
|
if (ent->mark_start != -1 && ent->mark_end - ent->mark_start > 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
if (ent == buf->last_ent_end)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
gtk_xtext_selection_get_text (GtkXText *xtext, int *len_ret)
|
gtk_xtext_selection_get_text (GtkXText *xtext, int *len_ret)
|
||||||
{
|
{
|
||||||
@@ -4202,7 +4227,6 @@ gtk_xtext_search_textentry (xtext_buffer *buf, textentry *ent)
|
|||||||
|
|
||||||
hay = match? g_strdup (str): g_utf8_casefold (str, lstr);
|
hay = match? g_strdup (str): g_utf8_casefold (str, lstr);
|
||||||
lhay = strlen (hay);
|
lhay = strlen (hay);
|
||||||
off = 0;
|
|
||||||
|
|
||||||
for (pos = hay, len = lhay; len;
|
for (pos = hay, len = lhay; len;
|
||||||
off += buf->search_lnee, pos = hay + off, len = lhay - off)
|
off += buf->search_lnee, pos = hay + off, len = lhay - off)
|
||||||
@@ -4644,8 +4668,8 @@ gtk_xtext_append_indent (xtext_buffer *buf,
|
|||||||
if (right_len == -1)
|
if (right_len == -1)
|
||||||
right_len = strlen (right_text);
|
right_len = strlen (right_text);
|
||||||
|
|
||||||
if (right_len >= sizeof (buf->xtext->scratch_buffer))
|
if (left_len + right_len + 2 >= sizeof (buf->xtext->scratch_buffer))
|
||||||
right_len = sizeof (buf->xtext->scratch_buffer) - 1;
|
right_len = sizeof (buf->xtext->scratch_buffer) - left_len - 2;
|
||||||
|
|
||||||
if (right_text[right_len-1] == '\n')
|
if (right_text[right_len-1] == '\n')
|
||||||
right_len--;
|
right_len--;
|
||||||
@@ -4665,13 +4689,18 @@ gtk_xtext_append_indent (xtext_buffer *buf,
|
|||||||
ent->str_len = left_len + 1 + right_len;
|
ent->str_len = left_len + 1 + right_len;
|
||||||
ent->indent = (buf->indent - left_width) - buf->xtext->space_width;
|
ent->indent = (buf->indent - left_width) - buf->xtext->space_width;
|
||||||
|
|
||||||
|
/* This is copied into the scratch buffer later, double check math */
|
||||||
|
g_assert (ent->str_len < sizeof (buf->xtext->scratch_buffer));
|
||||||
|
|
||||||
if (buf->time_stamp)
|
if (buf->time_stamp)
|
||||||
space = buf->xtext->stamp_width;
|
space = buf->xtext->stamp_width;
|
||||||
else
|
else
|
||||||
space = 0;
|
space = 0;
|
||||||
|
|
||||||
/* do we need to auto adjust the separator position? */
|
/* do we need to auto adjust the separator position? */
|
||||||
if (buf->xtext->auto_indent && ent->indent < MARGIN + space)
|
if (buf->xtext->auto_indent &&
|
||||||
|
buf->indent < buf->xtext->max_auto_indent &&
|
||||||
|
ent->indent < MARGIN + space)
|
||||||
{
|
{
|
||||||
tempindent = MARGIN + space + buf->xtext->space_width + left_width;
|
tempindent = MARGIN + space + buf->xtext->space_width + left_width;
|
||||||
|
|
||||||
@@ -4752,8 +4781,11 @@ gtk_xtext_lastlog (xtext_buffer *out, xtext_buffer *search_area)
|
|||||||
gtk_xtext_append (out, ent->str, ent->str_len, 0);
|
gtk_xtext_append (out, ent->str, ent->str_len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
out->text_last->stamp = ent->stamp;
|
if (out->text_last)
|
||||||
gtk_xtext_search_textentry_add (out, out->text_last, gl, TRUE);
|
{
|
||||||
|
out->text_last->stamp = ent->stamp;
|
||||||
|
gtk_xtext_search_textentry_add (out, out->text_last, gl, TRUE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ent = ent->next;
|
ent = ent->next;
|
||||||
}
|
}
|
||||||
@@ -4947,6 +4979,7 @@ gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf, int render)
|
|||||||
if (buf->window_width != w)
|
if (buf->window_width != w)
|
||||||
{
|
{
|
||||||
buf->window_width = w;
|
buf->window_width = w;
|
||||||
|
buf->window_height = h;
|
||||||
gtk_xtext_calc_lines (buf, FALSE);
|
gtk_xtext_calc_lines (buf, FALSE);
|
||||||
if (buf->scrollbar_down)
|
if (buf->scrollbar_down)
|
||||||
gtk_adjustment_set_value (xtext->adj, xtext->adj->upper -
|
gtk_adjustment_set_value (xtext->adj, xtext->adj->upper -
|
||||||
|
@@ -219,7 +219,6 @@ struct _GtkXText
|
|||||||
unsigned int word_select:1;
|
unsigned int word_select:1;
|
||||||
unsigned int line_select:1;
|
unsigned int line_select:1;
|
||||||
unsigned int button_down:1;
|
unsigned int button_down:1;
|
||||||
unsigned int hilighting:1;
|
|
||||||
unsigned int dont_render:1;
|
unsigned int dont_render:1;
|
||||||
unsigned int dont_render2:1;
|
unsigned int dont_render2:1;
|
||||||
unsigned int cursor_hand:1;
|
unsigned int cursor_hand:1;
|
||||||
|
@@ -4,6 +4,6 @@ bin_PROGRAMS = hexchat-text
|
|||||||
|
|
||||||
AM_CPPFLAGS = $(COMMON_CFLAGS) -DLOCALEDIR=\"$(localedir)\"
|
AM_CPPFLAGS = $(COMMON_CFLAGS) -DLOCALEDIR=\"$(localedir)\"
|
||||||
|
|
||||||
hexchat_text_LDADD = ../common/libhexchatcommon.a $(COMMON_LIBS)
|
hexchat_text_LDADD = $(top_builddir)/src/common/libhexchatcommon.a $(COMMON_LIBS)
|
||||||
hexchat_text_SOURCES = fe-text.c fe-text.h
|
hexchat_text_SOURCES = fe-text.c fe-text.h
|
||||||
|
|
||||||
|
@@ -422,7 +422,7 @@ fe_input_remove (int tag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
fe_input_add (int sok, int flags, void *func, void *data)
|
fe_input_add (int sok, int flags, GIOFunc func, void *data)
|
||||||
{
|
{
|
||||||
int tag, type = 0;
|
int tag, type = 0;
|
||||||
GIOChannel *channel;
|
GIOChannel *channel;
|
||||||
@@ -443,7 +443,7 @@ fe_input_add (int sok, int flags, void *func, void *data)
|
|||||||
if (flags & FIA_EX)
|
if (flags & FIA_EX)
|
||||||
type |= G_IO_PRI;
|
type |= G_IO_PRI;
|
||||||
|
|
||||||
tag = g_io_add_watch (channel, type, (GIOFunc) func, data);
|
tag = g_io_add_watch (channel, type, func, data);
|
||||||
g_io_channel_unref (channel);
|
g_io_channel_unref (channel);
|
||||||
|
|
||||||
return tag;
|
return tag;
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>$(DepLibs);$(HexChatLib)common.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>$(DepLibs);$(HexChatLib)common.lib;wbemuuid.lib;comsupp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<AdditionalDependencies>$(DepLibs);$(HexChatLib)common.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>$(DepLibs);$(HexChatLib)common.lib;wbemuuid.lib;comsupp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
2
src/htm/Properties/Resources.Designer.cs
generated
@@ -1,7 +1,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.17626
|
// Runtime Version:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
|
4
src/htm/Properties/Settings.Designer.cs
generated
@@ -1,7 +1,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:4.0.30319.17626
|
// Runtime Version:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
@@ -12,7 +12,7 @@ namespace thememan.Properties {
|
|||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||||
@@ -12,8 +12,9 @@
|
|||||||
<AssemblyName>thememan</AssemblyName>
|
<AssemblyName>thememan</AssemblyName>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
<TargetFrameworkProfile>
|
||||||
|
</TargetFrameworkProfile>
|
||||||
<PublishUrl>publish\</PublishUrl>
|
<PublishUrl>publish\</PublishUrl>
|
||||||
<Install>true</Install>
|
<Install>true</Install>
|
||||||
<InstallFrom>Disk</InstallFrom>
|
<InstallFrom>Disk</InstallFrom>
|
||||||
@@ -40,6 +41,7 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<CodeAnalysisIgnoreGeneratedCode>false</CodeAnalysisIgnoreGeneratedCode>
|
<CodeAnalysisIgnoreGeneratedCode>false</CodeAnalysisIgnoreGeneratedCode>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationIcon>Resources\htm.ico</ApplicationIcon>
|
<ApplicationIcon>Resources\htm.ico</ApplicationIcon>
|
||||||
@@ -68,6 +70,7 @@
|
|||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<CodeAnalysisIgnoreGeneratedCode>false</CodeAnalysisIgnoreGeneratedCode>
|
<CodeAnalysisIgnoreGeneratedCode>false</CodeAnalysisIgnoreGeneratedCode>
|
||||||
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<Import Project="..\..\win32\hexchat.props" />
|
<Import Project="..\..\win32\hexchat.props" />
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
@@ -27,6 +27,8 @@
|
|||||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||||
<!--This Id value indicates the application supports Windows 8.1 functionality-->
|
<!--This Id value indicates the application supports Windows 8.1 functionality-->
|
||||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||||
|
<!--This Id value indicates the application supports Windows 10 functionality-->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||||
</application>
|
</application>
|
||||||
</compatibility>
|
</compatibility>
|
||||||
</assembly>
|
</assembly>
|
@@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
<!-- SPECIFY YOUR DEPENDENCY DIRECTORIES HERE -->
|
<!-- SPECIFY YOUR DEPENDENCY DIRECTORIES HERE -->
|
||||||
|
|
||||||
<YourDepsPath>c:\mozilla-build\hexchat\gtk</YourDepsPath>
|
<YourDepsPath>c:\gtk-build\gtk</YourDepsPath>
|
||||||
<YourGendefPath>c:\mozilla-build\gendef</YourGendefPath>
|
<YourGendefPath>c:\gtk-build\gendef</YourGendefPath>
|
||||||
<YourMsgfmtPath>c:\mozilla-build\msgfmt</YourMsgfmtPath>
|
<YourMsgfmtPath>c:\gtk-build\msgfmt</YourMsgfmtPath>
|
||||||
<YourPerlPath>c:\mozilla-build\perl-5.20</YourPerlPath>
|
<YourPerlPath>c:\gtk-build\perl-5.20</YourPerlPath>
|
||||||
<YourPython2Path>c:\mozilla-build\python-2.7</YourPython2Path>
|
<YourPython2Path>c:\gtk-build\python-2.7</YourPython2Path>
|
||||||
<YourPython3Path>c:\mozilla-build\python-3.4</YourPython3Path>
|
<YourPython3Path>c:\gtk-build\python-3.4</YourPython3Path>
|
||||||
<YourWinSparklePath>c:\mozilla-build\WinSparkle</YourWinSparklePath>
|
<YourWinSparklePath>c:\gtk-build\WinSparkle</YourWinSparklePath>
|
||||||
|
|
||||||
<!-- YOU SHOULDN'T TOUCH ANYTHING BELOW -->
|
<!-- YOU SHOULDN'T TOUCH ANYTHING BELOW -->
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
<ImportLibrary>$(HexChatLib)$(TargetName).lib</ImportLibrary>
|
<ImportLibrary>$(HexChatLib)$(TargetName).lib</ImportLibrary>
|
||||||
<ProgramDatabaseFile>$(HexChatPdb)$(TargetName).pdb</ProgramDatabaseFile>
|
<ProgramDatabaseFile>$(HexChatPdb)$(TargetName).pdb</ProgramDatabaseFile>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>Debug</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||||
|
@@ -225,7 +225,7 @@ end;
|
|||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
function CheckVCInstall(): Boolean;
|
function CheckVCInstall(): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := FileExists(GetSysDir() + 'msvcr120.dll');;
|
Result := FileExists(GetSysDir() + 'vcruntime140.dll');;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
@@ -268,12 +268,12 @@ begin
|
|||||||
begin
|
begin
|
||||||
|
|
||||||
#if APPARCH == "x64"
|
#if APPARCH == "x64"
|
||||||
REDIST := 'https://dl.hexchat.net/misc/vcredist_2013_x64.exe';
|
REDIST := 'https://dl.hexchat.net/misc/vcredist_2015_x64.exe';
|
||||||
PERL := 'https://dl.hexchat.net/misc/perl/Perl%205.20.0%20x64.msi';
|
PERL := 'https://dl.hexchat.net/misc/perl/Perl%205.20.0%20x64.msi';
|
||||||
PY2 := 'http://python.org/ftp/python/2.7.8/python-2.7.8.amd64.msi';
|
PY2 := 'http://python.org/ftp/python/2.7.8/python-2.7.8.amd64.msi';
|
||||||
PY3 := 'http://python.org/ftp/python/3.4.1/python-3.4.1.amd64.msi';
|
PY3 := 'http://python.org/ftp/python/3.4.1/python-3.4.1.amd64.msi';
|
||||||
#else
|
#else
|
||||||
REDIST := 'https://dl.hexchat.net/misc/vcredist_2013_x86.exe';
|
REDIST := 'https://dl.hexchat.net/misc/vcredist_2015_x86.exe';
|
||||||
PERL := 'https://dl.hexchat.net/misc/perl/Perl%205.20.0%20x86.msi';
|
PERL := 'https://dl.hexchat.net/misc/perl/Perl%205.20.0%20x86.msi';
|
||||||
PY2 := 'http://python.org/ftp/python/2.7.8/python-2.7.8.msi';
|
PY2 := 'http://python.org/ftp/python/2.7.8/python-2.7.8.msi';
|
||||||
PY3 := 'http://python.org/ftp/python/3.4.1/python-3.4.1.msi';
|
PY3 := 'http://python.org/ftp/python/3.4.1/python-3.4.1.msi';
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup Label="Configuration">
|
<PropertyGroup Label="Configuration">
|
||||||
<PlatformToolset>v120</PlatformToolset>
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|