File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -275,13 +275,10 @@ public void SendMotd(MyPlayer player, bool onSessionChanged)
275275 {
276276 long playerId = player . Identity . IdentityId ;
277277
278- var motdUrl = MyGuiSandbox . IsUrlWhitelisted ( Config . MotdUrl )
279- ? Config . MotdUrl
280- : $ "https://steamcommunity.com/linkfilter/?url={ Config . MotdUrl } ";
281-
282278 if ( ! string . IsNullOrEmpty ( Config . MotdUrl ) && ! Config . NewUserMotdUrl )
283279 {
284- MyVisualScriptLogicProvider . OpenSteamOverlay ( motdUrl , playerId ) ;
280+ var url = MakeUrl ( Config . MotdUrl ) ;
281+ MyVisualScriptLogicProvider . OpenSteamOverlay ( url , playerId ) ;
285282 return ;
286283 }
287284
@@ -298,7 +295,8 @@ public void SendMotd(MyPlayer player, bool onSessionChanged)
298295
299296 if ( ! string . IsNullOrEmpty ( Config . MotdUrl ) && isNewUser && Config . NewUserMotdUrl )
300297 {
301- MyVisualScriptLogicProvider . OpenSteamOverlay ( motdUrl , playerId ) ;
298+ var url = MakeUrl ( Config . MotdUrl ) ;
299+ MyVisualScriptLogicProvider . OpenSteamOverlay ( url , playerId ) ;
302300 return ;
303301 }
304302
@@ -324,6 +322,12 @@ public void SendMotd(MyPlayer player, bool onSessionChanged)
324322 }
325323 }
326324
325+ static string MakeUrl ( string url )
326+ {
327+ if ( MyGuiSandbox . IsUrlWhitelisted ( url ) ) return url ;
328+ return $ "https://steamcommunity.com/linkfilter/?url={ url } ";
329+ }
330+
327331 static string GetDefaultMotdText ( )
328332 {
329333 try
You can’t perform that action at this time.
0 commit comments