|
@@ -519,12 +519,16 @@ def ffpb_updatealfred(bot):
|
|
|
bot.msg(action_target, '\x01ACTION %s\x01' % action_msg)
|
|
|
|
|
|
def ffpb_alfred_data_outdated():
|
|
|
+ """Check if the stored alfred_data has been updated more than 5 minutes ago."""
|
|
|
+
|
|
|
timeout = datetime.datetime.now() - datetime.timedelta(minutes=5)
|
|
|
is_outdated = timeout > alfred_update
|
|
|
#print("ALFRED outdated? {0} (timeout={1} vs. lastupdate={2})".format(is_outdated, timeout, alfred_update))
|
|
|
return is_outdated
|
|
|
|
|
|
def ffpb_get_batcave_nodefield(nodeid, field):
|
|
|
+ """Query the given field for the given nodeid from the BATCAVE."""
|
|
|
+
|
|
|
raw_data = None
|
|
|
try:
|
|
|
# query BATCAVE for node's field
|