NAME
Games::Quakeworld::Query - A class for querying QuakeWorld servers
SYNOPSIS
my
$QWQ
= Games::Quakeworld::Query->new(
"quake.server.com"
,
"27500"
);
my
%info
=
$QWQ
->getinfo();
# obsoleted, use $qwq->get("") instead
"Server uses map: "
.
$qwq
->get(
"map"
).
"\n"
;
DESCRIPTION
Hello, this is Games::Quakeworld::Query, a perl module. It is a class made for querying Quakeworld (Quake 1) game servers and getting their informations, that is map name, players, hostname and etc.
OVERVIEW
This module is made for querying Quakeworld servers. With this package you can easily query Quakeworld servers and get their information. This might come in hand if you are a Quake 1 player and i.e. like to use this in a CGI application and check the server with it before you go there.
I wrote this because I needed it; I am planning to implement it in a IRC bot and later write a nice CGI script for it. At the moment I use it in a IRC bot, powered by Net::IRC ;).
CONSTRUCTOR
- new (HOST [, PORT])
-
Instances a query to HOST at the port PORT. If PORT is omitted, the default port 27500 is used. If it succeeds, it returns $self, or in a case of error it returns undef.
METHODS
Here are the module methods in an alphabetical order.
- dumpinfo
-
Loops trough the server info and prints out something like "var = value".
- getinfo
-
OBSOLETED - use get("var") instead! Returns a hash containing the server information, i.e. %hash = ...->getinfo(); print %hash{map}. See the beginning of the source of this module to see the available informations.
- get (SOMETHING)
-
Returns SOMETHING from the server info. That is, $map = get("map"); Returns undef in case of failure.
- map_long
-
Returns a long name of the current map. See the %maps hash in the beginning of the source of this module.
- players
-
Returns the number of players in the server.
TODO
Player search and a class for it, and lots of more. This is just the beginning of the end :)
BUGS
If you report any bugs in my code, please e-mail me.
AUTHORS
Antoine Kalmbach <anzu@mbnet.fi>
COPYRIGHT
Copyright (c) 2003 Antoine Kalmbach. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
4 POD Errors
The following errors were encountered while parsing the POD:
- Around line 223:
'=item' outside of any '=over'
- Around line 229:
You forgot a '=back' before '=head1'
- Around line 233:
'=item' outside of any '=over'
- Around line 258:
You forgot a '=back' before '=head1'