read motd from file (multilanguage); auto reload changed serverinfo and motd files

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4527 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
ac_stef
2009-06-19 12:51:25 +00:00
parent ef4138701e
commit 01ab8df5db
6 changed files with 88 additions and 23 deletions
+11
View File
@@ -159,6 +159,17 @@ void filterservdesc(char *dst, const char *src, int len)
*dst = '\0';
}
void filterlang(char *d, const char *s)
{
if(strlen(s) == 2)
{
loopi(2) d[i] = tolower(s[i]);
d[2] = '\0';
if(islower(d[0]) && islower(d[1])) return;
}
*d = '\0';
}
void cutcolorstring(char *text, int len)
{ // limit string length, ignore color codes
while(*text)