@@ -81,7 +81,7 @@ def startNapCatLibExeModel(
81
81
control_queue = multiprocessing_dict [basic_conf_models_this ['control_queue' ]],
82
82
logger_proc = Proc_dict [basic_conf_models_this ['logger_proc' ]],
83
83
bot_info_dict = plugin_bot_info_dict [bot_info_key ],
84
- target_proc = None ,
84
+ target_proc = basic_conf_models [ basic_conf_models_this [ 'target_proc' ]] ,
85
85
debug_mode = False
86
86
)
87
87
Proc_Proc_dict [tmp_Proc_name ] = Proc_dict [tmp_Proc_name ].start_unity (tmp_proc_mode )
@@ -127,7 +127,7 @@ def run(self):
127
127
releaseDir (f"./conf/napcat/{ self .Proc_data ['bot_info_dict' ].hash } " )
128
128
releaseDir (f"./conf/napcat/{ self .Proc_data ['bot_info_dict' ].hash } /config" )
129
129
unzip ('./lib/NapCat.zip' , f"./conf/napcat/{ self .Proc_data ['bot_info_dict' ].hash } " )
130
- napcatTypeConfig (self .Proc_data ['bot_info_dict' ]).setConfig ()
130
+ napcatTypeConfig (self .Proc_data ['bot_info_dict' ], self . Proc_config [ 'target_proc' ] ).setConfig ()
131
131
if self .Proc_data ['bot_info_dict' ].platform ['model' ] in [
132
132
'napcat' ,
133
133
'napcat_show'
@@ -317,8 +317,9 @@ def sendControlEventSend(self, action, data):
317
317
318
318
319
319
class napcatTypeConfig (object ):
320
- def __init__ (self , bot_info_dict :OlivOS .API .bot_info_T ):
320
+ def __init__ (self , bot_info_dict :OlivOS .API .bot_info_T , target_proc ):
321
321
self .bot_info_dict = bot_info_dict
322
+ self .target_proc = target_proc
322
323
self .config_file_str = ''
323
324
self .config_file_data = ''
324
325
self .config_file_format = {}
@@ -327,7 +328,7 @@ def setConfig(self):
327
328
self .config_file_format ['uin' ] = str (self .bot_info_dict .id )
328
329
self .config_file_format ['token' ] = self .bot_info_dict .post_info .access_token
329
330
self .config_file_format ['port' ] = str (self .bot_info_dict .post_info .port )
330
- self .config_file_format ['postUrls' ] = ' http://127.0.0.1:55001 /OlivOSMsgApi/qq/onebot/default'
331
+ self .config_file_format ['postUrls' ] = f" http://127.0.0.1:{ self . target_proc [ 'server' ][ 'port' ] } /OlivOSMsgApi/qq/onebot/default"
331
332
332
333
self .config_file_data = {
333
334
"http" : {
0 commit comments