This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 4rpl:commands:registerformsg [2021/01/29 19:40] – Karsten75 | 4rpl:commands:registerformsg [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ~~NOTOC~~ | ~~NOTOC~~ | ||
| - | < | + | < |
| + | <= [[4rpl: | ||
| - | ====== | + | ====== |
| - | RegisterforMsg(< | + | RegisterForMSG(< |
| ===== Description ===== | ===== Description ===== | ||
| - | Registers a script to receive callbacks whenever somethings sends a message to ' | + | Registers a script to receive callbacks whenever somethings sends a message to ' |
| - | Callbacks are made at the time sending happens. Note that some callbacks can be made from system objects, like the InfoCache.\\ | + | The channel is just a string. |
| + | |||
| + | Callbacks are made at the time sending happens. Note that some callbacks can be made from system objects, like the InfoCache. | ||
| The callback is made to the function specified by ' | The callback is made to the function specified by ' | ||
| is invoked on the script. That var can have any type, it depends what type the sender sent.\\ | is invoked on the script. That var can have any type, it depends what type the sender sent.\\ | ||
| - | Messages are registered by channel. So if you call RegisterForMsg | + | |
| - | Subsequent calls to register on the same channel will replace any previous registrations.\\ | + | Messages are registered by channel. So if you call RegisterForMSG |
| RegisterForMSG is persistent, so you only need to call it once. | RegisterForMSG is persistent, so you only need to call it once. | ||
| Line 25: | Line 29: | ||
| === See also === | === See also === | ||
| + | |||
| + | * [[SendMSG]] | ||
| + | * [[4rpl: | ||
| - | * [[4rpl: | ||
| - | * | ||
| < | < | ||