- WHERE ni_id={?}', $uid);
- XDB::execute('DELETE FROM watch_nonins WHERE ni_id={?}', $uid);
+ WHERE ni_id = {?}', $uid);
+ XDB::execute('DELETE FROM watch_nonins
+ WHERE ni_id = {?}', $uid);
+ } elseif ($cid == WATCH_DEATH) {
+ // We delete nonins watches both for the dead (if non registered), and
+ // for people watched by the dead.
+ XDB::execute('DELETE FROM watch_nonins
+ WHERE ni_id = {?} OR uid = {?}', $uid);