diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-23 02:30:04 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-23 02:30:04 +0800 |
commit | 61c39a72f5cc21e6d0d708efbe13b52e311ddf61 (patch) | |
tree | 1c2f072d5f2467c26ca906f779a2eb524ea6cc49 | |
parent | 5cb3fc8c27e59770d4d75d6b1169fd28cd303fd4 (diff) | |
download | pttbbs-61c39a72f5cc21e6d0d708efbe13b52e311ddf61.tar pttbbs-61c39a72f5cc21e6d0d708efbe13b52e311ddf61.tar.gz pttbbs-61c39a72f5cc21e6d0d708efbe13b52e311ddf61.tar.bz2 pttbbs-61c39a72f5cc21e6d0d708efbe13b52e311ddf61.tar.lz pttbbs-61c39a72f5cc21e6d0d708efbe13b52e311ddf61.tar.xz pttbbs-61c39a72f5cc21e6d0d708efbe13b52e311ddf61.tar.zst pttbbs-61c39a72f5cc21e6d0d708efbe13b52e311ddf61.zip |
- 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
-rw-r--r-- | include/proto.h | 1 | ||||
-rw-r--r-- | mbbsd/menu.c | 6 | ||||
-rw-r--r-- | mbbsd/talk.c | 8 |
3 files changed, 15 insertions, 0 deletions
diff --git a/include/proto.h b/include/proto.h index a4681e02..9500b9a5 100644 --- a/include/proto.h +++ b/include/proto.h @@ -419,6 +419,7 @@ int Name_Menu(void); int ZA_Waiting(void); int ZA_Select(void); void ZA_Enter(void); +void ZA_Drop(void); #ifdef MERGEBBS /* merge */ 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; |