From 61c39a72f5cc21e6d0d708efbe13b52e311ddf61 Mon Sep 17 00:00:00 2001 From: piaip Date: Tue, 22 Apr 2008 18:30:04 +0000 Subject: - ZA: simple workaround to prevent Ctrl-U re-entrant issue git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4237 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/menu.c | 6 ++++++ mbbsd/talk.c | 8 ++++++++ 2 files changed, 14 insertions(+) (limited to 'mbbsd') diff --git a/mbbsd/menu.c b/mbbsd/menu.c index 035cf1ef..fd515146 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -140,6 +140,12 @@ ZA_Waiting(void) return (zacmd != 0); } +void +ZA_Drop(void) +{ + zacmd = 0; +} + // Promp user our ZA bar and return for selection. int ZA_Select(void) diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 013b9885..099006e4 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -3061,6 +3061,14 @@ t_users(void) abort_bbs(0); } + // cannot do ZA for re-entrant. + // usually happens when doing ^U, ^Z with non-return + // env like editor. + if (ZA_Waiting()) + ZA_Drop(); + + // TODO drop if we were already in t_users? + setutmpmode(LUSERS); userlist(); currutmp->mode = mode0; -- cgit v1.2.3