File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,17 @@ module.exports = app => {
2929 res . redirect ( url ) ;
3030 } ) ;
3131 }
32+ // hacky but should work
3233 ( async ( ) => {
3334 for ( const [ name , data ] of Object . entries ( app . config . gameservers ) ) {
3435 const hostname = data . address ;
3536 const ip = await resolveHostname ( hostname ) ;
3637 if ( ! ip ) continue ;
3738 app . get ( `/join/${ name } /:pwd?` , ( req , res ) => {
3839 const pwd = ( req . params . pwd || "metawebsite" ) . replace ( / [ ^ a - z A - Z * 0 - 9 : + - \s ] + / g, "" ) ;
39- res . redirect ( `steam://connect/${ hostname } /${ pwd } ` ) ;
40+ res . redirect ( `steam://connect/${ ip } /${ pwd } ` ) ;
4041 } ) ;
41- console . log ( "Added join URL for " + name + " at " + hostname ) ;
42+ console . log ( "Added join URL for " + name + " at " + hostname + " with ip " + ip ) ;
4243 }
4344 } )
4445} ;
You can’t perform that action at this time.
0 commit comments