Merge branch 'master' of aymargeddon.de:/var/cache/git/aymargeddon/current
authorBenni Bärmann <benni@obda.de>
Wed, 5 Sep 2012 20:34:28 +0000 (22:34 +0200)
committerBenni Bärmann <benni@obda.de>
Wed, 5 Sep 2012 20:34:28 +0000 (22:34 +0200)
src/FROGS/Config.pm
src/FROGS/DataBase.pm

index 860a64f..365ec47 100644 (file)
@@ -40,7 +40,7 @@ $::conf = {
           -DEFAULT_LANGUAGE => 'EN',
           -LOG_TIME_IN_LOOP => 1000, # loops until next time output in log
           -DEBUG => 1,
-          -EPL_DEBUG => 0,
+          -EPL_DEBUG => 2,
           -MESSAGE_IN_LOG => 0,
           -FULL_DEBUG_FILE => '/home/benni/aymargeddon/current/src/FROGS/+out',
           -SCHEDULER_SLEEP => 2,
index b3b721b..32342dd 100644 (file)
@@ -530,18 +530,20 @@ sub games_of_player{
 sub open_games{
   my ($self,$cond) = @_;
   my $games = $self->select_array('GAME','GAME');
-  # return $games;
 
   my @log;
   for my $game (@$games){
-    my $c = "GAME=$game";
-    $c .= "AND $cond" if $cond;
-
+      Util::log( Dumper($game)."\n",1);
+    my $c = "GAME=". $game->[0];
+    $c .= " AND $cond" if $cond;
+      Util::log($c."\n",1);
     my $unused = $self->select_array('MAP','LOCATION','',$c);
     
     print $unused;
 
-    push @log, $game if $#{@$unused} + 1;
+      Util::log(Dumper(@$unused),1);
+      
+    push @log, $game->[0] if @$unused + 1;
   }
   return \@log;
 }