Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
message somebody in quake.
use Socket;
my %server;
$server{'port'} = "27960";
$server{'host'} = (shift(@ARGV));
@message = @ARGV;
print "trying: $server{'host'}:$server{'port'}\n";
socket(SOCKET, PF_INET, SOCK_DGRAM, getprotobyname("udp"));
unless(gethostbyname($server{'host'})) {
print "unable to open $server{'host'}\n" }
connect(SOCKET, sockaddr_in($server{'port'}, inet_aton($server{'host'})));
send(SOCKET, "\xFF\xFF\xFF\xFFprint foo\n", 0);
print "\xFF\xFF\xFF\xFFprint \n@message\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment