Add a limit to the permission check?
// Do we have permission to edit this post?
if (($pun_user['g_edit_posts'] == '0' ||
$cur_post['poster_id'] != $pun_user['id'] ||
$cur_post['closed'] == '1') &&
!$is_admmod)
message($lang_common['No permission']);
// Do we have permission to edit this post?
// mod: edit time limit
if (($pun_user['g_edit_posts'] == '0' ||
$cur_post['poster_id'] != $pun_user['id'] ||
$cur_post['closed'] == '1' ||
time() > ($cur_post['posted'] + 86400)) &&
!$is_admmod)
message($lang_common['No permission']);
`86400` (one day) is the time limit in seconds.