Skip to content
Browse files

Added option to exclude servers from multiconsole via server settings

  • Loading branch information...
1 parent fecb60b commit 9e78763cceb91f4b00310dd5332d9258cf6f6657 @riemers committed
Showing with 18 additions and 2 deletions.
  1. +2 −2 console.php
  2. +2 −0 install/ssms-1.0.0-to-1.0.1.sql
  3. +14 −0 serverconfig.php
View
4 console.php
@@ -20,7 +20,7 @@
array_push( $servers, $list[ $i ] );
else {
- $typeServers = mysql_query( "SELECT `serverid` FROM `servers` WHERE `type` = '" . $list[ $i ] . "'" );
+ $typeServers = mysql_query( "SELECT `serverid` FROM `servers` WHERE `type` = '" . $list[ $i ] . "' AND multic = 'yes'" );
while( $server = mysql_fetch_array( $typeServers ) )
array_push( $servers, $server[ 'serverid' ] );
@@ -184,7 +184,7 @@ function toggleType( type ) {
<?php
$settings = getsettings();
- $servers = mysql_query( "SELECT `servers`.*, `games`.`longname` FROM `servers` JOIN `games` ON `servers`.`type` = `games`.`shortname` ORDER BY `type`" );
+ $servers = mysql_query( "SELECT `servers`.*, `games`.`longname` FROM `servers` JOIN `games` ON `servers`.`type` = `games`.`shortname` WHERE servers.multic = 'yes' ORDER BY `type`" );
$currType = false;
while( $server = mysql_fetch_array( $servers ) ) {
View
2 install/ssms-1.0.0-to-1.0.1.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `servers` ADD `multic` SET( 'yes', 'no' ) NOT NULL DEFAULT 'yes'
+UPDATE `ssms`.`config` SET `config` = '1.0.1' WHERE `config`.`setting` = 'version' AND `config`.`config` = '1.0.0';
View
14 serverconfig.php
@@ -99,6 +99,20 @@
</dd>
</dl>
<? } ?>
+ <dl>
+ <dt><label for="multic">Useable in multi console?</label></dt>
+ <dd>
+ <select size="1" name="multic" id="multic">
+ <? if ($servercfg['multic'] == 'yes') {
+ echo '<option value="yes" selected="selected">Yes</option>';
+ echo '<option value="no">No</option>';}
+ else {
+ echo '<option value="no" selected="selected">No</option>';
+ echo '<option value="yes">Yes</option>';
+ }?>
+ </select>
+ </dd>
+ </dl>
<dl>
<dt><label for="autoupdate">Auto update this server?</label></dt>

0 comments on commit 9e78763

Please sign in to comment.
Something went wrong with that request. Please try again.