Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- event.on('clientMove', function(ev) {
- //NOTE: SELECT ALL GROUPS
- //NOTE: Joint on this Server.
- if (ev.client.fromChannel == undefined) {
- //NOTE: Connect to the PHP/Cloud
- http({
- url: 'http://dev.allesverhext.de/ts/select.php' + '/?key=' + ev.client.uniqueID()
- },
- //NOTE: Read from the CloudServer...
- function(err, res) {
- if (err) {
- log('phpCode: ' + err);
- return
- }
- //NOTE: Collect all information about
- if (res.statusCode == 200) {
- //NOTE: Save all Information into the Catch
- var responsee = JSON.parse(res.data);
- ev.client.getServerGroups().forEach(function(servergroup) {
- //NOTE: Set the Status for Verify
- if (responsee == true) {
- if (servergroup.ID() == config.defaulRang.toString()) {
- engine.log('Freigeschaltet')
- setTimeout(function() {
- ev.client.addToServerGroup(config.verifyRang.toString())
- }, 100);
- ev.client.chat('Automatisch Freigeschaltet!');
- }
- } else if (responsee == false) {
- ev.client.chat(config.msgJoin)
- } else {
- engine.log('-> [Verify-System] The Verify Cloud-Server are down. Please wait or Contact <support@verify-cloud.de>')
- ev.client.chat('[Verify-System] The Verify Cloud-Server are down. Please wait or Contact [url] <support@verify-cloud.de>[/url]');
- }
- }); //NOTE: Finish CloudSystem
- }
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement