1. GSManager
    1. Funktionen
    2. Unterstützte Spiele
    3. Neuigkeiten
    4. Statistiken
    5. Serverliste
  2. Lexikon
  3. Filebase
  4. Entwicklung
  5. Forum
    1. Dashboard
    2. Unerledigte Themen
  6. Web-Interface
  7. Artikel
  8. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Seiten
  • Dateien
  • Forum
  • Lexikon
  • Erweiterte Suche
  1. GSManager
  2. Forum
  3. Erweiterungen
  4. Anfragen

AdminsReports download from here

  • GumGes1
  • 21. September 2014 um 16:58
Das Projekt GSManager (vormals ManuAdminMod) wurde am 01.01.2020 eingestellt - diese Internetpräsenz bleibt verfügbar, die Software wird aber nicht länger gepflegt. Vielen Dank für eure Unterstützung in den mehr als zehn vergangenen Jahren!
  • GumGes1
    Fortgeschrittener
    Reaktionen
    10
    Punkte
    1.460
    Trophäen
    1
    Beiträge
    255
    • 21. September 2014 um 16:58
    • #1

    plugin name : admins report
    its report for admins when they reporting name when this player quit and joined anytime its will send msg for admins
    commands : !safe <name> clear reports for players
    : !rp <name> <reason>
    config :

    [reortForAdmins]
    success = "^2Thanks For Report"
    alreadyreported = "^2This Player Already in Report list"
    clearreports = "^2All Reports Cleard For This player"

    i can't upload the php idk why so here is the plugin

    Spoiler anzeigen
    PHP
    <?php
        //---------------------------------------------------------
        // Name : GumGes
        // SITE : http://www.manuadminmod.de/
        // PLUG-IN LOCATION : 
        //---------------------------------------------------------
        //CONFIG.cfg :
        //---------------------------------------------------------
            //[reortForAdmins]
            //success = "^2Thanks For Report"
            //alreadyreported = "^2This Player Already in Report list" ==> note : when admin try to report some one he is already in list it will say that 
            //clearreports = "^2All Reports Cleard For This player"
        //---------------------------------------------------------
        //FILES :
        //---------------------------------------------------------
            $fp = fopen(LOGDIR . "/adminsreport.log", "a");
            $fpsafe = fopen(LOGDIR . "/inSAFE.log", "a");
        //---------------------------------------------------------
        // COMMANDS : 
        //---------------------------------------------------------
            $mod->registerCommand("rp",false,"adminsReport");
            $mod->registerCommand("safe",false,"playerIsSafe");
        //---------------------------------------------------------    
        //CHECK :
        //---------------------------------------------------------
            $mod->registerEvent("playerJoined","checks");
        //---------------------------------------------------------
        // MESSAGES : 
        //---------------------------------------------------------
        $mod->SetDefaultCV("reortForAdmins","success","^2Your Report Saved");
        $mod->SetDefaultCV("reortForAdmins","alreadyreported","^2This player Already in Report list");
        $mod->SetDefaultCV("reortForAdmins","clearreports","^2This player now have 0 reports");
        $mod->SetDefaultCV("reortForAdmins","alreadycleard","^2This player Alread Cleard");
        //---------------------------------------------------------
    
    
            function adminsReport($guid,$parameters){
    
                global $mod;
                global $players;
    
                $search = array_shift($parameters);
                $reason = implode(" ",$parameters);
                $found = $mod->findPlayerGuid($search);
    
                if($found){
    
                    if(!empty($reason)){
    
                        $open = fopen(LOGDIR . "/adminsreport.log", "r");
                        $read = fread($open,5000);
                        $exs = explode("\n",$read);
                        $searching = array_search($found,$exs);
                        if($searching !== false){
    
                            $players[$guid]->say($mod->getCV("reortForAdmins","alreadyreported"));
    
                        }else{
                            $players[$guid]->say($mod->getCV("reortForAdmins","success"));
                            $adminname = $players[$guid]->getName();
                            $thetarget = $players[$found]->getName();
                            $open = fopen(LOGDIR . "/adminsreport.log", "a");
                            $post = "$found\n$adminname\n$thetarget\n$reason";
                            fwrite($open,$post);
                            fclose($open);
                            return true;
                        }
    
                    }
                }else{
    
                            $players[$guid]->say($mod->getLngString("playerNotFound", array("<SEARCH>"), array($search)));
                    }
            }
    
        function playerIsSafe($guid,$parameters){
    
            global $mod;
            global $players;
    
            $name = implode(" ",$parameters);
            $found = $mod->findPlayerGuid($name);
    
            if($found){
    
                    $thefile = fopen(LOGDIR . "/adminsreport.log", "r");
                    $gg = fread($thefile,5000);
                    $inarr = explode("\n",$gg);
                    $should = array_search($found,$inarr);
    
                    if($should !== false){
    
                        $fpsafes = fopen(LOGDIR . "/inSAFE.log", "r");
                        $fl = fread($fpsafes,5000);
                        $safearr = explode("\n",$fl);
                        $se = array_search($found,$safearr);
                        if($se !== false){
    
                            $players[$guid]->say($mod->getCV("reortForAdmins","alreadycleard"));
                        }else{
                            $players[$guid]->say($mod->getCV("reortForAdmins","clearreports"));
                            $posting = "$found\n";
                            $fpsafes = fopen(LOGDIR . "/inSAFE.log", "a");
                            fwrite($fpsafes,$posting);
                            fclose($fpsafes);
                            return true;
                        }
    
    
                    }else{
    
                    }
    
    
            }else{
    
                $players[$guid]->say($mod->getLngString("playerNotFound", array("<SEARCH>"), array($name)));
            }
        }
    
            function checks($guid){
    
                global $mod;
                global $players;
    
    
                $fastfp = fopen(LOGDIR . "/adminsreport.log", "r");
                $getthis = fread($fastfp,5000);
                $arr2 = explode("\n",$getthis);
                $againstart = array_search($guid,$arr2);
                if($againstart !== false){
    
                    $fpsafe = fopen(LOGDIR . "/inSAFE.log", "r");
                    $gget = fread($fpsafe,5000);
                    $arrsf = explode("\n",$gget);
                    $safesearch = array_search($guid,$arrsf);
    
                    if($safesearch !== true){
    
                            $admins = $mod->getAdmins();
                            $online = array();
    
                    foreach ($admins as $adminguid => $admin){
    
                        if (array_key_exists($adminguid, $players)) {
                        //here i make new fastfp i know i have up i can use it but make new one with new line better 
                            $fastfps = fopen(LOGDIR . "/adminsreport.log", "r");
                            $reading = fread($fastfps,5000);
                            $array = explode("\n",$reading);
                            $key = array_keys($array,$guid);
                            foreach($key as $keys => $value){
                                //mykey = reason and name and adminname reporter
                                $adminreporter = $value + 1;
                                $theplayername = $value + 2;
                                $reas = $value + 3;
                                $safes = fopen(LOGDIR . "/inSAFE.log", "r");
                                $readin = fread($safes,5000);
                                $arrays = explode("\n",$readin);
                                $geting = array_search($guid,$arrays);
    
    
                        }
    
                        if($geting === false){
    
                        $players[$adminguid]->say("^2 ".$array[$theplayername]." ^3Reported by ^1 ".$array[$adminreporter]." ^2Reason : ".$array[$reas]);
    
                            }
                    }    
    
                }
    
            }
    
        }
    
    }
    ?>
    Alles anzeigen

    4 Mal editiert, zuletzt von GumGes1 (21. September 2014 um 17:27)

  • GumGes1
    Fortgeschrittener
    Reaktionen
    10
    Punkte
    1.460
    Trophäen
    1
    Beiträge
    255
    • 22. September 2014 um 20:29
    • #2

    replace
    copy and paste at adminsreport.php

    Spoiler anzeigen
    PHP
    <?php
        //---------------------------------------------------------
        // Name : Genius
        // SITE : http://www.manuadminmod.de/
        // PLUG-IN LOCATION : 
        //---------------------------------------------------------
        //CONFIG.cfg :
        //---------------------------------------------------------
            //[reortForAdmins]
            //success = "^2Thanks For Report"
            //alreadyreported = "^2This Player Already in Report list" ==> note : when admin try to report some one he is already in list it will say that 
            //clearreports = "^2All Reports Cleard For This player"
        //---------------------------------------------------------
        //FILES :
        //---------------------------------------------------------
            $fp = fopen(LOGDIR . "/adminsreport.log", "a");
            $fpsafe = fopen(LOGDIR . "/inSAFE.log", "a");
        //---------------------------------------------------------
        // COMMANDS : 
        //---------------------------------------------------------
            $mod->registerCommand("rp",false,"adminsReport");
            $mod->registerCommand("safe",false,"playerIsSafe");
        //---------------------------------------------------------    
        //CHECK :
        //---------------------------------------------------------
            $mod->registerEvent("playerJoined","checks");
        //---------------------------------------------------------
        // MESSAGES : 
        //---------------------------------------------------------
        $mod->SetDefaultCV("reortForAdmins","success","^2Your Report Saved");
        $mod->SetDefaultCV("reortForAdmins","alreadyreported","^2This player Already in Report list");
        $mod->SetDefaultCV("reortForAdmins","clearreports","^2This player now have 0 reports");
        $mod->SetDefaultCV("reortForAdmins","alreadycleard","^2This player Alread Cleard");
        //---------------------------------------------------------
    
    
            function adminsReport($guid,$parameters){
    
                global $mod;
                global $players;
    
                $search = array_shift($parameters);
                $reason = implode(" ",$parameters);
                $found = $mod->findPlayerGuid($search);
    
                if($found){
    
                    if(!empty($reason)){
    
                        $open = fopen(LOGDIR . "/adminsreport.log", "r");
                        $read = fread($open,5000);
                        $exs = explode("\n",$read);
                        $searching = array_search($found,$exs);
                        if($searching !== false){
    
                            $players[$guid]->say($mod->getCV("reortForAdmins","alreadyreported"));
    
                        }else{
                            $players[$guid]->say($mod->getCV("reortForAdmins","success"));
                            $adminname = $players[$guid]->getName();
                            $thetarget = $players[$found]->getName();
                            $open = fopen(LOGDIR . "/adminsreport.log", "a");
                            $post = "$found\n$adminname\n$thetarget\n$reason\n";
                            fwrite($open,$post);
                            fclose($open);
                            return true;
                        }
    
                    }
                }else{
    
                            $players[$guid]->say($mod->getLngString("playerNotFound", array("<SEARCH>"), array($search)));
                    }
            }
    
        function playerIsSafe($guid,$parameters){
    
            global $mod;
            global $players;
    
            $name = implode(" ",$parameters);
            $found = $mod->findPlayerGuid($name);
    
            if($found){
    
                    $thefile = fopen(LOGDIR . "/adminsreport.log", "r");
                    $gg = fread($thefile,5000);
                    $inarr = explode("\n",$gg);
                    $should = array_search($found,$inarr);
    
                    if($should !== false){
    
                        $fpsafes = fopen(LOGDIR . "/inSAFE.log", "r");
                        $fl = fread($fpsafes,5000);
                        $safearr = explode("\n",$fl);
                        $se = array_search($found,$safearr);
                        if($se !== false){
    
                            $players[$guid]->say($mod->getCV("reortForAdmins","alreadycleard"));
                        }else{
                            $players[$guid]->say($mod->getCV("reortForAdmins","clearreports"));
                            $posting = "$found\n";
                            $fpsafes = fopen(LOGDIR . "/inSAFE.log", "a");
                            fwrite($fpsafes,$posting);
                            fclose($fpsafes);
                            return true;
                        }
    
    
                    }else{
    
                    }
    
    
            }else{
    
                $players[$guid]->say($mod->getLngString("playerNotFound", array("<SEARCH>"), array($name)));
            }
        }
    
            function checks($guid){
    
                global $mod;
                global $players;
    
    
                $fastfp = fopen(LOGDIR . "/adminsreport.log", "r");
                $getthis = fread($fastfp,5000);
                $arr2 = explode("\n",$getthis);
                $againstart = array_search($guid,$arr2);
                if($againstart !== false){
    
                    $fpsafe = fopen(LOGDIR . "/inSAFE.log", "r");
                    $gget = fread($fpsafe,5000);
                    $arrsf = explode("\n",$gget);
                    $safesearch = array_search($guid,$arrsf);
    
                    if($safesearch !== true){
    
                            $admins = $mod->getAdmins();
                            $online = array();
    
                    foreach ($admins as $adminguid => $admin){
    
                        if (array_key_exists($adminguid, $players)) {
                        //here i make new fastfp i know i have up i can use it but make new one with new line better 
                            $fastfps = fopen(LOGDIR . "/adminsreport.log", "r");
                            $reading = fread($fastfps,5000);
                            $array = explode("\n",$reading);
                            $key = array_keys($array,$guid);
                            foreach($key as $keys => $value){
                                //mykey = reason and name and adminname reporter
                                $adminreporter = $value + 1;
                                $theplayername = $value + 2;
                                $reas = $value + 3;
                                $safes = fopen(LOGDIR . "/inSAFE.log", "r");
                                $readin = fread($safes,5000);
                                $arrays = explode("\n",$readin);
                                $geting = array_search($guid,$arrays);
    
    
                        }
    
                        if($geting === false){
    
                        $players[$adminguid]->say("^2 ".$array[$theplayername]." ^3Reported by ^1 ".$array[$adminreporter]." ^2Reason : ".$array[$reas]);
    
                            }
                    }    
    
                }
    
            }
    
        }
    
    }
    ?>
    Alles anzeigen

    Einmal editiert, zuletzt von GumGes1 (22. September 2014 um 20:41)

  • share.the.pa1n
    Anfänger
    Reaktionen
    3
    Punkte
    158
    Beiträge
    28
    • 28. September 2014 um 19:44
    • #3

    Can you please give me concrete instructions how to install it? I created a adminsreport.php and put it in a adminsreport folder (mam/plugins). What is the next step? Sorry I'm a newbie :D
    Thank you

  • Dieses Thema enthält 5 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind.
  1. Mitarbeiter
  2. Datenschutzerklärung
  3. Nutzungsbedingungen
  4. Impressum
  5. Kontakt
Community-Software: WoltLab Suite™