--- invite/invite.module        2007-03-22 09:55:46.000000000 -0700
+++ ../invite/invite.module     2007-06-13 08:46:39.000000000 -0700
@@ -96,7 +96,7 @@
       '#type' => 'select',
       '#title' => t('Limit for %role', array('%role' => $role)),
       '#default_value' => variable_get('invite_maxnum_'. $role_no_space, INVITE_MAX_INVITES),
-      '#options' => array(5 => 5, 10 => 10, 20 => 20, 50 => 50, 100 => 100, 500 => 500, 1000 => 1000, 0 => t('unlimited')),
+      '#options' => array(0 => 0, 5 => 5, 10 => 10, 20 => 20, 50 => 50, 100 => 100, 500 => 500, 1000 => 1000, -1 => t('unlimited')),
       '#description' => t('Allows to limit the total number of invitations a %role can send.', array('%role' => $role)),
       '#multiple' => FALSE,
       '#required' => TRUE,
@@ -434,12 +434,12 @@
   );      
   
   $maximum_invites = _invite_max_invites_by_role();
-  if ($maximum_invites > 0) {
+  if ($maximum_invites > -1) {
     $invites_left = $maximum_invites - $inc;
     $form['invite_form']['markup_remaining_invites'] = array(
       '#type' => 'markup',
       '#value' => ($invites_left > 0)
-        ? format_plural($invites_left, 'You have one invite left.', 'You have @count invites left.')
+        ? format_plural($invites_left, 'You have one invite remaining.', 'You have @count invites remaining.')
         : t('Maximum number (@max) of invitations reached.', array('@max' => $maximum_invites)),
     );
     $form['invite_form']['remaining_invites'] = array(
@@ -449,7 +449,7 @@
   }
   
   //the invitation form
-  if ($inc < $maximum_invites  || $maximum_invites == 0){
+  if ($inc < $maximum_invites  || $maximum_invites == -1){
     $maximum_multiple = _invite_max_invites_per_turn();
     
     if (isset($_SESSION['invite_failed_emails'])) {
@@ -649,8 +649,8 @@
     if (in_array($role, $account->roles)) {
       $variable = 'invite_'. $var .'_'. $role_no_space;
       $role_max = variable_get($variable, $default);
-      if ($role_max == 0) {
-        return 0;
+      if ($role_max == -1) {
+        return $role_max;
       }
       if ($role_max > $result) {
         $result = $role_max;
