Cleaned up messy logic in pwn
[pwnitter] / pwnitter.py
index e8404c2..5a06ed2 100755 (executable)
@@ -160,8 +160,8 @@ class Pwnitter(dbus.service.Object):
 
 
                         # We don't want to repeatedly spam people
 
 
                         # We don't want to repeatedly spam people
-                        # FIXME: What the fuck logic. Please clean up
-                        if not ((not name and host != 'mobile.twitter.com') or name in processed):
+                        # Also proceed if we didn't find a name but are on the mobile page
+                        if  not (name in processed)   or   ((not name) and host == 'mobile.twitter.com'):
                             headers = {
                                 "User-Agent": "Mozilla/5.0",
                                 "Accept": "application/json, text/javascript, */*",
                             headers = {
                                 "User-Agent": "Mozilla/5.0",
                                 "Accept": "application/json, text/javascript, */*",