Games::Quakeworld::Query - A class for querying QuakeWorld servers
use Games::Quakeworld::Query; my $QWQ = Games::Quakeworld::Query->new("quake.server.com", "27500"); my %info = $QWQ->getinfo(); # obsoleted, use $qwq->get("") instead print "Server uses map: ".$qwq->get("map")."\n";
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.
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 ;).
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.
Here are the module methods in an alphabetical order.
Loops trough the server info and prints out something like "var = value".
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.
Returns SOMETHING from the server info. That is, $map = get("map"); Returns undef in case of failure.
Returns a long name of the current map. See the %maps hash in the beginning of the source of this module.
Returns the number of players in the server.
Player search and a class for it, and lots of more. This is just the beginning of the end :)
If you report any bugs in my code, please e-mail me.
Antoine Kalmbach <anzu@mbnet.fi>
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:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install Games::Quakeworld::Query, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Games::Quakeworld::Query
CPAN shell
perl -MCPAN -e shell install Games::Quakeworld::Query
For more information on module installation, please visit the detailed CPAN module installation guide.