diff --git a/Plugins/ScriptPlugins/ServerBanner.js b/Plugins/ScriptPlugins/ServerBanner.js
index 3094332d..0beb3da1 100644
--- a/Plugins/ScriptPlugins/ServerBanner.js
+++ b/Plugins/ScriptPlugins/ServerBanner.js
@@ -81,8 +81,9 @@ const plugin = {
interactionData.interactionType = 1;
interactionData.source = plugin.name;
- interactionData.scriptAction = (sourceId, targetId, game, meta, token) => {
- const serverId = meta['serverId'];
+ interactionData.scriptAction = (sourceId, targetId, game, meta, _) => {
+ const serverId = meta.serverId;
+ const isSmall = meta.size !== undefined && meta.size === 'small';
let server;
let colorLeft = 'color: #f5f5f5; text-shadow: -1px 1px 8px #000000cc;';
@@ -145,97 +146,185 @@ const plugin = {
colorRight = colorMappingOverride[gameCode]?.right || colorRight;
const font = 'Noto Sans Mono';
- let status = '
ONLINE
';
+ let status = isSmall ? '' : 'ONLINE
';
if (server.throttled) {
- status = 'OFFLINE
';
+ status = isSmall ? '' : 'OFFLINE
';
}
const displayIp = server.resolvedIpEndPoint.address.isInternal() ?
plugin.manager.externalIPAddress :
server.resolvedIpEndPoint.toString().split(':')[0];
- return `
-
-
-
-
-
-
-
-
-
-
-
${displayIp}:${server.listenPort}
-
-
${server.throttled ? '-' : server.clientNum}/${server.maxClients} Players
-
![${serverLocationCache[server.listenAddress]}](https://flagcdn.com/h20/${serverLocationCache[server.listenAddress]?.toLowerCase()}.png)
+ const head = `
+
+
+
${displayIp}:${server.listenPort}
+ `;
+
+
+ if (isSmall) {
+ return `
+ ${head}
+
+
+
+
+ ${status}
+
${displayIp}:${server.listenPort}
+
+
+
![${serverLocationCache[server.listenAddress]}](https://flagcdn.com/w40/${serverLocationCache[server.listenAddress]?.toLowerCase()}.png)
+
+ ${server.throttled ? '-' : server.clientNum}/${server.maxClients}
+ •
+ ${server.map.alias}
+ •
+ ${server.gametypeName}
+
+
-
-
-
${server.gametypeName}
- ${status}
-
-
+
+ `;
+ }
+
+ return `
+ ${head}
+
+
+
+
+
+
+
${displayIp}:${server.listenPort}
+
+
${server.throttled ? '-' : server.clientNum}/${server.maxClients} Players
+
![${serverLocationCache[server.listenAddress]}](https://flagcdn.com/h20/${serverLocationCache[server.listenAddress]?.toLowerCase()}.png)
+
+
+
+
+
${server.gametypeName}
+ ${status}
+
+
+
`;
};
@@ -269,23 +358,40 @@ const plugin = {
const servers = serverOrderCache[key];
servers.forEach(eachServer => {
response += `
-
-
${eachServer.gameCode}
${eachServer.serverName.stripColors()}
+
+
+
${eachServer.gameCode}
+ ${eachServer.serverName.stripColors()}
+
-
-
-
-
Show Embed
-
<iframe
-
src="${plugin.webfrontUrl}/Interaction/Render/Banner?serverId=${eachServer.id}"
-
width="750" height="120" style="border-width: 0; overflow: hidden;">
-</iframe>
-
`;
+
+
+
+
Show Embed
+
+ <iframe
+
src="${plugin.webfrontUrl}/Interaction/Render/Banner?serverId=${eachServer.id}"
+
width="750" height="120" style="border-width: 0; overflow: hidden;">
+ </iframe>
+
+
+
+
Show Embed
+
+ <iframe
+
src="${plugin.webfrontUrl}/Interaction/Render/Banner?serverId=${eachServer.id}&size=small"
+
width="400" height="70" style="border-width: 0; overflow: hidden;">
+ </iframe>
+
+
`;
});
});
response += '
';
- response += ''
return response;
};