File tree Expand file tree Collapse file tree 4 files changed +5
-1
lines changed Expand file tree Collapse file tree 4 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,11 @@ const OnlinePlayers: Command<Message> = {
2323
2424 const serversWithScenario = rcon . rconConnections
2525 . filter ( ( connection ) => connection . hasScenario )
26+ . filter ( ( connection ) => connection . server . hidden === false )
2627 . map ( ( connection ) => connection . server . discordname ) ;
2728 const serversWithoutScenario = rcon . rconConnections
2829 . filter ( ( connection ) => ! connection . hasScenario )
30+ . filter ( ( connection ) => connection . server . hidden === false )
2931 . map ( ( connection ) => connection . server . discordname ) ;
3032
3133 const scenarioOutputProm = serversWithScenario . map ( ( discordname ) =>
Original file line number Diff line number Diff line change @@ -529,6 +529,7 @@ class serverHandler {
529529 }
530530 async discordHandler ( data ) {
531531 if ( data . server . dev ) return ; // ignore dev server
532+ if ( data . server . hidden ) return ; // return if server is hidden
532533 const message = data . line . replace (
533534 "${serverName}" ,
534535 `<#${ data . server . discordid } >`
@@ -546,7 +547,6 @@ class serverHandler {
546547 modchannel . isText ( ) &&
547548 modchannel . send ( {
548549 embed : new MessageEmbed ( embed ) ,
549- content : `<@&${ config . moderatorroleid } >` ,
550550 } ) ;
551551 }
552552 async startHandler ( data : OutputData ) {
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ const servers: FactorioServer[] = [
1919 discord : false , // requires the full scenario, not just the mod
2020 } ,
2121 dev : false , // whether or not the server is developmental
22+ hidden : false , // whether the server is hidden from ?po etc
2223 } ,
2324] ;
2425
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export interface FactorioServer {
1212 discord : boolean ;
1313 } ;
1414 dev : boolean ;
15+ hidden : boolean
1516}
1617
1718export type BotConfigEmojis = Record < string , string > ;
You can’t perform that action at this time.
0 commit comments