Skip to content

Commit

Permalink
自动分配OPQBot的接口
Browse files Browse the repository at this point in the history
  • Loading branch information
lunzhiPenxil committed Dec 14, 2023
1 parent 3903c75 commit 48ad152
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions OlivOS/core/core/accountAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ def accountFix(basic_conf_models, bot_info_dict, logger_proc):
Account_data_this.post_info.host = 'ws://127.0.0.1'
Account_data_this.post_info.port = g.get_free_port()
Account_data_this.post_info.access_token = bot_info_dict_this
if Account_data_this.platform['model'] in OlivOS.libOPQBotEXEModelAPI.gAutoCheckList:
if Account_data_this.post_info.auto == True:
Account_data_this.post_info.type = 'websocket'
Account_data_this.post_info.host = '127.0.0.1'
Account_data_this.post_info.port = g.get_free_port()
res[bot_info_dict_this] = Account_data_this
return res

Expand Down
4 changes: 4 additions & 0 deletions OlivOS/libBooter/libOPQBotEXEModelAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
'opqbot_port_old'
]

gAutoCheckList = [
'opqbot_auto'
]


def startOPQBotLibExeModel(
plugin_bot_info_dict,
Expand Down

0 comments on commit 48ad152

Please sign in to comment.