Actions

Amxmodx to sourcemod admin list

From Mike Beane's Blog

Revision as of 17:06, 4 November 2007 by Rabbi Bob (talk | contribs) (New page: <pre> #!/usr/bin/perl $USERS_IN="users.ini"; $out="admins.txt"; open OUT, ">$out" or die "Cannot open $out for write :$!"; open LOGFILE_IN, $LOGFILE_IN or die "Cannot open $LOGFILE_IN fo...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
#!/usr/bin/perl

$USERS_IN="users.ini";
$out="admins.txt";

open OUT, ">$out" or die "Cannot open $out for write :$!";
open LOGFILE_IN, $LOGFILE_IN or die "Cannot open $LOGFILE_IN for read :$!";
   while (<LOGFILE_IN>)
{
       #"STEAM_0:1:359131" "f0C4p4ss"  "bcdfgijlmnopqrstu"  "c";"FoCA|VelvetMan"
       if ($_=~/^"(.*)"(.*)"(.*)"(.*)"(.*)"(.*)"(.*)";"(.*)"/)
           {
           print OUT "\"$8\"\n";
           print OUT "{\n";
           print OUT "\"auth\"     \"steam\"\n";
           print OUT "\"identity\" \"$1\"\n";
           print OUT "\"flags\"    \"abcdefgjk\"\n";
           print OUT "}\n";
           }
           else {print OUT "*********************$8\n";
   }