Fixes for taglines in lua_glue

This commit is contained in:
Andrew Pamment 2018-10-30 11:40:01 +10:00
parent 0a583eaa84
commit 463b77ba8b

View File

@ -521,7 +521,7 @@ int l_postMessage(lua_State *L) {
uname(&name); uname(&name);
tagline = conf.default_tagline; tagline = conf.default_tagline;
if (mc != NULL) { if (mc->tagline != NULL) {
tagline = mc->tagline; tagline = mc->tagline;
} }
@ -535,9 +535,15 @@ int l_postMessage(lua_State *L) {
VERSION_MAJOR, VERSION_MINOR, VERSION_STR, name.sysname, name.machine, tagline, VERSION_MAJOR, VERSION_MINOR, VERSION_STR, name.sysname, name.machine, tagline,
mc->fidoaddr->zone, mc->fidoaddr->net, mc->fidoaddr->node, mc->fidoaddr->point); mc->fidoaddr->zone, mc->fidoaddr->net, mc->fidoaddr->node, mc->fidoaddr->point);
} }
} else if (mc->nettype == NETWORK_MAGI) {
snprintf(buffer, sizeof buffer, "\r--- MagickaBBS v%d.%d%s (%s/%s)\r * Origin: %s (@%d)\r",
VERSION_MAJOR, VERSION_MINOR, VERSION_STR, name.sysname, name.machine, tagline,
mc->maginode);
} else if (mc->nettype == NETWORK_QWK) {
snprintf(buffer, sizeof buffer, "\r---\r * MagickaBBS * %s\r",
tagline);
} else { } else {
snprintf(buffer, sizeof buffer, "\r--- MagickaBBS v%d.%d%s (%s/%s)\r * Origin: %s \r", snprintf(buffer, sizeof buffer, "\r");
VERSION_MAJOR, VERSION_MINOR, VERSION_STR, name.sysname, name.machine, tagline);
} }
stralloc sa = EMPTY_STRALLOC; stralloc sa = EMPTY_STRALLOC;