g['cmd'] = cmd
try:
# Lock the semaphore
- db.semaphore_update_flag(True)
+ db.semaphore_update_lock(True)
# Save cmd to global variable and call process
g['stuff'] = ' '.join(line.split()[1:])
# Process the command
else:
g['prefix'] = True
# Release the semaphore lock
- db.semaphore_update_flag(False)
+ db.semaphore_update_lock(False)
except Exception:
printNicely(red('OMG something is wrong with Twitter right now.'))
ig=args.ignore,
)
elif tweet.get('direct_message'):
- print_message(tweet['direct_message'])
+ print_message(tweet['direct_message'],check_semaphore=True)
except TwitterHTTPError:
printNicely('')
printNicely(