[19705] trunk/base/portmgr/bots/port.rb

source_changes at macosforge.org source_changes at macosforge.org
Sat Sep 23 09:11:39 PDT 2006


Revision: 19705
          http://trac.macosforge.org/projects/macports/changeset/19705
Author:   jberry at macports.org
Date:     2006-09-23 09:11:39 -0700 (Sat, 23 Sep 2006)

Log Message:
-----------
Cleanups to bot

Modified Paths:
--------------
    trunk/base/portmgr/bots/port.rb

Modified: trunk/base/portmgr/bots/port.rb
===================================================================
--- trunk/base/portmgr/bots/port.rb	2006-09-23 16:07:27 UTC (rev 19704)
+++ trunk/base/portmgr/bots/port.rb	2006-09-23 16:11:39 UTC (rev 19705)
@@ -151,15 +151,16 @@
 		
 		doHerald = true
 		email = @registry["email_#{nick}"]
-		lastHerald = @registry["lastherald_#{email}"]
-		if (lastHerald)
-			secondsAgo = now - lastHerald
-			doHerald = secondsAgo > minSecondsBetween
+		if (email)
+			lastHerald = @registry["lastherald_#{email}"]
+			if (lastHerald)
+				secondsAgo = now - lastHerald
+				doHerald = secondsAgo > minSecondsBetween
+			end
+			@registry["lastherald_#{email}"] = now
 		end
 		
 		heraldUser where, nick if doHerald
-
-		@registry["lastherald_#{email}"] = now
 	end
 	
 	def join(m)
@@ -169,7 +170,7 @@
 	def part(m)
 		nick = m.sourcenick
 		email = @registry["email_#{nick}"]
-		@registry["lastherald_#{email}"] = Time.new 
+		@registry["lastherald_#{email}"] = Time.new if email
 	end
 	
 	def nick(m)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20060923/5eed30ba/attachment.html


More information about the macports-changes mailing list