Douglas William Thrift 14 years ago
parent
commit
c0b2557783
1 changed files with 4 additions and 4 deletions
  1. 4 4
      locationbot.py

+ 4 - 4
locationbot.py

@@ -67,8 +67,8 @@ class LocationBot(ircbot.SingleServerIRCBot):
 		return False
 
 	def __do_latitude(self):
-		with self.__locations_lock:
-			self.__locations.append(('douglaswth', 'Isla Vista, CA, USA'))
+		#with self.__locations_lock:
+		#	self.__locations.append(('douglaswth', 'Isla Vista, CA, USA'))
 
 		#try:
 		#	url = 'http://www.google.com/latitude/apps/badge/api?' + urllib.urlencode({'user': 0, 'type': 'json'})
@@ -188,9 +188,9 @@ class LocationBot(ircbot.SingleServerIRCBot):
 			self.ircobj.process_once(0.2)
 
 			if self.__locations_lock.acquire(False):
-				if self.__locations:
+				if self.__locations and sorted(self.__channels) == sorted(self.channels.keys()):
 					for user, location in self.__locations:
-						for channel in self.channels.values():
+						for channel in self.__channels:
 							self.connection.notice(channel, '%s is in %s' % (user, location))
 
 					self.__locations = []