From 24bd774a0b26c4929bc7d8a792928888a3c04669 Mon Sep 17 00:00:00 2001 From: piaip Date: Wed, 30 Apr 2008 01:56:24 +0000 Subject: - fix chicken sudden death after sysop revive git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4260 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/chicken.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mbbsd/chicken.c b/mbbsd/chicken.c index dc077043..50c49d48 100644 --- a/mbbsd/chicken.c +++ b/mbbsd/chicken.c @@ -893,8 +893,7 @@ chicken_toggle_death(const char *uid) return; #endif - if (!uid) - return; + assert(uid); if (!mychicken) { vmsgf("%s 沒養寵物。", uid); @@ -907,6 +906,7 @@ chicken_toggle_death(const char *uid) else { strlcpy(mychicken->name, "[死]", sizeof(mychicken->name)); + mychicken->lastvisit = now; // prevent suddent death vmsgf("%s 的寵物復活了", uid); } free_live_chicken(mychicken); -- cgit v1.2.3