Whitelister Ver: 3.0

Discussion in 'Whitelisting' started by Ketting, Dec 8, 2012.

  1. Xander

    Xander New Member

    Joined:
    Nov 1, 2012
    Messages:
    13
    Likes Received:
    3
    Hey thanks for the whitelister, it is the best I could find for DayZ so keep up the good work. :)
    I've made a little web interface for it, so new players can register and get whitelisted after they click on an activation link send via email. Works great so far if you want I could release it for other people to use!?

    Anyway I had to setup my own database table because I don't have access to the source of your whitelister and needed a place to store temporary whitelist requests who are not activated yet (also with IP and registration date etc), so maybe you could change your table to add a field like "active" so admins can disable players in the whitelist, or like me players register with active=0 and after they click the activation link will be activated without any admin interaction, that should be safe enough for a whitelist I think.

    If you want to see my whitelist registration in action take a look, your can test it but please don't spam me with 1000 requests if you don't like to play on my server, thanks. :D http://brs.8bit.info/whitelist/
     
  2. Ketting

    Ketting New Member

    Joined:
    Nov 13, 2012
    Messages:
    24
    Likes Received:
    2
    Thanks for the compliment :rolleyes:.

    Really cool (and smart) that u created a webpage / interface using email.

    The version u are using is the first one i created, i use to host my own community.
    I updated for my own needs, and created a web-interface and a automatic whitelist function.

    How it works:
    A admin enters the webpage and fills out a form (a small one, just a player name).
    The webpage makes the a new entry using the name, and places a special code in the guid row.
    If the player joins the server the whitelister will replace the code with the players guid.

    i would love your toughs on the auto whitelist system.

    ps: nice webpage.
     
  3. nightwolfq

    nightwolfq New Member

    Joined:
    Oct 18, 2013
    Messages:
    7
    Likes Received:
    0
    everyone is doing it, I'm tied to a social network to solve the problem of re-registration, you have implemented check for GUID? to match the name or GUID? Now here's an invitation to implement and if the user register at the invitation and will be invited to the server for more than 2 hours, the invited get a backpack for 24 slots
     
  4. Ketting

    Ketting New Member

    Joined:
    Nov 13, 2012
    Messages:
    24
    Likes Received:
    2
    I don't understand u. :(
     
  5. Xander

    Xander New Member

    Joined:
    Nov 1, 2012
    Messages:
    13
    Likes Received:
    3
    Yeah I didn't thought about putting a code in the GUID column, but I couldn't know what your whitelister would do with that or if it might get buggy so I just used a separate db table and copy the data when the player gets activated! :D

    It's working great so far, we have like 150 people whitelisted since yesterday, but there were about 10 people who misspelled there name (duh) or GUID, so an admin has to look into that because you can't just register again if you misspelled something (unique values), thats just a small problem, everything else works without admin interaction at all. :)

    Anyway I got an idea from another player, so the whitelister could create the entry with name and GUID himself when someone tries to connect because then you would never have the problem with misseplled names or GUID and its easier for players. The point of this is the player gets kicked with a generated code he can then use to activate his account and only have to enter that code and no name or GUID at all because the whitelister already has that data. If that is not secure enough it could also be combined with email activation like this:
    1. Player logs into server, gets kicked with "Not whitelisted, go to whitelist.com with code 123456"
    2. Player enters the code and his email only at whitelist.com and receives an mail with activation link in it
    3. player clicks on the activation link and is whitelisted

    Just an idea, and sorry for the long post. :p


    @nightwolf, I don't unterstand you either, sorry lol
    And I dont like the idea to tie a whitelist entry to facebook or something to be honest (if you mean that)
     
  6. Xander

    Xander New Member

    Joined:
    Nov 1, 2012
    Messages:
    13
    Likes Received:
    3
  7. KoTaS

    KoTaS New Member

    Joined:
    Oct 14, 2013
    Messages:
    8
    Likes Received:
    0
    [Err] 1067 - Invalid default value for 'created'
    [Err] CREATE TABLE `whitelist_temp` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `name` varchar(128) NOT NULL,
    `guid` varchar(32) NOT NULL,
    `email` varchar(254) NOT NULL,
    `ip` varchar(15) NOT NULL,
    `created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `activated` tinyint(3) unsigned NOT NULL DEFAULT '0',
    `activation_code` varchar(10) DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `name_UNIQUE` (`name`),
    UNIQUE KEY `guid_UNIQUE` (`guid`),
    UNIQUE KEY `email_UNIQUE` (`email`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

    CREATE TABLE `whitelist` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `guid` varchar(32) NOT NULL,
    `name` varchar(128) NOT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `guid_UNIQUE` (`guid`),
    UNIQUE KEY `name_UNIQUE` (`name`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    [Msg] Finished - Unsuccessfully
    --------------------------------------------------
     
  8. KoTaS

    KoTaS New Member

    Joined:
    Oct 14, 2013
    Messages:
    8
    Likes Received:
    0
    Eror i get wheni try put your sql file... using navicat
     
  9. Xander

    Xander New Member

    Joined:
    Nov 1, 2012
    Messages:
    13
    Likes Received:
    3
    I guess you (your hoster?) are running an old version of MySQL, I didn't notice it before because I have the latest one on my machines! But I just looked it up and the "DEFAULT CURRENT_TIMESTAMP" value is only supported since MySQL 5.6.5! You can just change that line to "`created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP," that should work since it is not used in the code but just saved in the database for later use or whatever (replace "datetime" with "TIMESTAMP").
     
  10. KoTaS

    KoTaS New Member

    Joined:
    Oct 14, 2013
    Messages:
    8
    Likes Received:
    0
    What PHP/APACHE version you are using? Keep getting error

    Parse error: parse error in D:\wamp\www\index.php on line 25
     
  11. Xander

    Xander New Member

    Joined:
    Nov 1, 2012
    Messages:
    13
    Likes Received:
    3
    Anything else not working?, I can't tell you what the minimum required version is, because it is not easy to find out other then checking every function since when it is available, BUT it should work with PHP 5.1.0+ I think.
    What versions of MySQL and PHP are you running and what are the errors (if any, but seems like there are)?
    I use MySQL 5.6.14 x64, Apache HTTPD 2.4.6 x64 and PHP 5.5.5 x64 Thread Safe (which is experimental if you want to know lol) on Windows 2008 R2 SP1... latest shit sorry :D

    But I've tested it on my old server which I didnt update for like 2 years (php and apache i mean)
     
  12. KoTaS

    KoTaS New Member

    Joined:
    Oct 14, 2013
    Messages:
    8
    Likes Received:
    0
    For me is no problem to install latest, I'am running from my home :p Just wanted to know what version you got there to make it running on my server :)
     
  13. Xander

    Xander New Member

    Joined:
    Nov 1, 2012
    Messages:
    13
    Likes Received:
    3
    Yeah then just use the latest versions, why not? Ok better stop hijacking this thread for other purposes then! :)
    Anyway I've tried it with a local mail server first, then you can just use the PHP mail() function but its the crap, worked fine but many mail provider block incoming mails from my server so I had to use an external SMTP for mail sending.. not that bad but I had to figure that out first! :D
     
  14. KoTaS

    KoTaS New Member

    Joined:
    Oct 14, 2013
    Messages:
    8
    Likes Received:
    0
    This is use full stuff we are talking about, because other people might get in same troubles as i did
     
  15. Xander

    Xander New Member

    Joined:
    Nov 1, 2012
    Messages:
    13
    Likes Received:
    3
    I checked there error you had, I gues sit might come from this:
    PHP:
    $res->fetch_row()[0]
    I've used that notation many times before, but maybe split it up if that works better:
    PHP:
    $row $res->fetch_row();
    $name $row[0];
    I was just for my personal use to far ^^
     
  16. KoTaS

    KoTaS New Member

    Joined:
    Oct 14, 2013
    Messages:
    8
    Likes Received:
    0
    I dont know, but i cannot get this to work, give me all bunch of error, tried with all different php/apache versions nothing works even try with php 5.5.3 and nothing, just errors in all the page
     
  17. Xander

    Xander New Member

    Joined:
    Nov 1, 2012
    Messages:
    13
    Likes Received:
    3
    Ok I've tested it again with the original code from github and it works like intendet on my server!
    I can't help you if you don't show me the error, I enabled all warnings and errors and nothing it just works on my end. Maybe try and add this in the config.php to show all warnings and errors:
    PHP:
    error_reporting(E_ERROR E_WARNING E_PARSE);
    ini_set('display_errors'1);
    Maybe you don't have all the required dependencies I put in the README? like MySQLi (disabled by default in the php.ini) and the PHPMailer classes.. please read the readme first I can't help you like this :)
     
  18. bone

    bone New Member

    Joined:
    May 13, 2013
    Messages:
    10
    Likes Received:
    0
    Funciona de 10 xD la comunidad www.cib3rbit.es te da la gracias por este gran aporte



    [​IMG]
     
  19. Mr.BorisBritva

    Mr.BorisBritva New Member

    Joined:
    Jan 6, 2014
    Messages:
    18
    Likes Received:
    0
    Hi everyone!
    Xander
    i used your web interface, it is cool:). But i have errors on on lines 89 and 93:(. In this lines i have php code for box in top. Can you help me please!
     
  20. Xander

    Xander New Member

    Joined:
    Nov 1, 2012
    Messages:
    13
    Likes Received:
    3
    what errors? some details maybe? :)
     

Share This Page