Advertisement
Guest User

Untitled

a guest
Mar 7th, 2017
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. event.on('clientMove', function(ev) {
  2. //NOTE: SELECT ALL GROUPS
  3. //NOTE: Joint on this Server.
  4. if (ev.client.fromChannel == undefined) {
  5. //NOTE: Connect to the PHP/Cloud
  6. http({
  7. url: 'http://dev.allesverhext.de/ts/select.php' + '/?key=' + ev.client.uniqueID()
  8. },
  9. //NOTE: Read from the CloudServer...
  10. function(err, res) {
  11. if (err) {
  12. log('phpCode: ' + err);
  13. return
  14. }
  15. //NOTE: Collect all information about
  16. if (res.statusCode == 200) {
  17. //NOTE: Save all Information into the Catch
  18. var responsee = JSON.parse(res.data);
  19. ev.client.getServerGroups().forEach(function(servergroup) {
  20. //NOTE: Set the Status for Verify
  21. if (responsee == true) {
  22. if (servergroup.ID() == config.defaulRang.toString()) {
  23. engine.log('Freigeschaltet')
  24. setTimeout(function() {
  25. ev.client.addToServerGroup(config.verifyRang.toString())
  26. }, 100);
  27. ev.client.chat('Automatisch Freigeschaltet!');
  28.  
  29. }
  30. } else if (responsee == false) {
  31. ev.client.chat(config.msgJoin)
  32. } else {
  33. engine.log('-> [Verify-System] The Verify Cloud-Server are down. Please wait or Contact <support@verify-cloud.de>')
  34. ev.client.chat('[Verify-System] The Verify Cloud-Server are down. Please wait or Contact [url] <support@verify-cloud.de>[/url]');
  35. }
  36. }); //NOTE: Finish CloudSystem
  37.  
  38. }
  39.  
  40. });
  41. }
  42. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement