Skip to content

Commit 966172c

Browse files
committed
Ingore Warnings Setting added
1 parent 36c0104 commit 966172c

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

app/TeamSpeak3Bot.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function __construct($username, $password, $host = "127.0.0.1", $port = 1
136136
{
137137
$this->carbon = new Carbon;
138138

139-
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN' && posix_getuid() === 0) {
139+
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN' && posix_getuid() === 0 && !Self::$config['ignoreWarnings']) {
140140
$this->printOutput("[WARNING] Running Nimda as root is bad!");
141141
$this->printOutput("Start anyway? Y/N:", false);
142142
$response = rtrim(fgets(STDIN));
@@ -146,7 +146,7 @@ public function __construct($username, $password, $host = "127.0.0.1", $port = 1
146146
}
147147
}
148148

149-
if($username === "serveradmin") {
149+
if($username === "serveradmin" && !Self::$config['ignoreWarnings']) {
150150
$this->printOutput("[WARNING] Running Nimda logged in as serveradmin is bad!");
151151
$this->printOutput("Start anyway? Y/N:", false);
152152
$response = rtrim(fgets(STDIN));

config/TeamSpeak.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ class TeamSpeak
2020
'timeout' => 1,
2121
'misc' => [
2222
'debug' => true,
23-
'newLineNewMessage' => true,
23+
'newLineNewMessage' => false,
24+
'ignoreWarnings' => true
2425
]
2526
];
2627

config/plugins/GlobalBanList.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
"event": "cliententerview",
1010
"usage": false,
1111
"enabled": true,
12-
"ban": true,
12+
"ban": false,
1313
"alert": true,
1414
"alert_groups": [
15-
"64"
15+
12,
16+
13,
17+
14
1618
]
1719
}

0 commit comments

Comments
 (0)