Skip to content

Commit

Permalink
Added Unvanquished protocol #204
Browse files Browse the repository at this point in the history
  • Loading branch information
tltneon committed Aug 2, 2024
1 parent 1698088 commit 87bdcb5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Binary file added src/icons/unvanquished/unvanquished.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/lgsl_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ public function getConnectionLink() {
Protocol::TITANFALL2 => "northstar://server@{IP}",
Protocol::TS3 => "ts3server://{IP}?port={C_PORT}",
Protocol::TEASPEAK => "ts3server://{IP}?port={C_PORT}",
Protocol::UNVANQUISHED => "unv://{IP}:{C_PORT}",
Protocol::WARSOW => "warsow://{IP}:{C_PORT}",
Protocol::WOW => "javascript:prompt('Put it into your realm list:', 'set realmlist {IP}')"];

Expand Down
4 changes: 3 additions & 1 deletion src/lgsl_protocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ class Protocol {
const TS3 = "ts3";
const TEASPEAK = "teaspeak";
const WARSOW = "warsow";
const UNVANQUISHED = "unvanquished";
const URBANTERROR = "urbanterror";
const UT = "ut";
const UT2003 = "ut2003";
Expand Down Expand Up @@ -319,6 +320,7 @@ static public function lgslList($type = null) {
self::TS3 => ["Query33", "Teamspeak 3"],
self::TEASPEAK => ["Query33", "Teaspeak"],
self::WARSOW => ["Query02", "Warsow"],
self::UNVANQUISHED => ["Query02", "Unvanquished"],
self::URBANTERROR => ["Query02", "UrbanTerror"],
self::UT => ["Query03", "Unreal Tournament"],
self::UT2003 => ["Query13", "Unreal Tournament 2003"],
Expand Down Expand Up @@ -593,7 +595,7 @@ public function process() {

if (!empty($this->_data['e']['hostname'])) { $this->_data['s']['name'] = $this->_data['e']['hostname']; }
if (!empty($this->_data['e']['sv_hostname'])) { $this->_data['s']['name'] = Helper::lgslParseColor($this->_data['e']['sv_hostname'], "1"); }
if (isset($this->_data['e']['protocol'])) {
if (isset($this->_data['e']['protocol']) && $this->_server->getType() !== PROTOCOL::UNVANQUISHED) {
$games = ['1' => 'IW6', '2' => 'H1', '6' => 'IW3', '7' => 'T7', '20604' => 'IW5', '151' => 'IW4', '101' => 'T4'];
$this->_data['s']['game'] = $games[$this->_data['e']['protocol']];
}
Expand Down

0 comments on commit 87bdcb5

Please sign in to comment.