mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 07:43:12 +09:00
Remove redundant parameter from attachPluginMessages
Remove the pluginInfo parameter from lib/plugin attachPluginMessages as the plugin info object is available in the `.info` property of the plugin. While a plugin instance doesn't exist for the slave side and was the reason for these to be separate arguments, I expect slave plugins to be implemented eventually.
This commit is contained in:
1 parent
b7c7e79a86
commit
f8153bd784
5 files changed
+17
-18
No files matched your search
@@ -254,7 +254,7 @@ class Instance extends libLink.Link {
|
||||
let instancePlugin = new InstancePluginClass(pluginInfo, this, slave);
|
||||
this.plugins.set(pluginInfo.name, instancePlugin);
|
||||
await instancePlugin.init();
|
||||
libPlugin.attachPluginMessages(this, pluginInfo, instancePlugin);
|
||||
libPlugin.attachPluginMessages(this, instancePlugin);
|
||||
|
||||
this.logger.info(`Loaded plugin ${pluginInfo.name} in ${Date.now() - pluginLoadStarted}ms`);
|
||||
}
|
||||
@@ -830,7 +830,7 @@ class InstanceConnection extends libLink.Link {
|
||||
libLink.attachAllMessages(this);
|
||||
|
||||
for (let pluginInfo of slave.pluginInfos) {
|
||||
libPlugin.attachPluginMessages(this, pluginInfo, null);
|
||||
libPlugin.attachPluginMessages(this, { info: pluginInfo });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -977,7 +977,7 @@ class Slave extends libLink.Link {
|
||||
|
||||
this.pluginInfos = pluginInfos;
|
||||
for (let pluginInfo of pluginInfos) {
|
||||
libPlugin.attachPluginMessages(this, pluginInfo, null);
|
||||
libPlugin.attachPluginMessages(this, { info: pluginInfo });
|
||||
}
|
||||
|
||||
this.config = slaveConfig;
|
||||
|
||||
Reference in new issue
Block a user