Version 0.63

- added ut2k4 plugin (native scan)
- added Battlefield2 support (gs2 query/host ports)
- added Swat4 Support (gs2)
- fix quake2 plugin
This commit is contained in:
Olaf Rempel 2006-02-02 16:51:01 +01:00
parent 9b62806411
commit 5c2fc7d1a6
17 changed files with 1025 additions and 1473 deletions

View File

@ -1,9 +1,15 @@
* Thu 25 August 2005 Olaf Rempel <razzor@kopf-tisch.de> 0.62
* Thu 08 Sep 2005 Olaf Rempel <razzor@kopf-tisch.de> 0.63
- added ut2k4 plugin (native scan)
- added Battlefield2 support (gs2 query/host ports)
- added Swat4 Support (gs2)
- fix quake2 plugin
* Thu 25 Aug 2005 Olaf Rempel <razzor@kopf-tisch.de> 0.62
- use c99 inttypes
- added new Halflife scan (halflife)
- added Battlefield2 support (gamespy2)
* Sun 05 June 2005 Olaf Rempel <razzor@kopf-tisch.de> 0.61
* Sun 05 Jun 2005 Olaf Rempel <razzor@kopf-tisch.de> 0.61
- reduce per thread stack from 8MB to 64kB (strange pthread_create() defaults..)
* Sun 15 May 2005 Olaf Rempel <razzor@kopf-tisch.de> 0.60

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -247,13 +247,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@ -265,7 +259,7 @@ $(RECURSIVE_TARGETS):
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@ -273,13 +267,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -300,7 +288,7 @@ maintainer-clean-recursive:
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \

22
TODO
View File

@ -1,5 +1,3 @@
- evtl. noch natives ut2k3/ut2k4 protocol einbauen
laut hlsw wiki/changelog geht gamespy "nicht immer"
- signalhandler fuer config reread
- signalhandler listen-flush + neuscannen
- auf mehreren/allen interfaces gleichzeitig scannen
@ -9,24 +7,6 @@
- Makefile: stripping binarys?
und natuerlich:
- weitere spiele finden:
Quake 1
Command & Conquer Renegade
Medal of Honor: Allied Assault
Rune
Never Winter Nights
Medal of Honor: Allied Assault Spearhead
Operation Flashpoint
Operation Flashpoint Resistance
Devastation
Elite Force 2
Medal of Honor: Allied Assault Breakthrough
Tribes 2
Savage: The Battle for Newerth
Pain Killer
Tribes Vengeance
Star Wars: Battle Front
SWAT 4
- weitere spiele finden
- vorhandene parser debuggen & verbessern

880
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

1033
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
dnl projekname, version, bugsto
AC_INIT(hlswmaster, 0.62, [Olaf Rempel <razzor@kopf-tisch.de>])
AC_INIT(hlswmaster, 0.63, [Olaf Rempel <razzor@kopf-tisch.de>])
dnl same for automake
AM_INIT_AUTOMAKE(hlswmaster, 0.62)
AM_INIT_AUTOMAKE(hlswmaster, 0.63)
dnl do not rebuild configure
AM_MAINTAINER_MODE

View File

@ -4,16 +4,16 @@ scan_ip 0.0.0.0
scan_port 7130
# broadcast scan every X seconds
scan_interval 30
scan_interval 60
# serverlist rebuild every X seconds
serverlist_interval 5
# server timeout after X seconds
serverlist_timeout 60
serverlist_timeout 120
# plugin data timeout every X seconds
plugin_timeout 30
plugin_timeout 60
# master answers with this source IP
master_ip 0.0.0.0
@ -26,6 +26,7 @@ plugin plugins/.libs/quake2.so
plugin plugins/.libs/gamespy1.so
plugin plugins/.libs/gamespy2.so
plugin plugins/.libs/doom3.so
plugin plugins/.libs/ut2k4.so
# logging
logfile hlswmaster.log

362
ltmain.sh
View File

@ -1,7 +1,7 @@
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
# Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@ -17,7 +17,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -46,21 +46,14 @@ EXIT_FAILURE=1
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=1.5.18
TIMESTAMP=" (1.1220.2.246 2005/05/16 10:00:18)"
VERSION=1.5.10
TIMESTAMP=" (1.1220.2.131 2004/09/19 12:46:56)"
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
# Same for EGREP, and just to be sure, do LTCC as well
if test "X$EGREP" = X ; then
EGREP=egrep
fi
if test "X$LTCC" = X ; then
LTCC=${CC-gcc}
fi
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
@ -122,9 +115,8 @@ if test "${LANG+set}" = set; then
fi
# Make sure IFS has a sensible default
lt_nl='
'
IFS=" $lt_nl"
: ${IFS="
"}
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
$echo "$modename: not configured to build any kind of library" 1>&2
@ -143,7 +135,6 @@ show_help=
execute_dlfiles=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
quote_scanset='[[~#^*{};<>?'"'"' ]'
if test -z "$max_cmd_len"; then
i=0
@ -179,8 +170,7 @@ fi
# Need a lot of goo to handle *both* DLLs and import libs
# Has to be a shell function in order to 'eat' the argument
# that is supplied when $file_magic_command is called.
func_win32_libid ()
{
func_win32_libid () {
win32_libid_type="unknown"
win32_fileres=`file -L $1 2>/dev/null`
case $win32_fileres in
@ -220,13 +210,12 @@ func_win32_libid ()
# Only attempt this if the compiler in the base compile
# command doesn't match the default compiler.
# arg is usually of the form 'gcc ...'
func_infer_tag ()
{
func_infer_tag () {
if test -n "$available_tags" && test -z "$tagname"; then
CC_quoted=
for arg in $CC; do
case $arg in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@ -247,7 +236,7 @@ func_infer_tag ()
for arg in $CC; do
# Double-quote args containing other shell metacharacters.
case $arg in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@ -290,25 +279,8 @@ func_infer_tag ()
}
# func_extract_an_archive dir oldlib
func_extract_an_archive ()
{
f_ex_an_ar_dir="$1"; shift
f_ex_an_ar_oldlib="$1"
$show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
$run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
exit $EXIT_FAILURE
fi
}
# func_extract_archives gentop oldlib ...
func_extract_archives ()
{
func_extract_archives () {
my_gentop="$1"; shift
my_oldlibs=${1+"$@"}
my_oldobjs=""
@ -352,7 +324,7 @@ func_extract_archives ()
cd $my_xdir || exit $?
darwin_archive=$my_xabs
darwin_curdir=`pwd`
darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
darwin_base_archive=`basename $darwin_archive`
darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
if test -n "$darwin_arches"; then
darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
@ -361,33 +333,64 @@ func_extract_archives ()
for darwin_arch in $darwin_arches ; do
mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
# Remove the table of contents from the thin files.
$AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true
$AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true
cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
func_extract_an_archive "`pwd`" "${darwin_base_archive}"
$AR -xo "${darwin_base_archive}"
rm "${darwin_base_archive}"
cd "$darwin_curdir"
$rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
done # $darwin_arches
## Okay now we have a bunch of thin objects, gotta fatten them up :)
darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP`
darwin_file=
darwin_files=
for darwin_file in $darwin_filelist; do
darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
lipo -create -output "$darwin_file" $darwin_files
done # $darwin_filelist
${rm}r unfat-$$
rm -rf unfat-$$
cd "$darwin_orig_dir"
else
cd "$darwin_orig_dir"
func_extract_an_archive "$my_xdir" "$my_xabs"
cd $darwin_orig_dir
(cd $my_xdir && $AR x $my_xabs) || exit $?
fi # $darwin_arches
fi # $run
;;
*)
func_extract_an_archive "$my_xdir" "$my_xabs"
;;
# We will extract separately just the conflicting names and we will
# no longer touch any unique names. It is faster to leave these
# extract automatically by $AR in one run.
$show "(cd $my_xdir && $AR x $my_xabs)"
$run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $?
if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
$AR t "$my_xabs" | sort | uniq -cd | while read -r count name
do
i=1
while test "$i" -le "$count"
do
# Put our $i before any first dot (extension)
# Never overwrite any file
name_to="$name"
while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to"
do
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
done
$show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')"
$run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $?
i=`expr $i + 1`
done
done
fi
;;
esac
my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
func_extract_archives_result="$my_oldobjs"
}
# End of Shell function definitions
@ -460,10 +463,10 @@ do
--version)
$echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
$echo
$echo "Copyright (C) 2005 Free Software Foundation, Inc."
$echo "Copyright (C) 2003 Free Software Foundation, Inc."
$echo "This is free software; see the source for copying conditions. There is NO"
$echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
exit $?
exit $EXIT_SUCCESS
;;
--config)
@ -472,7 +475,7 @@ do
for tagname in $taglist; do
${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
done
exit $?
exit $EXIT_SUCCESS
;;
--debug)
@ -497,7 +500,7 @@ do
else
$echo "disable static libraries"
fi
exit $?
exit $EXIT_SUCCESS
;;
--finish) mode="finish" ;;
@ -554,7 +557,7 @@ if test -z "$show_help"; then
# Infer the operation mode.
if test -z "$mode"; then
$echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
$echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
$echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
case $nonopt in
*cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
mode=link
@ -671,7 +674,7 @@ if test -z "$show_help"; then
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
case $arg in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@ -702,11 +705,8 @@ if test -z "$show_help"; then
case $lastarg in
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, and some SunOS ksh mistreat backslash-escaping
# in scan sets (worked around with variable expansion),
# and furthermore cannot handle '|' '&' '(' ')' in scan sets
# at all, so we specify them separately.
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
# in scan sets, so we specify it separately.
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
lastarg="\"$lastarg\""
;;
esac
@ -779,15 +779,6 @@ if test -z "$show_help"; then
esac
done
qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
case $qlibobj in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
qlibobj="\"$qlibobj\"" ;;
esac
if test "X$libobj" != "X$qlibobj"; then
$echo "$modename: libobj name \`$libobj' may not contain shell special characters."
exit $EXIT_FAILURE
fi
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then
@ -860,17 +851,12 @@ compiler."
$run $rm $removelist
exit $EXIT_FAILURE
fi
$echo "$srcfile" > "$lockfile"
$echo $srcfile > "$lockfile"
fi
if test -n "$fix_srcfile_path"; then
eval srcfile=\"$fix_srcfile_path\"
fi
qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
case $qsrcfile in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
qsrcfile="\"$qsrcfile\"" ;;
esac
$run $rm "$libobj" "${libobj}T"
@ -892,10 +878,10 @@ EOF
fbsd_hideous_sh_bug=$base_compile
if test "$pic_mode" != no; then
command="$base_compile $qsrcfile $pic_flag"
command="$base_compile $srcfile $pic_flag"
else
# Don't build PIC code
command="$base_compile $qsrcfile"
command="$base_compile $srcfile"
fi
if test ! -d "${xdir}$objdir"; then
@ -975,9 +961,9 @@ EOF
if test "$build_old_libs" = yes; then
if test "$pic_mode" != yes; then
# Don't build PIC code
command="$base_compile $qsrcfile"
command="$base_compile $srcfile"
else
command="$base_compile $qsrcfile $pic_flag"
command="$base_compile $srcfile $pic_flag"
fi
if test "$compiler_c_o" = yes; then
command="$command -o $obj"
@ -1155,7 +1141,7 @@ EOF
arg="$1"
shift
case $arg in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
;;
*) qarg=$arg ;;
@ -1399,13 +1385,6 @@ EOF
prev=
continue
;;
darwin_framework)
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
prev=
continue
;;
*)
eval "$prev=\"\$arg\""
prev=
@ -1464,14 +1443,6 @@ EOF
continue
;;
-framework)
prev=darwin_framework
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
continue
;;
-inst-prefix-dir)
prev=inst_prefix
continue
@ -1532,7 +1503,7 @@ EOF
# These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue
;;
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
*-*-openbsd* | *-*-freebsd*)
# Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue
;;
@ -1543,7 +1514,7 @@ EOF
esac
elif test "X$arg" = "X-lc_r"; then
case $host in
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
*-*-openbsd* | *-*-freebsd*)
# Do not include libc_r directly, use -pthread flag.
continue
;;
@ -1553,20 +1524,8 @@ EOF
continue
;;
# Tru64 UNIX uses -model [arg] to determine the layout of C++
# classes, name mangling, and exception handling.
-model)
compile_command="$compile_command $arg"
compiler_flags="$compiler_flags $arg"
finalize_command="$finalize_command $arg"
prev=xcompiler
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
deplibs="$deplibs $arg"
continue
;;
@ -1575,19 +1534,18 @@ EOF
continue
;;
# -64, -mips[0-9] enable 64-bit mode on the SGI compiler
# -r[0-9][0-9]* specifies the processor on the SGI compiler
# -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
# +DA*, +DD* enable 64-bit mode on the HP compiler
# -q* pass through compiler args for the IBM compiler
# -m* pass through architecture-specific compiler args for GCC
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
# gcc -m* arguments should be passed to the linker via $compiler_flags
# in order to pass architecture information to the linker
# (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
# but this is not reliable with gcc because gcc may use -mfoo to
# select a different linker, different libraries, etc, while
# -Wl,-mfoo simply passes -mfoo to the linker.
-m*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@ -1703,7 +1661,7 @@ EOF
for flag in $args; do
IFS="$save_ifs"
case $flag in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
flag="\"$flag\""
;;
esac
@ -1721,7 +1679,7 @@ EOF
for flag in $args; do
IFS="$save_ifs"
case $flag in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
flag="\"$flag\""
;;
esac
@ -1759,7 +1717,7 @@ EOF
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@ -1893,7 +1851,7 @@ EOF
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
@ -2060,7 +2018,7 @@ EOF
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
compiler_flags="$compiler_flags $deplib"
deplibs="$deplib $deplibs"
fi
continue
;;
@ -2069,6 +2027,10 @@ EOF
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
continue
fi
if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
for search_ext in .la $std_shrext .so .a; do
@ -2268,8 +2230,6 @@ EOF
# it will not redefine variables installed, or shouldnotlink
installed=yes
shouldnotlink=no
avoidtemprpath=
# Read the .la file
case $lib in
@ -2368,7 +2328,6 @@ EOF
dir="$libdir"
absdir="$libdir"
fi
test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
else
if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
dir="$ladir"
@ -2453,7 +2412,7 @@ EOF
if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
if test -n "$shlibpath_var"; then
# Make sure the rpath contains only unique directories.
case "$temp_rpath " in
*" $dir "*) ;;
@ -2897,13 +2856,13 @@ EOF
*) continue ;;
esac
case " $deplibs " in
*" $path "*) ;;
*) deplibs="$path $deplibs" ;;
esac
case " $deplibs " in
*" $depdepl "*) ;;
*) deplibs="$depdepl $deplibs" ;;
esac
case " $deplibs " in
*" $path "*) ;;
*) deplibs="$deplibs $path" ;;
esac
done
fi # link_all_deplibs != no
fi # linkmode = lib
@ -3167,27 +3126,27 @@ EOF
# Check that each of the things are valid numbers.
case $current in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
[0-9]*) ;;
*)
$echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
esac
case $revision in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
[0-9]*) ;;
*)
$echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
esac
case $age in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
[0-9]*) ;;
*)
$echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
exit $EXIT_FAILURE
;;
@ -3419,7 +3378,7 @@ EOF
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
;;
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
*-*-openbsd* | *-*-freebsd*)
# Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue
;;
@ -3963,7 +3922,6 @@ EOF
save_libobjs=$libobjs
fi
save_output=$output
output_la=`$echo "X$output" | $Xsed -e "$basename"`
# Clear the reloadable object creation command queue and
# initialize k to one.
@ -3973,7 +3931,7 @@ EOF
delfiles=
last_robj=
k=1
output=$output_objdir/$output_la-${k}.$objext
output=$output_objdir/$save_output-${k}.$objext
# Loop over the list of objects to be linked.
for obj in $save_libobjs
do
@ -3993,9 +3951,9 @@ EOF
# the last one created.
eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
fi
last_robj=$output_objdir/$output_la-${k}.$objext
last_robj=$output_objdir/$save_output-${k}.$objext
k=`expr $k + 1`
output=$output_objdir/$output_la-${k}.$objext
output=$output_objdir/$save_output-${k}.$objext
objlist=$obj
len=1
fi
@ -4015,13 +3973,13 @@ EOF
eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
fi
# Set up a command to remove the reloadable object files
# Set up a command to remove the reloadale object files
# after they are used.
i=0
while test "$i" -lt "$k"
do
i=`expr $i + 1`
delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
done
$echo "creating a temporary reloadable object file: $output"
@ -4418,12 +4376,12 @@ extern \"C\" {
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
export_symbols="$output_objdir/$outputname.exp"
export_symbols="$output_objdir/$output.exp"
$run $rm $export_symbols
$run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
else
$run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
$run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
$run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"'
fi
fi
@ -4475,26 +4433,7 @@ extern \"C\" {
#endif
/* The mapping between symbol names and symbols. */
"
case $host in
*cygwin* | *mingw* )
$echo >> "$output_objdir/$dlsyms" "\
/* DATA imports from DLLs on WIN32 can't be const, because
runtime relocations are performed -- see ld's documentation
on pseudo-relocs */
struct {
"
;;
* )
$echo >> "$output_objdir/$dlsyms" "\
const struct {
"
;;
esac
$echo >> "$output_objdir/$dlsyms" "\
const char *name;
lt_ptr address;
}
@ -4723,7 +4662,7 @@ static const void *lt_preloaded_setup() {
esac
case $host in
*cygwin* | *mingw* )
cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
cwrappersource=`$echo ${objdir}/lt-${output}.c`
cwrapper=`$echo ${output}.exe`
$rm $cwrappersource $cwrapper
trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
@ -5143,63 +5082,6 @@ fi\
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
cmds=$old_archive_from_new_cmds
else
# POSIX demands no paths to be encoded in archives. We have
# to avoid creating archives with duplicate basenames if we
# might have to extract them afterwards, e.g., when creating a
# static archive out of a convenience library, or when linking
# the entirety of a libtool archive into another (currently
# not supported by libtool).
if (for obj in $oldobjs
do
$echo "X$obj" | $Xsed -e 's%^.*/%%'
done | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "copying selected object files to avoid basename conflicts..."
if test -z "$gentop"; then
gentop="$output_objdir/${outputname}x"
generated="$generated $gentop"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
status=$?
if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
fi
save_oldobjs=$oldobjs
oldobjs=
counter=1
for obj in $save_oldobjs
do
objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
case " $oldobjs " in
" ") oldobjs=$obj ;;
*[\ /]"$objbase "*)
while :; do
# Make sure we don't pick an alternate name that also
# overlaps.
newobj=lt$counter-$objbase
counter=`expr $counter + 1`
case " $oldobjs " in
*[\ /]"$newobj "*) ;;
*) if test ! -f "$gentop/$newobj"; then break; fi ;;
esac
done
$show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
$run ln "$obj" "$gentop/$newobj" ||
$run cp "$obj" "$gentop/$newobj"
oldobjs="$oldobjs $gentop/$newobj"
;;
*) oldobjs="$oldobjs $obj" ;;
esac
done
fi
eval cmds=\"$old_archive_cmds\"
if len=`expr "X$cmds" : ".*"` &&
@ -5213,7 +5095,20 @@ fi\
objlist=
concat_cmds=
save_oldobjs=$oldobjs
# GNU ar 2.10+ was changed to match POSIX; thus no paths are
# encoded into archives. This makes 'ar r' malfunction in
# this piecewise linking case whenever conflicting object
# names appear in distinct ar calls; check, warn and compensate.
if (for obj in $save_oldobjs
do
$echo "X$obj" | $Xsed -e 's%^.*/%%'
done | sort | sort -uc >/dev/null 2>&1); then
:
else
$echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
$echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
AR_FLAGS=cq
fi
# Is there a better way of finding the last object in the list?
for obj in $save_oldobjs
do
@ -5307,13 +5202,10 @@ fi\
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit $EXIT_FAILURE
fi
if test "X$EGREP" = X ; then
EGREP=egrep
fi
# We do not want portage's install root ($D) present. Check only for
# this if the .la is being installed.
if test "$installed" = yes && test "$D"; then
eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D::g" -e 's://:/:g'`
else
mynewdependency_lib="$libdir/$name"
fi
@ -5339,7 +5231,7 @@ fi\
# We do not want portage's install root ($D) present.
my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
elif test -n "$my_little_ninja_foo_3" && test "$D"; then
eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D::g" -e 's://:/:g'`
else
mynewdependency_lib="$deplib"
fi
@ -5407,7 +5299,7 @@ fi\
esac
# Do not add duplicates
if test "$installed" = yes && test "$D"; then
install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
install_libdir=`echo "$install_libdir" |sed -e "s:$D::g" -e 's://:/:g'`
fi
$echo > $output "\
# $outputname - a libtool library file
@ -5473,7 +5365,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote it.
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
case $arg in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
arg="\"$arg\""
;;
esac
@ -5489,7 +5381,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote it.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
arg="\"$arg\""
;;
esac
@ -5537,7 +5429,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote the argument.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case $arg in
*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
arg="\"$arg\""
;;
esac
@ -6576,7 +6468,7 @@ esac
$echo
$echo "Try \`$modename --help' for more information about other modes."
exit $?
exit $EXIT_SUCCESS
# The TAGs below are defined such that we never get into a situation
# in which we disable both kinds of libraries. Given conflicting

View File

@ -4,7 +4,7 @@ EXTRA_DIST = skel.c
INCLUDES = -I../include
pkgdata_LTLIBRARIES = doom3.la gamespy1.la gamespy2.la halflife.la hlswproxy.la q3engine.la quake2.la
pkgdata_LTLIBRARIES = doom3.la gamespy1.la gamespy2.la halflife.la hlswproxy.la q3engine.la quake2.la ut2k4.la
doom3_la_SOURCES = doom3.c
doom3_la_LDFLAGS = -module -avoid-version
@ -26,3 +26,6 @@ q3engine_la_LDFLAGS = -module -avoid-version
quake2_la_SOURCES = quake2.c
quake2_la_LDFLAGS = -module -avoid-version
ut2k4_la_SOURCES = ut2k4.c
ut2k4_la_LDFLAGS = -module -avoid-version

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -14,7 +14,7 @@
@SET_MAKE@
SOURCES = $(doom3_la_SOURCES) $(gamespy1_la_SOURCES) $(gamespy2_la_SOURCES) $(halflife_la_SOURCES) $(hlswproxy_la_SOURCES) $(q3engine_la_SOURCES) $(quake2_la_SOURCES)
SOURCES = $(doom3_la_SOURCES) $(gamespy1_la_SOURCES) $(gamespy2_la_SOURCES) $(halflife_la_SOURCES) $(hlswproxy_la_SOURCES) $(q3engine_la_SOURCES) $(quake2_la_SOURCES) $(ut2k4_la_SOURCES)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@ -77,6 +77,9 @@ q3engine_la_OBJECTS = $(am_q3engine_la_OBJECTS)
quake2_la_LIBADD =
am_quake2_la_OBJECTS = quake2.lo
quake2_la_OBJECTS = $(am_quake2_la_OBJECTS)
ut2k4_la_LIBADD =
am_ut2k4_la_OBJECTS = ut2k4.lo
ut2k4_la_OBJECTS = $(am_ut2k4_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
depcomp =
am__depfiles_maybe =
@ -91,11 +94,11 @@ LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
SOURCES = $(doom3_la_SOURCES) $(gamespy1_la_SOURCES) \
$(gamespy2_la_SOURCES) $(halflife_la_SOURCES) \
$(hlswproxy_la_SOURCES) $(q3engine_la_SOURCES) \
$(quake2_la_SOURCES)
$(quake2_la_SOURCES) $(ut2k4_la_SOURCES)
DIST_SOURCES = $(doom3_la_SOURCES) $(gamespy1_la_SOURCES) \
$(gamespy2_la_SOURCES) $(halflife_la_SOURCES) \
$(hlswproxy_la_SOURCES) $(q3engine_la_SOURCES) \
$(quake2_la_SOURCES)
$(quake2_la_SOURCES) $(ut2k4_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@ -201,7 +204,7 @@ target_alias = @target_alias@
AUTOMAKE_OPTIONS = foreign no-dependencies
EXTRA_DIST = skel.c
INCLUDES = -I../include
pkgdata_LTLIBRARIES = doom3.la gamespy1.la gamespy2.la halflife.la hlswproxy.la q3engine.la quake2.la
pkgdata_LTLIBRARIES = doom3.la gamespy1.la gamespy2.la halflife.la hlswproxy.la q3engine.la quake2.la ut2k4.la
doom3_la_SOURCES = doom3.c
doom3_la_LDFLAGS = -module -avoid-version
gamespy1_la_SOURCES = gamespy1.c
@ -216,6 +219,8 @@ q3engine_la_SOURCES = q3engine.c
q3engine_la_LDFLAGS = -module -avoid-version
quake2_la_SOURCES = quake2.c
quake2_la_LDFLAGS = -module -avoid-version
ut2k4_la_SOURCES = ut2k4.c
ut2k4_la_LDFLAGS = -module -avoid-version
all: all-am
.SUFFIXES:
@ -290,6 +295,8 @@ q3engine.la: $(q3engine_la_OBJECTS) $(q3engine_la_DEPENDENCIES)
$(LINK) -rpath $(pkgdatadir) $(q3engine_la_LDFLAGS) $(q3engine_la_OBJECTS) $(q3engine_la_LIBADD) $(LIBS)
quake2.la: $(quake2_la_OBJECTS) $(quake2_la_DEPENDENCIES)
$(LINK) -rpath $(pkgdatadir) $(quake2_la_LDFLAGS) $(quake2_la_OBJECTS) $(quake2_la_LIBADD) $(LIBS)
ut2k4.la: $(ut2k4_la_OBJECTS) $(ut2k4_la_DEPENDENCIES)
$(LINK) -rpath $(pkgdatadir) $(ut2k4_la_LDFLAGS) $(ut2k4_la_OBJECTS) $(ut2k4_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)

View File

@ -21,7 +21,7 @@
#include "plugin_helper.h"
static struct scan_ports port_arr[] = {
{ 7777, 7788, 5 }, /* ut(5), ut2k3(14), ut2k4(33) */
{ 7777, 7788, 5 }, /* ut(5), ut2k3(14), ut2k4(33), aao(15) */
{ 22000, 22010, 16 }, /* bf1942(16) */
{ 23000, 23010, 35 }, /* bfv(35) */
{ 26001, 26011, 19 }, /* igi2(19) */
@ -51,11 +51,13 @@ static char reply_ut[] = "ut\\";
static char reply_ut2k3[] = "ut2\\";
static char reply_ut2k4[] = "ut2004\\";
static char reply_bf1942[] = "bfield1942\\";
static char reply_bfv[] = "bfvietnam\\";
static char reply_bfv1[] = "bfvietnam\\";
static char reply_bfv2[] = "BFVIETNAM\\";
static char reply_poe[] = "poe\\";
static char reply_opk[] = "opk\\";
static char reply_avp2[] = "avp2\\";
static char reply_igi2[] = "projectigi2r\\";
static char reply_aao[] = "armygame\\";
static int scan(void)
{
@ -138,6 +140,10 @@ static int parse_real(struct net_pkt *pkt, int gameid)
/* unreal tournament 2k4 */
else if (!pkt_memcmp(pkt, pos1, reply_ut2k4, strlen(reply_ut2k4)))
gameid = 33;
/* americas army operations */
else if (!pkt_memcmp(pkt, pos1, reply_aao, strlen(reply_aao)))
gameid = 15;
else
return PARSE_REJECT;
break;
@ -147,7 +153,10 @@ static int parse_real(struct net_pkt *pkt, int gameid)
if (!pkt_memcmp(pkt, pos1, reply_bf1942, strlen(reply_bf1942)))
gameid = 16;
else if (!pkt_memcmp(pkt, pos2, reply_bfv, strlen(reply_bfv)))
else if (!pkt_memcmp(pkt, pos2, reply_bfv1, strlen(reply_bfv1)))
gameid = 35;
else if (!pkt_memcmp(pkt, pos2, reply_bfv2, strlen(reply_bfv2)))
gameid = 35;
else if (!pkt_memcmp(pkt, pos2, reply_poe, strlen(reply_poe)))

View File

@ -23,13 +23,19 @@
static struct scan_ports port_arr[] = {
{ 2302, 2302, 30 }, /* halo(30) */
{ 3455, 3455, 37 }, /* painkiller(34) */
{ 10481, 10482, 44 }, /* swat4 (44) */
{ 29900, 29910, 45 }, /* battlefield2 (45) */
{ 0, 0, 0 }
};
static char scanmsg[] = { 0xFE, 0xFD, 0x00, 0xDE, 0xAD, 0xBE, 0xEF, 0x00, 0x00, 0x00 };
static char scanmsg[] = { 0xFE, 0xFD, 0x00, 0xDE, 0xAD, 0xBE, 0xEF, 0xFF, 0x00, 0x00 };
static char replymsg[] = { 0x00, 0xDE, 0xAD, 0xBE, 0xEF };
static char search_hostport[] = "hostport";
static char search_gamename[] = "gamename";
static char reply_bf2[] = "battlefield2";
static int scan(void)
{
pkt_send_portarr(NULL, port_arr, scanmsg, sizeof(scanmsg));
@ -38,7 +44,7 @@ static int scan(void)
static int parse(struct net_pkt *pkt)
{
int gameid;
int gameid, pos1, pos3, port;
if (!(gameid = pkt_check_portarr(pkt, port_arr)))
return PARSE_REJECT;
@ -46,7 +52,49 @@ static int parse(struct net_pkt *pkt)
if (pkt_memcmp(pkt, 0, replymsg, sizeof(replymsg)))
return PARSE_REJECT;
server_add_pkt(gameid, pkt);
pos1 = pkt_memmem(pkt, 0, search_gamename, strlen(search_gamename));
pos1 += strlen(search_gamename) +1;
/* hostport angabe suchen */
pos3 = pkt_memmem(pkt, 0, search_hostport, strlen(search_hostport));
if (pos3 != -1)
pkt_parse_int(pkt, pos3 + strlen(search_hostport) +1, &port);
switch (gameid) {
case 30:/* halo */
case 37:/* painkiller */
break;
case 44:/* swat4 */
if (pos3 != -1)
gameid = 44;
else
return PARSE_REJECT;
break;
case 45:/* battlefield 2 */
// todo: pos3 check noetig?
if (!pkt_memcmp(pkt, pos1, reply_bf2, strlen(reply_bf2)) && pos3 != -1)
gameid = 45;
else
return PARSE_REJECT;
break;
default:
return PARSE_REJECT;
break;
}
/*
* wenn ein hostport angegeben wurde, und das nicht der src port ist
* beide ports in die serverliste uebernehmen
*/
if ((pos3 != -1) && (port != ntohs(pkt->addr.sin_port))) {
server_add(gameid, pkt->addr.sin_addr.s_addr, port, ntohs(pkt->addr.sin_port));
} else {
server_add_pkt(gameid, pkt);
}
return PARSE_ACCEPT;
}

View File

@ -21,6 +21,7 @@
#include "plugin_helper.h"
static char scanmsg[] = "\xff\xff\xff\xffinfo 34"; /* q2(3) */
static char replymsg[] = "\xff\xff\xff\xffinfo";
static int scan(void)
{
@ -33,7 +34,7 @@ static int parse(struct net_pkt *pkt)
if (pkt_getport(pkt) != 27910)
return PARSE_REJECT;
if (pkt_memcmp(pkt, 0, scanmsg, strlen(scanmsg)))
if (pkt_memcmp(pkt, 0, replymsg, strlen(replymsg)))
return PARSE_REJECT;
server_add_pkt(3, pkt);

50
plugins/ut2k4.c Normal file
View File

@ -0,0 +1,50 @@
/***************************************************************************
* Copyright (C) 09/2005 by Olaf Rempel *
* razzor@kopf-tisch.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <string.h>
#include "plugin_helper.h"
static char scanmsg1[] = "\x80\x00\x00\x00\x00";
static int scan(void)
{
pkt_send(NULL, 10777, scanmsg1, 5);
return 1;
}
static int parse(struct net_pkt *pkt)
{
unsigned short *port;
if (pkt_memcmp(pkt, 0, scanmsg1, 5))
return PARSE_REJECT;
if (pkt->size < 12)
return PARSE_REJECT;
port = (unsigned short *)&(pkt->buf[10]);
server_add(33, pkt->addr.sin_addr.s_addr, *port, ntohs(pkt->addr.sin_port));
return PARSE_ACCEPT;
}
struct hlswmaster_plugin plugin = {
.name = "ut2k4",
.scan = &scan,
.parse = &parse,
};

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

View File

@ -1,8 +1,8 @@
# Makefile.in generated by automake 1.9.5 from Makefile.am.
# Makefile.in generated by automake 1.9.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

View File

@ -66,7 +66,7 @@ static char *id2name[] = {
"Tribes Vengeance",
"Call of Duty: United Offensive",
"Starwars: Battlefront (?)",
"SWAT 4 (?)",
"SWAT 4",
"Battlefield 2" // 45
};