|
@@ -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 = []
|