diff -u -p /home/kitallis/Desktop/bot/bot_karma/bot_karma.module /var/www/html/sites/default/modules/bot/bot_karma/bot_karma.module
--- /home/kitallis/Desktop/bot/bot_karma/bot_karma.module	2009-03-05 19:39:36.000000000 +0530
+++ /var/www/html/sites/default/modules/bot/bot_karma/bot_karma.module	2009-05-29 22:52:54.000000000 +0530
@@ -9,6 +9,7 @@
 /**
  * Implementation of hook_help().
  */
+
 function bot_karma_help($section) {
   switch ($section) {
     case 'irc:features':
@@ -49,6 +50,17 @@ function bot_karma_menu() {
 function bot_karma_perm() {
   return array('access bot karma scores');
 }
+	
+// returns the number of days passed for a timestamp upto current sys date
+function karma_object_timestamp_difference($time_stamp) { 
+   //explode the date by "-" and storing to array
+   $date_parts1 = explode("-", $time_stamp);
+   $date_parts2 = explode("-", date('Y-m-d'));
+   //gregoriantojd() Converts a Gregorian date to Julian Day Count
+   $start_date = gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]);
+   $end_date = gregoriantojd($date_parts2[1], $date_parts2[2], $date_parts2[0]);
+   return $end_date - $start_date;
+}		
 
 /**
  * Listen for conversation directed at, or around, the bot.
@@ -61,6 +73,8 @@ function bot_karma_perm() {
 function bot_karma_irc_msg_channel($data, $from_query = FALSE) {
   $to = $from_query ? $data->nick : $data->channel;
   $addressed = bot_name_regexp();
+  static $temp = array(); // create an associative array with [term => timestamp] pairs
+  static $object;
 
   // addressing is required. "bot_module: karma foo?".
   if (preg_match("/^${addressed}karma\s+(.*?)[!\?\.]*\s*$/i", $data->message, $matches)) {
@@ -73,18 +87,37 @@ function bot_karma_irc_msg_channel($data
   elseif (preg_match("/^($addressed)?(.*?)(\+\+|--)$/", $data->message, $matches)) {
     $term = trim(drupal_strtolower($matches[3])); // always store it lowercase.
     if (strlen($term) < 3 || strlen($term) > 15) { return; } // skip odd sizes.
-
+              
     // a user has tried to karma themselves.
     if (drupal_strtolower($data->nick) == $term) {
       $substitutions = array('!who' => $data->nick, '!channel' => $data->channel);
       bot_message($to, bot_randomized_choice($substitutions, variable_get('bot_karma_self_responses', _bot_karma_self_responses())));
       return;
     }
-
-    // load in the karma item, if it exists, then increment or decrement its value. bOOOroiIIng.
-    $result = db_fetch_object(db_query("SELECT term, karma FROM {bot_karma} WHERE term = '%s'", $term));
-    $result->karma = ($matches[4] == '++') ? $result->karma + 1 : $result->karma - 1;
-
+    
+    $object = $term.$data->nick;
+    
+    /* check if any Karma object has been modfified more than once in a day, per user (meh, spammers) */ 
+    
+    //if the object is new, put it in array and let it be modified once
+    if (array_key_exists($object, $temp) == false) { 
+      $result = db_fetch_object(db_query("SELECT term, karma FROM {bot_karma} WHERE term = '%s'", $term));
+      $result->karma = ($matches[4] == '++') ? $result->karma + 1 : $result->karma - 1;
+      $temp[$object] = date('Y-m-d'); 
+	}
+	// if object already exists in the array, check if its completed the time limit
+    elseif (array_key_exists($object, $temp) && (karma_object_timestamp_difference($temp[$object]) != 0)) {
+      unset($temp[$object]); 
+      $result = db_fetch_object(db_query("SELECT term, karma FROM {bot_karma} WHERE term = '%s'", $term));
+      $result->karma = ($matches[4] == '++') ? $result->karma + 1 : $result->karma - 1;
+    }
+    // if object already exists in the array and the time-limit is not yet over, produce awesome msgs
+    elseif (array_key_exists($object, $temp)) {
+      $substitutions = array('!who' => $data->nick, '!channel' => $data->channel);
+      bot_message($to, bot_randomized_choice($substitutions, variable_get('bot_karma_self_responses',      _bot_karma_self_responses())));
+      return;
+    }
+    
     if (!$result->term) {
       $result->term = $term;
       drupal_write_record('bot_karma', $result);
@@ -93,6 +126,8 @@ function bot_karma_irc_msg_channel($data
       drupal_write_record('bot_karma', $result, 'term');
     }
   }
+  
+  
 }
 
 /**
