Revert "Roll back"

This reverts commit 29504c09f263e73492c6ffecea201a81dcf3591d.
This commit is contained in:
Shoghi Cervantes
2013-08-28 20:55:42 +02:00
parent 13a5a8df57
commit e1e804ffe3
208 changed files with 4959 additions and 4174 deletions

View File

@ -1,22 +1,28 @@
<?php
/**
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
/*
-
/ \
/ \
/ PocketMine \
/ MP \
|\ @shoghicp /|
|. \ / .|
| .. \ / .. |
| .. | .. |
| .. | .. |
\ | /
\ | /
\ | /
\ | /
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
*/
class ChatAPI{
@ -97,27 +103,18 @@ class ChatAPI{
}
public function send($owner, $text, $whitelist = false, $blacklist = false){
$message = array(
"player" => $owner,
"message" => $text,
);
$message = "";
if($owner !== false){
if($owner instanceof Player){
if($whitelist === false){
console("[INFO] <".$owner->username."> ".$text);
}
$message = "<".$owner->username."> ";
}else{
if($whitelist === false){
console("[INFO] <".$owner."> ".$text);
}
$message = "<".$owner."> ";
}
}else{
if($whitelist === false){
console("[INFO] $text");
}
$message["player"] = "";
}
$message .= $text;
if($whitelist === false){
console("[INFO] ".$message);
}
$this->server->handle("server.chat", new Container($message, $whitelist, $blacklist));
}
}