ChatReport Inactive

Easy tool to report Spammers etc

  1. smillingDeathLp
    ChatReport is your solution against spammers etc. ChatReport is automatically storing all send Chat Messages in a MySQL-Database. With the in the .zip Archive included "report.php" file, you can really easy display these on you Webserver. (Example: here)

    Fine, but how do I set it up?
    First off all, put the plugin in your plugins folder and restart the server. After you have done this go into the config.yml. There you can change all your MySQL data etc...
    Code (Text):
    host: localhost <--- Your MySQL host
    user: root <--- Your MySQL user
    pass: supersecretpassword <--- Your MySQL password
    database: chatreport <--- Your MySQL database
    #Enter the whole link to the page for Example: http://www.google.com/report.php
    link: yourlinktowebpage <--- The link to the Webserver report.php is on
    #Don`t change this
    id: 0
    Reload or Restart the server after you have done the changes. That`s it, your Server is ready to go.
    Now you have to upload the "report.php" file to your webserver.
    Code (Text):
    <html>
    <head>
    <link href="style.css" type="text/css" rel="stylesheet">
    </head>
    </html>
    <?PHP
    if($_SERVER['REQUEST_METHOD'] == 'GET')
    {
    function getName($uuid)
    {
        $ch = curl_init();
        $curlConfig = array(
            CURLOPT_URL => "https://uuid.swordpvp.com/session/" . $uuid,
            CURLOPT_RETURNTRANSFER => true,
        );
        curl_setopt_array($ch, $curlConfig);
        $json = curl_exec($ch);
        curl_close($ch);
        $jsonFinal = json_decode($json, true);
        return $jsonFinal['name'];
    }
    /*-------SETTINGS-------*/
    $mysql_host = 'localhost';
    $mysql_user = 'root';
    $mysql_pass = 'pass';
    $mysql_db = 'chatreport';
    $uuid = $_GET['uuid'];
    $caseid = $_GET['caseid'];
    $player = getName($uuid);
    /*----------------------*/
    echo "<p><b> Chatlog $player - Case #$caseid </b></p>";

    mysql_connect($mysql_host,$mysql_user,$mysql_pass) or throwError("MySQL-Fehler: " . mysql_error());
    mysql_select_db($mysql_db) or throwError("MySQL-Fehler: " . mysql_error());

    $query = "SELECT * FROM log WHERE uuid = '$uuid'";
    $resource = mysql_query($query) or throwError("MySQL-Fehler: " . mysql_error());
    while($ds = mysql_fetch_assoc($resource))
        {
            $msg = $ds["message"];
            $time = $ds["time"];
            echo "<p> $time : $msg </p>";
        }
        // Replace the # with your Server Logo, if you want to
        //echo "<img src='#'>";
    }else{
    echo $_SERVER['REQUEST_METHOD'];
    }
    ?>
    If you have done all this, you`re now ready to go! Write something in the chat and enter /chatreport <yourname>. Then follow the link and see what happens.

    You`re very welcome to write any bugs and ideas into the comments. I`ll try my best to fix/add them then.
    Ali120 likes this.

Recent Updates

  1. MySQL Fix
  2. Fixed some Bugs
  3. Adding Herochat Support

Recent Reviews

  1. asteroidsteam
    asteroidsteam
    2/5,
    Version: Inactive
    I had to edit the sql database to get uuid's to work prpporly, I had to use a bytecode editor to fix the errored sql syntax And I had to recode the php file
  2. xSSHa
    xSSHa
    5/5,
    Version: 1.0 Release
    The plugin works great :D
    thanks you