NAME

CallOfDuty::LANMapper - COD Server detection and query

VERSION

Version 0.01

SYNOPSIS

This modules lets you detect Call Of Duty servers on your lan and query them once you know their hostname and IP. Currently only Call Of Duty 4 servers are supported.

   use CallOfDuty::LANMapper;

   my $servers = CallOfDuty::LANMapper::get_servers();
   foreach my $server ( @$servers )
   {
   	my $info = CallOfDuty::LANMapper::get_status($server);
   }

FUNCTIONS

get_servers

my $servers = CallOfDuty::LANMapper::get_servers()

This function broadcasts on the local network looking for Call Of Duty servers.

An array reference containing host and port is returned e.g [ "gameserver:28960" ]

get_status

my $servers = CallOfDuty::LANMapper::get_status( "localhost:28960" );

This function contacts the call of duty server passed in and queries it for its status.

A hash reference or undef for failure is returned. Of chief interest are the player_count field which contains the number of players on the server , the player field which contains an array reference which contains the current players, mapname and sv_hostname.

AUTHOR

Peter Sinnott, <link at redbrick.dcu.ie>

BUGS

Please report any bugs or feature requests to bug-callofduty-lanmapper at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CallOfDuty-LANMapper. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc CallOfDuty::LANMapper

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2008 Peter Sinnott, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.