Variables for !promote messages

Variables for !promote messages

SpringRTS Perl Autohost for Dedicated Server

Moderators: Moderators, Lobby Developers, SPADS AutoHost

Post Reply
raaar
Metal Factions Developer
Posts: 1094
Joined: 20 Feb 2010, 12:17

Variables for !promote messages

Post by raaar »

According to the spads settings, promote messages allow these variables:

%u is replaced by the user performing !promote command
%p is replaced by the number of needed players for current expected battle structure (nbTeams x teamSize x nbPlayerById)
%b is replaced by the battle name
%o is replaced by the mod name
%a is replaced by the map name

default msg: %pplayer(s) needed for battle "%b" [%o, %a] (%u)


Are there other variables which can be used? I'd be interested in having
- current number of players
- current number of spectators
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: Variables for !promote messages

Post by bibim »

No, the only placeholders available for the "promteMsg" global setting are the ones described in the documentation.
But I just added %P, %S and %U as requested in SPADS 0.13.6 (cf promoteMsg global setting documentation).
raaar
Metal Factions Developer
Posts: 1094
Joined: 20 Feb 2010, 12:17

Re: Variables for !promote messages

Post by raaar »

That's nice, thanks.

I'm still using SPADS 0.12.54, but i'll try to update soon.
raaar
Metal Factions Developer
Posts: 1094
Joined: 20 Feb 2010, 12:17

Re: Variables for !promote messages

Post by raaar »

I've updated to spads 0.13.9 and the new variables work fine, thanks.

NOTE:
I followed the instructions to update from 0.12.x to 0.13.9.

They worked except point 4. Spads wouldn't start after removing the extra ":" from users.conf :

20230416164545 - ERROR - [SPADS] Unable to parse fields in following configuration data "|140"
20230416164545 - ERROR - [SPADS] Invalid configuration line in file "/spring/spads/etc/users.conf" (:raaar:::::|140)
20230416164545 - ERROR - [SPADS] Unable to load commands, help and permission system

it's starting properly with these on users.conf

:raaar::::::|140
:::::1::|110
:::::7::|80
:::::6::|70
:::::5::|60
:::::4::|50
(...)
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: Variables for !promote messages

Post by bibim »

raaar wrote: 18 Apr 2023, 20:46 I followed the instructions to update from 0.12.x to 0.13.9.

They worked except point 4. Spads wouldn't start after removing the extra ":" from users.conf :

20230416164545 - ERROR - [SPADS] Unable to parse fields in following configuration data "|140"
20230416164545 - ERROR - [SPADS] Invalid configuration line in file "/spring/spads/etc/users.conf" (:raaar:::::|140)
20230416164545 - ERROR - [SPADS] Unable to load commands, help and permission system

it's starting properly with these on users.conf

:raaar::::::|140
:::::1::|110
:::::7::|80
:::::6::|70
:::::5::|60
:::::4::|50
(...)
Are you sure you followed the first part of point 4 ?
the template declaration line (usually the first line of the file) must be replaced:
Old line: #?accountId:name:country:cpu:rank:access:bot:auth|level
New line: #?accountId:name:country:rank:access:bot:auth|level (the cpu field has been removed)
raaar
Metal Factions Developer
Posts: 1094
Joined: 20 Feb 2010, 12:17

Re: Variables for !promote messages

Post by raaar »

You're right, I missed that one. Now it works.
Post Reply

Return to “SPADS AutoHost”