From e54da55d38740052b44977f5892481b684994d12 Mon Sep 17 00:00:00 2001 From: piaip Date: Fri, 3 Jun 2005 05:37:53 +0000 Subject: (fix r2742) there was no typo in users.c (pmore) fix search display bug in scroll mode(should be refreshed) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2745 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/pmore.c | 3 +++ mbbsd/user.c | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c index 8e902794..0380843e 100644 --- a/mbbsd/pmore.c +++ b/mbbsd/pmore.c @@ -48,6 +48,7 @@ enum { #define ANSI_ESC (0x1b) #define RESETMF() { memset(&mf, 0, sizeof(mf)); mf.oldlineno = -1; } #define RESETAH() { memset(&ah, 0, sizeof(ah)); } +#define MFDISP_DIRTY() { mf.oldlineno = -1; } /* search records */ typedef struct @@ -274,6 +275,8 @@ int mf_search(int direction) mf.disps = mf.start; mf_sync_lineno(); } + if(flFound) + MFDISP_DIRTY(); return flFound; } diff --git a/mbbsd/user.c b/mbbsd/user.c index d49a5893..5702b880 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -1132,8 +1132,19 @@ toregister(char *email, char *genbuf, char *phone, char *career, strncpy(cuser.justify, genbuf, REGLEN); sethomefile(buf, cuser.userid, "justify"); } + + /* + * It is intended to use BBSENAME instead of BBSNAME here. + * Because recently many poor users with poor mail clients + * (or evil mail servers) cannot handle/decode Chinese + * subjects (BBSNAME) correctly, so we'd like to use + * BBSENAME here to prevent subject being messed up. + * And please keep BBSENAME short or it may be truncated + * by evil mail servers. + */ snprintf(buf, sizeof(buf), - " " BBSNAME " - [ %s ]", getregcode(genbuf)); + " " BBSENAME " - [ %s ]", getregcode(genbuf)); + strlcpy(tmp, cuser.userid, sizeof(tmp)); strlcpy(cuser.userid, str_sysop, sizeof(cuser.userid)); #ifdef HAVEMOBILE -- cgit v1.2.3