[PluginCommand]Communication between two plugins

Started by habi, Mar 13, 2023, 04:44 PM

Previous topic - Next topic

habi

Hi this one i made some time ago ( not long ).

The squirrel module does not have function to send Plugin Command or callback to receive a plugin command. As a result, inter-plugin communication is impossible.

This plugin if loaded gives the ability to send plugin commands from your main.nut and other plugins will receive it.


What is plugin command?
It is a pair of integer and string  eg. (1234, "abcd")

Functions
SendPluginCommand( identifier, message )

Callbacks
function onPluginCommand( identifier, message )

Notes
1. The squirrel plugin sends a command with identifier=0x7D6E22D8, when it initializes its environment. This is excluded in the callback.

Download links
  • plugins(PluginCommand32.dll, PluginCommand64.dll, PluginCommand32[dot]so, PluginCommand64[dot]so)
  • source