...
 
Commits (1)
  • Rob Swindell's avatar
    New @-code TEXT:<num> to display text.dat string #num · 82018810
    Rob Swindell authored
    Also, don't truncate strings to accommodate screen width when the string contains a new-line character.
    This is so ScottD (from irc.synchro.net) can use TEXT:556 @-code to print the Ctrl-K menu (text.dat string) via a command shell written in Baja.
    82018810
......@@ -208,7 +208,7 @@ int sbbs_t::show_atcode(const char *instr, JSObject* obj)
if(uppercase && align == none)
align = left;
if(truncated) {
if(truncated && strchr(cp, '\n') == NULL) {
if(column + disp_len > cols - 1) {
if(column >= cols - 1)
disp_len = 0;
......@@ -752,6 +752,13 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool
return nulstr;
}
if(strncmp(sp, "TEXT:", 5) == 0) {
i = atoi(sp + 5);
if(i >= 1 && i <= TOTAL_TEXT)
return text[i - 1];
return nulstr;
}
/* NOSTOP */
/* STOP */
......