Reindent code
[app-fonbot-daemon.git] / lib / App / FonBot / Plugin / Common.pm
index b4fce7c9072c5f3a162aa4d80c135075e9e88a6c..d61d9153660a1d2761ee4bc5bbbb3616bc8dc7ae 100644 (file)
@@ -24,43 +24,43 @@ our @EXPORT = qw/%ok_user_addresses %commands %waiting_requests sendmsg/;
 my $log=Log::Log4perl->get_logger(__PACKAGE__);
 
 sub init{
-  $log->info('setting user and group');
-  $)=join ' ', scalar getgrnam $group, map {scalar getgrnam $_} @supplementary_groups;
-  $(=scalar getgrnam $group;
-  $<=$>=scalar getpwnam $user;
-  chdir $dir;
-
-  $log->info('initializing '.__PACKAGE__);
-  tie %ok_user_addresses, DB_File => 'ok_user_addresses.db';
-  tie %commands, DB_File => 'commands.db';
+       $log->info('setting user and group');
+       $)=join ' ', scalar getgrnam $group, map {scalar getgrnam $_} @supplementary_groups;
+       $(=scalar getgrnam $group;
+       $<=$>=scalar getpwnam $user;
+       chdir $dir;
+
+       $log->info('initializing '.__PACKAGE__);
+       tie %ok_user_addresses, DB_File => 'ok_user_addresses.db';
+       tie %commands, DB_File => 'commands.db';
 }
 
 sub fini{
-  $log->info('finishing '.__PACKAGE__);
-  untie %ok_user_addresses;
-  untie %commands;
+       $log->info('finishing '.__PACKAGE__);
+       untie %ok_user_addresses;
+       untie %commands;
 }
 
 ##################################################
 
 sub sendmsg{
-  my ($touser,$requestid,$replyto,$command,@args)=@_;
-
-  my $data={command=>$command, replyto=>$replyto, args => \@args };
-  $data->{requestid} = $requestid if defined $requestid;
-
-  if (exists $commands{$touser}) {
-       my $temp = thaw $commands{$touser};
-       push $temp, $data;
-       $commands{$touser} = freeze $temp
-  } else {
-       $commands{$touser} = freeze [$data]
-  }
-
-  if (exists $waiting_requests{$touser}) {
-       $waiting_requests{$touser}->continue;
-       delete $waiting_requests{$touser}
-  }
+       my ($touser,$requestid,$replyto,$command,@args)=@_;
+
+       my $data={command=>$command, replyto=>$replyto, args => \@args };
+       $data->{requestid} = $requestid if defined $requestid;
+
+       if (exists $commands{$touser}) {
+               my $temp = thaw $commands{$touser};
+               push $temp, $data;
+               $commands{$touser} = freeze $temp
+       } else {
+               $commands{$touser} = freeze [$data]
+       }
+
+       if (exists $waiting_requests{$touser}) {
+               $waiting_requests{$touser}->continue;
+               delete $waiting_requests{$touser}
+       }
 }
 
 1;
This page took 0.011822 seconds and 4 git commands to generate.