diff -u'rNF^function' nodevote_v/nodevote.install nodevote_m/nodevote.install
--- nodevote_v/nodevote.install	2006-08-16 19:02:44.000000000 -0600
+++ nodevote_m/nodevote.install	2006-08-23 10:43:40.687500000 -0600
@@ -19,6 +19,7 @@ function nodevote_install() {
   uid  int(10) NOT NULL default '0',
   nid  int(10) NOT NULL default '0',
   vote int(2)  NOT NULL default '0',
+	timestamp int(11) NOT NULL default '0',
   PRIMARY KEY (uid, nid),
   KEY node_id (nid),
   KEY user_id (uid)
@@ -34,6 +35,7 @@ function nodevote_install() {
         uid int NOT NULL default '0',
         nid int NOT NULL default '0',
         vote int NOT NULL default '0',
+				timestamp int NOT NULL default '0',
         PRIMARY KEY (uid, nid)
       )");
       if ($query) {
diff -u'rNF^function' nodevote_v/nodevote.module nodevote_m/nodevote.module
--- nodevote_v/nodevote.module	2006-07-01 19:01:48.000000000 -0600
+++ nodevote_m/nodevote.module	2006-08-23 11:38:52.015625000 -0600
@@ -17,6 +17,7 @@
 define('NODEVOTE_RESULT_VOTED',          'nodevote_result_voted');
 define('NODEVOTE_RESULT_DISPLAY_PAGE',   'nodevote_result_display_page');
 define('NODEVOTE_RESULT_DISPLAY_TEASER', 'nodevote_result_display_teaser');
+define('NODEVOTE_DAILY_THRESHOLD',       'nodevote_daily_threshold');
 
 function nodevote_help($section) {
   switch ($section) {
@@ -62,6 +63,15 @@ function nodevote_settings() {
     '#type' => 'fieldset',
     '#title' => t('Enable voting for these node types:'),
   );
+  
+  $form['nodevote_daily_threshold'] = array(
+    '#type' => 'select',
+    '#title' => t('Daily threshold'),
+    '#options' => drupal_map_assoc(array(5, 10, 15, 20, 25, 30, 35, 40, 45, 50)),
+    '#default_value' => variable_get('nodevote_daily_threshold', 10),
+    '#description' => t('The maximum number of votes a user can cast in a 24 hour period.'),
+  );
+   
   foreach(node_get_types() as $type => $name) {
     $form[$set][NODEVOTE_TYPE . $type] = array(
       '#type' => 'checkbox',
@@ -135,6 +145,22 @@ function nodevote_settings() {
   return $form;
 }  
 
+/**
+ * Check if the current voter has cast his maximum daily votes.
+ * The user is allowed to vote if he did not exceed the threshold.
+ *
+ * @param $uid
+ *   The the ID of the voting user.
+ * @param $threshold
+ *   The maximum number votes allowed (per user) in a 24-hour period.
+ * @return
+ *   True if the user did not exceed the threshold.  False otherwise.
+ */
+function within_threshold($uid, $threshold) {
+  $number = db_num_rows(db_query("SELECT uid FROM {nodevote} WHERE uid = '%s' AND timestamp > '%d'", $uid, time() - 86400));
+  return ($number < $threshold ? TRUE : FALSE);
+}
+
 function nodevote_link($type, $node, $teaser = false) {
   if ($type == 'node' && $teaser) {
     if (_nodevote_is_votable($node)) {
@@ -214,13 +240,21 @@ function nodevote_page() {
         if (_nodevote_user_voted($user->uid, $nid)){ 
           $result = db_query("UPDATE {nodevote} SET  vote = $vote WHERE  uid = %d AND nid = %d" , $user->uid , $nid);
         }
-        else
-        {
-          $result = db_query("INSERT INTO {nodevote} VALUES (%d, %d, %d)",
-            $user->uid, $nid, $vote);
-          if(module_exist('userpoints')) {
-            userpoints_nodevote($nid);
+        else {
+          // check to see if the user has voted too many times today
+          if(within_threshold($user->uid, variable_get(NODEVOTE_DAILY_THRESHOLD, 10))){
+            // log the vote
+            $result = db_query("INSERT INTO {nodevote} VALUES (%d, %d, %d, %d)", $user->uid, $nid, $vote, time());
+            // do the userpoints dance
+            if(module_exist('userpoints')) {userpoints_nodevote($nid);
+            }
           }  
+        else {
+          // if they've voted too many times today, show a message
+          $output = t("You can only vote %number times in 24 hours. Please try again later.", array('%number' => variable_get('NODEVOTE_DAILY_THRESHOLD', 10)));
+          drupal_set_message($output, 'error');
+        }
+        $o = l(t('back to node'), 'node/' . $nid);
         }
         drupal_goto("node/" . $nid);
       }
