Skip to content
Snippets Groups Projects
Commit 7be352ac authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Support optional ctrl/<terminal-protocol>/text.ini file

If the sysop wants custom text.dat strings to be unique per terminal
connection protocol (e.g. telnet, rlogin, ssh, raw), this is how that
can be achieved (e.g. ctrl/rlogin/text.ini can be used to override text.dat
strings only for RLogin connections).

To at least partially address issue #897
parent b40aeea1
No related branches found
No related tags found
No related merge requests found
Pipeline #8818 failed
......@@ -117,11 +117,20 @@ void sbbs_t::revert_text(void)
bool sbbs_t::load_user_text(void)
{
char path[MAX_PATH + 1];
char charset[16];
revert_text();
char connection[LEN_CONNECTION + 1];
SAFECOPY(connection, this->connection);
strlwr(connection);
snprintf(path, sizeof path, "%s%s/text.ini", cfg.ctrl_dir, connection);
if (fexist(path)) {
if (!replace_text(path))
return false;
}
char charset[16];
SAFECOPY(charset, term->charset_str());
strlwr(charset);
revert_text();
snprintf(path, sizeof path, "%s%s/text.ini", cfg.ctrl_dir, charset);
if (fexist(path)) {
if (!replace_text(path))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment