Index: userpoints_nc.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/userpoints_nc/userpoints_nc.module,v
retrieving revision 1.3.2.2.2.1
diff -u -p -r1.3.2.2.2.1 userpoints_nc.module
--- userpoints_nc.module	10 Nov 2010 20:26:38 -0000	1.3.2.2.2.1
+++ userpoints_nc.module	13 Dec 2010 13:40:42 -0000
@@ -20,7 +20,7 @@ function userpoints_nc_form_node_type_fo
     ),
     '#attributes' => array('class' => array('userpoints-nc-nodetype-form')),
   );
-  
+
   $type = $form['#node_type']->type;
   $form['userpoints_nc']['userpoints_nc_enabled'] = array(
     '#type' => 'checkbox',
@@ -616,3 +616,26 @@ function userpoints_nc_description_callb
       break;
   }
 }
+
+/**
+ * Implements hook_userpoints_convert().
+ */
+function userpoints_nc_userpoints_convert($transaction) {
+  // Only convert operations which have an assigned node or comment.
+  if (!empty($transaction->entity_type) && in_array($transaction->entity_type, array('node', 'comment')) && !empty($transaction->entity_id)) {
+    switch ($transaction->operation) {
+      case 'insert':
+        $transaction->operation = 'userpoints_nc_' . $transaction->entity_type . '_insert';
+        return TRUE;
+      case 'delete':
+        $transaction->operation = 'userpoints_nc_' . $transaction->entity_type . '_delete';
+        return TRUE;
+      case 'Ownership gain':
+        $transaction->operation = 'userpoints_nc_' . $transaction->entity_type . '_gain';
+        return TRUE;
+      case 'Ownership loss':
+        $transaction->operation = 'userpoints_nc_' . $transaction->entity_type . '_loss';
+        return TRUE;
+    }
+  }
+}
\ No newline at end of file
