bumped network version and main version, lots of test work and some stability improvements
This commit is contained in:
parent
e77d422fc2
commit
572e29f5d5
24 changed files with 243 additions and 33 deletions
|
@ -1,4 +1,4 @@
|
|||
{ "name": "flow",
|
||||
"version": "0.0.1",
|
||||
"version": "0.1.0",
|
||||
"author": "onionr"
|
||||
}
|
|
@ -39,8 +39,9 @@ flask_blueprint = flowapi.flask_blueprint
|
|||
security_whitelist = ['staticfiles.boardContent', 'staticfiles.board']
|
||||
|
||||
plugin_name = 'flow'
|
||||
PLUGIN_VERSION = '0.0.1'
|
||||
PLUGIN_VERSION = '0.1.0'
|
||||
|
||||
EXPIRE_TIME = 43200
|
||||
|
||||
class OnionrFlow:
|
||||
def __init__(self):
|
||||
|
@ -75,7 +76,7 @@ class OnionrFlow:
|
|||
else:
|
||||
if message == "q":
|
||||
self.flowRunning = False
|
||||
expireTime = epoch.get_epoch() + 43200
|
||||
expireTime = epoch.get_epoch() + EXPIRE_TIME
|
||||
if len(message) > 0:
|
||||
logger.info('Inserting message as block...', terminal=True)
|
||||
onionrblocks.insert(message, header='brd',
|
||||
|
@ -118,6 +119,24 @@ def on_flow_cmd(api, data=None):
|
|||
OnionrFlow().start()
|
||||
|
||||
|
||||
def on_flowsend_cmd(api, data=None):
|
||||
err_msg = "Second arg is board name, third is quoted message"
|
||||
try:
|
||||
sys.argv[2]
|
||||
except IndexError:
|
||||
logger.error(err_msg, terminal=True)
|
||||
try:
|
||||
sys.argv[3]
|
||||
except IndexError:
|
||||
logger.error(err_msg, terminal=True)
|
||||
|
||||
bl = onionrblocks.insert(sys.argv[3], header='brd',
|
||||
expire=(EXPIRE_TIME + epoch.get_epoch()),
|
||||
meta={'ch': sys.argv[2]})
|
||||
print(bl)
|
||||
|
||||
|
||||
|
||||
def on_softreset(api, data=None):
|
||||
try:
|
||||
os.remove(identifyhome.identify_home() + '/board-index.cache.json')
|
||||
|
|
|
@ -46,7 +46,9 @@
|
|||
"minimum_score": -100
|
||||
},
|
||||
"plugins": {
|
||||
"disabled": [],
|
||||
"disabled": [
|
||||
"chat"
|
||||
],
|
||||
"enabled": []
|
||||
},
|
||||
"timers": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue