|
30 | 30 | # Engines |
31 | 31 | from engines.server import execute_server_command |
32 | 32 | from engines.server import queue_command_string |
| 33 | +from engines.server import engine_server |
33 | 34 | # Paths |
34 | 35 | from paths import SP_DATA_PATH |
35 | 36 | # Plugins |
@@ -133,24 +134,25 @@ def _sp_help(command_info, command=None, *server_sub_commands): |
133 | 134 | @core_command.server_sub_command(['info']) |
134 | 135 | def print_info(info): |
135 | 136 | """Print information about OS, SP and installed plugins.""" |
136 | | - result = '\nDate : {}'.format(datetime.now(UTC)) |
137 | | - result += '\nOS : {}'.format(platform.platform()) |
138 | | - result += '\nGame : {}'.format(SOURCE_ENGINE_BRANCH) |
139 | | - result += '\nSP version : {}'.format(VERSION) |
140 | | - result += '\nGithub commit : {}'.format(GIT_COMMIT) |
| 137 | + result = f'\nDate : {datetime.now(UTC)}' |
| 138 | + result += f'\nOS : {platform.platform()}' |
| 139 | + result += f'\nGame : {SOURCE_ENGINE_BRANCH}' |
| 140 | + result += f'\nDedicated : {engine_server.is_dedicated_server()}' |
| 141 | + result += f'\nSP version : {VERSION}' |
| 142 | + result += f'\nGithub commit : {GIT_COMMIT}' |
141 | 143 | result += '\nServer plugins:' |
142 | 144 | for index, plugin in enumerate(server_plugin_manager.loaded_plugins): |
143 | | - result += '\n {:02d}: {}'.format(index, plugin.name) |
| 145 | + result += f'\n {index:02d}: {plugin.name}' |
144 | 146 |
|
145 | 147 | result += '\nSP plugins:' |
146 | 148 | for index, plugin in enumerate(plugin_manager.loaded_plugins): |
147 | | - result += '\n {:02d}: {}'.format(index, plugin.name) |
| 149 | + result += f'\n {index:02d}: {plugin.name}' |
148 | 150 | info = plugin.info |
149 | 151 | if info.version != 'unversioned': |
150 | | - result += ', {}'.format(info.version) |
| 152 | + result += f', {info.version}' |
151 | 153 |
|
152 | 154 | if info.url is not None: |
153 | | - result += ', {}'.format(info.url) |
| 155 | + result += f', {info.url}' |
154 | 156 |
|
155 | 157 | # Create a checksum for all the the essential information (from 'Date' to |
156 | 158 | # the last SP plugin) |
|
0 commit comments