Index: watcher.module =================================================================== --- watcher.module (revision 71) +++ watcher.module (revision 73) @@ -503,6 +503,13 @@ } /** + * Implementation of hook_nodeapi(), op: delete + */ +function _watcher_hook_nodeapi_delete(&$node, $a3, $a4) { + _watcher_db_delete_nid($node->nid); +} + +/** * Implementation of hook_comment() */ function watcher_comment($comment, $op) { Index: watcher.db.inc =================================================================== --- watcher.db.inc (revision 71) +++ watcher.db.inc (revision 73) @@ -228,6 +228,16 @@ } /** + * Delete a node from the watch list + * @param $nid node to delete + * @return + * Boolean of success or failure + */ +function _watcher_db_delete_nid($nid) { + return db_query('DELETE FROM {watcher_nodes} WHERE nid=%d', $nid); +} + +/** * Remove all NIDs on UID's watch list * @param $uid * UID - a user id.