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. 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

[Complaint Cell Plugin installation]

  • Azad69
  • 17. Januar 2014 um 15:47
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!
  • Azad69
    Fortgeschrittener
    Reaktionen
    13
    Punkte
    1.428
    Trophäen
    2
    Beiträge
    248
    • 17. Januar 2014 um 15:47
    • #1

    I have found a plugin that will come in handy for me but can't add the code to [manuadminmod/plugin/basiccommands.php] properly to make it work

    Here is the link:- http://archive.manuadminmod.de/thread/2410/complaint-cell/

    1. Add the code to your manuadminmod/plugin/basiccommands.php
    2. Add the "comp" in the manuadminmod/config/groups.cfg (add comp to all groups)
    3. Add the a text file with name complaint to log folder and change its extension to .log (manuadminmod/log/complaint.log)
    4. Type !comp yourmsg

    Can someone please add the code to basiccommands.php properly to make this plugin work, And reply with the whole PHP Source Code of basiccommands.php


    Thanks :grin:

  • Mirko911
    Entwickler
    Reaktionen
    165
    Punkte
    16.820
    Trophäen
    6
    Beiträge
    3.263
    Einträge
    11
    • 17. Januar 2014 um 17:09
    • #2

    Create a new php file in plugins folder and add this

    PHP
    <?php
    /**
     * Writes complaints in a logfile
     *
     * With this command, complaints will be added to the logfile
     *
     * @package Plugins
     * @subpackage none
     * @version 1.0
     *
     * @copyright ManuAdminMod (http://www.manuadminmod.de)
    *
     * @author mirko911 (original jinkazama)
     * @since 17.01.14
     */
    $mod->registerCommand("comp", '~^comp \S.*$~i', "comp");
    $mod->setDefaultCV("complaint", "enabled", 1);
    
    
    
    
    /**
     * Writes complaints in a logfile
     * 
     * @author mirko911 (original jinkazama)
     * @since 17.01.14
     * @global mod $mod 
     * @global player $players
     * @param string $guid 32 char long hex guid
     * @return boolean true if all successful
     */
    function comp($guid, $parameters) {
        global $mod,$players;
    
        if(!$mod->getCV("complaint", "enabled"))return false;
    
        $parameters = implode(" ", $parameters);
    
        $players[$guid]->say("Complaint Registered");
        $players[$guid]->say("Your Complaint is > ^0" . $parameters);    
    
        $timestamp = date("[d.m.y H:i:s]");
    
        $fp = fopen(LOGDIR . "/complaint.log", "a");
        fwrite($fp, $timestamp . " [" . $guid . "] : [" . $parameters . "] Complaint by [ " . $players[$guid]->getName() . " ]\n\n");
        fclose($fp);
        return true;
    }
    ?>
    Alles anzeigen

    add to config.cfg

    Code
    [complaint]
    enabled = 1

    add to groups.cfg

    Code
    comp

    Plugin not tested. I just rewrote it to add this later as plugin in the plugin section. But it should work

    2 Mal editiert, zuletzt von Mirko911 (19. Januar 2014 um 15:44)

  • Azad69
    Fortgeschrittener
    Reaktionen
    13
    Punkte
    1.428
    Trophäen
    2
    Beiträge
    248
    • 18. Januar 2014 um 12:44
    • #3
    Zitat von Mirko911

    Create a new php file in plugins folder and add this

    What should be the new php file name?

  • Dieses Thema enthält 19 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™