start working on !track bot
[MQR.git] / scripts / mqr-publish.pl
index 16e76e6..68accca 100755 (executable)
@@ -3,12 +3,9 @@ use warnings;
 use strict;
 use AnyEvent::Redis;
 
-our ( $redis_host, $redis_port );
-require 'config.pl';
+my $pub = AnyEvent::Redis->new( host => $ENV{REDIS_HOST}, port => $ENV{REDIS_PORT} );
 
-my $pub = AnyEvent::Redis->new( host => $redis_host, port => $redis_port );
-
-$pub->publish("test.1" => $ARGV[0])->recv;
+$pub->publish("channel test" => $ARGV[0])->recv;
 
 AnyEvent->condvar->recv;