-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18c3ebe
commit bee79c4
Showing
2 changed files
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,13 +45,13 @@ public function isTriggered() | |
$fields = [ | ||
'key' => $this->CONFIG['key'], | ||
'uid' => $client['client_unique_identifier']->toString(), | ||
'ip' => $client['connection_client_ip'], | ||
'banned_by' => $this->info['invokername'], | ||
'banned_by_uid' => $this->info['invokeruid'], | ||
'reason' => $reason, | ||
'ip' => $client['connection_client_ip']->toString(), | ||
'banned_by' => $this->info['invokername']->toString(), | ||
'banned_by_uid' => $this->info['invokeruid']->toString(), | ||
'reason' => $reason->toString(), | ||
'server_name' => $this->server->toString(), | ||
'server_uid' => $this->server['virtualserver_unique_identifier'], | ||
'h' => hash_pbkdf2('sha1', sprintf("%s-%s-%s", $this->CONFIG['key'], $client['client_unique_identifier']->toString(),$this->info['invokeruid']),$this->server['virtualserver_unique_identifier'], 1, 8), | ||
'server_uid' => $this->server['virtualserver_unique_identifier']->toString(), | ||
'h' => hash_pbkdf2('sha1', sprintf("%s-%s-%s", $this->CONFIG['key'], $client['client_unique_identifier']->toString(),$this->info['invokeruid']),$this->server['virtualserver_unique_identifier']->toString(), 1, 8), | ||
|
||
]; | ||
|
||
|
@@ -73,14 +73,16 @@ public function isTriggered() | |
try { | ||
$client->poke("[b][color=red]You are global banned by Nimda ID: #{$response->ban_id}"); | ||
$client->poke("[b][color=red]Visit [url=#]Global Ban Support[/url]."); | ||
$client->ban(1, "Global Ban ID #{$response->ban_id} ({$reason})"); | ||
$client->ban(0, "Global Ban ID #{$response->ban_id} ({$reason})"); | ||
}catch(Ts3Exception $e){ | ||
return; | ||
} | ||
|
||
$this->sendOutput(sprintf("[b][color=green] Client %s successfully global banned ID #%s", $client, $response->ban_id)); | ||
} elseif ($response->success === false && $response->err === 0x02) { | ||
$this->sendOutput("[COLOR=red][b]This server is not authorized to global ban, email [email protected]"); | ||
} else { | ||
$this->sendOutput("[COLOR=orange][b]Unexpected error"); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters