Test Setup Failed
Push — master ( 98396b...303695 )
by Bob
04:38
created
config/config.new.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     "trigger" => "!", // what trigger is used for commands
32 32
     "guild" => 152677265635803136, // guildID 
33 33
     "token" => "", //enter the token for your app (https://discordapp.com/developers/applications/me)
34
-	"adminRoles" => array("Admin","")//enter the roles that you'd like to have access to admin commands
34
+    "adminRoles" => array("Admin","")//enter the roles that you'd like to have access to admin commands
35 35
 );
36 36
 
37 37
 $config["database"] = array(
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     "trigger" => "!", // what trigger is used for commands
32 32
     "guild" => 152677265635803136, // guildID 
33 33
     "token" => "", //enter the token for your app (https://discordapp.com/developers/applications/me)
34
-	"adminRoles" => array("Admin","")//enter the roles that you'd like to have access to admin commands
34
+	"adminRoles" => array("Admin", "")//enter the roles that you'd like to have access to admin commands
35 35
 );
36 36
 
37 37
 $config["database"] = array(
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         "alertChannel" => 0, // if using periodic check put the channel you'd like the bot to log removing users in. (Recommended you don't use an active chat channel)
135 135
         "nameEnforce" => "false", // if "true" bot will automatically change nicknames so that they match player names.
136 136
         "url" => "http://.....", // put a url here if using sso auth for ur sso page.
137
-        "exempt" => array("","") // role names that are exempt from auth checks (wont be removed by the bot)
137
+        "exempt" => array("", "") // role names that are exempt from auth checks (wont be removed by the bot)
138 138
     ),
139 139
     //Killmail posting
140 140
     "getKillmails" => array(
Please login to merge, or discard this patch.
Dramiel.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,8 +102,8 @@
 block discarded – undo
102 102
 $plugins = array();
103 103
 foreach ($pluginDirs as $dir) {
104 104
     foreach (glob($dir) as $plugin) {
105
-		var_dump($plugin);
106
-		var_dump($adminPlugins);
105
+        var_dump($plugin);
106
+        var_dump($adminPlugins);
107 107
         // Only load the plugins we want to load, according to the config
108 108
         if (!in_array(str_replace(".php", "", basename($plugin)), $config["enabledPlugins"]) && in_array(str_replace(".php", "", basename($plugin), $adminPlugins))) {
109 109
             continue;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
 
98 98
 // Load chat plugins
99 99
 $pluginDirs = array("src/plugins/onMessage/*.php", "src/plugins/admin/*.php");
100
-$adminPlugins = array("setNickname","updateBot","holder");
100
+$adminPlugins = array("setNickname", "updateBot", "holder");
101 101
 $logger->addInfo("Loading in chat plugins");
102 102
 $plugins = array();
103 103
 foreach ($pluginDirs as $dir) {
Please login to merge, or discard this patch.
src/plugins/admin/updateBot.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -74,32 +74,32 @@
 block discarded – undo
74 74
         $data = command($message, $this->information()["trigger"], $this->config["bot"]["trigger"]);
75 75
         if (isset($data["trigger"])) {
76 76
 			
77
-			//Admin Check
78
-			$botID = $this->discord->id;
79
-		$userID = $msgData["message"]["fromID"];
77
+            //Admin Check
78
+            $botID = $this->discord->id;
79
+        $userID = $msgData["message"]["fromID"];
80 80
         $adminRoles = $this->config["bot"]["adminRoles"];
81 81
         $id = $this->config["bot"]["guild"];
82 82
         $guild = $this->discord->guilds->get('id', $id);
83
-		$member = $guild->members->get("id", $userID);
84
-		$roles = $member->roles;
85
-		foreach ($roles as $role) {
83
+        $member = $guild->members->get("id", $userID);
84
+        $roles = $member->roles;
85
+        foreach ($roles as $role) {
86 86
                     if(!isset($role->name)){
87 87
                         if(!in_array($role->name, $adminRoles, true)){
88 88
                             $msg = ":bangbang: You do not have the necessary roles to issue this command :bangbang:";
89
-							$this->message->reply($msg);
90
-							return null;
89
+                            $this->message->reply($msg);
90
+                            return null;
91 91
                         }
92 92
                     }
93 93
                 }
94 94
 
95 95
             $update = updateBot($this->logger);
96
-			if ($update = "1"){
97
-				$msg = "Bot succesfully updated, restarting.";
98
-				$this->logger->addInfo("Bot succesfully updated, restarting.");
99
-				$this->message->reply($msg);
100
-				sleep(5);
101
-				die();
102
-			}
96
+            if ($update = "1"){
97
+                $msg = "Bot succesfully updated, restarting.";
98
+                $this->logger->addInfo("Bot succesfully updated, restarting.");
99
+                $this->message->reply($msg);
100
+                sleep(5);
101
+                die();
102
+            }
103 103
         }
104 104
     }
105 105
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
 		$member = $guild->members->get("id", $userID);
84 84
 		$roles = $member->roles;
85 85
 		foreach ($roles as $role) {
86
-                    if(!isset($role->name)){
87
-                        if(!in_array($role->name, $adminRoles, true)){
86
+                    if (!isset($role->name)) {
87
+                        if (!in_array($role->name, $adminRoles, true)) {
88 88
                             $msg = ":bangbang: You do not have the necessary roles to issue this command :bangbang:";
89 89
 							$this->message->reply($msg);
90 90
 							return null;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                 }
94 94
 
95 95
             $update = updateBot($this->logger);
96
-			if ($update = "1"){
96
+			if ($update = "1") {
97 97
 				$msg = "Bot succesfully updated, restarting.";
98 98
 				$this->logger->addInfo("Bot succesfully updated, restarting.");
99 99
 				$this->message->reply($msg);
Please login to merge, or discard this patch.
src/plugins/admin/setNickname.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -74,20 +74,20 @@
 block discarded – undo
74 74
         $data = command($message, $this->information()["trigger"], $this->config["bot"]["trigger"]);
75 75
         if (isset($data["trigger"])) {
76 76
 			
77
-			//Admin Check
78
-			$botID = $this->discord->id;
79
-		$userID = $msgData["message"]["fromID"];
77
+            //Admin Check
78
+            $botID = $this->discord->id;
79
+        $userID = $msgData["message"]["fromID"];
80 80
         $adminRoles = $this->config["bot"]["adminRoles"];
81 81
         $id = $this->config["bot"]["guild"];
82 82
         $guild = $this->discord->guilds->get('id', $id);
83
-		$member = $guild->members->get("id", $userID);
84
-		$roles = $member->roles;
85
-		foreach ($roles as $role) {
83
+        $member = $guild->members->get("id", $userID);
84
+        $roles = $member->roles;
85
+        foreach ($roles as $role) {
86 86
                     if(!isset($role->name)){
87 87
                         if(!in_array($role->name, $adminRoles, true)){
88 88
                             $msg = ":bangbang: You do not have the necessary roles to issue this command :bangbang:";
89
-							$this->message->reply($msg);
90
-							return null;
89
+                            $this->message->reply($msg);
90
+                            return null;
91 91
                         }
92 92
                     }
93 93
                 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
 		$member = $guild->members->get("id", $userID);
84 84
 		$roles = $member->roles;
85 85
 		foreach ($roles as $role) {
86
-                    if(!isset($role->name)){
87
-                        if(!in_array($role->name, $adminRoles, true)){
86
+                    if (!isset($role->name)) {
87
+                        if (!in_array($role->name, $adminRoles, true)) {
88 88
                             $msg = ":bangbang: You do not have the necessary roles to issue this command :bangbang:";
89 89
 							$this->message->reply($msg);
90 90
 							return null;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                 }
94 94
 
95 95
             $member = $guild->members->get("id", $botID);
96
-            $nick = (string)$data["messageString"];
96
+            $nick = (string) $data["messageString"];
97 97
             $member->setNickname($nick);
98 98
 
99 99
             $msg = "Bot nickname changed to **{$nick}** by {$msgData["message"]["from"]}";
Please login to merge, or discard this patch.
src/lib/autoUpdate.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@
 block discarded – undo
29 29
  */
30 30
 function updateBot($logger)
31 31
 {
32
-	$logger->addInfo("Updating Bot");
33
-	putenv("COMPOSER_HOME=/usr/local/bin/composer");
32
+    $logger->addInfo("Updating Bot");
33
+    putenv("COMPOSER_HOME=/usr/local/bin/composer");
34 34
     $output = shell_exec('sh ' . dirname(__FILE__) . '/update.sh');
35
-	if ($output = "1"){
36
-		$logger->addInfo("Update Complete");
37
-		return "1";
38
-	}
35
+    if ($output = "1"){
36
+        $logger->addInfo("Update Complete");
37
+        return "1";
38
+    }
39 39
 	
40 40
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 	$logger->addInfo("Updating Bot");
33 33
 	putenv("COMPOSER_HOME=/usr/local/bin/composer");
34 34
     $output = shell_exec('sh ' . dirname(__FILE__) . '/update.sh');
35
-	if ($output = "1"){
35
+	if ($output = "1") {
36 36
 		$logger->addInfo("Update Complete");
37 37
 		return "1";
38 38
 	}
Please login to merge, or discard this patch.