Hooks
Hooks provided by the Broadcasts module for managing class and faction broadcast messages.
Overview
The Broadcasts module allows staff to broadcast messages to chosen factions or classes. Every broadcast is logged and controlled through CAMI privileges. It provides comprehensive hook integration for customizing broadcast behavior, logging, and extending faction/class communication systems.
ClassBroadcastLogged
đ Purpose
Called after a class broadcast has been logged.
â° When Called
After the broadcast is sent and logged in the system.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who sent the broadcast |
message |
string | The broadcast message |
classes |
table | Array of class names that received the broadcast |
âŠī¸ Returns
nil
đ Realm
Server
ClassBroadcastMenuClosed
đ Purpose
Called when the class selection menu for broadcasts is closed.
â° When Called
After the player selects classes and the menu closes.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who closed the menu |
selectedOptions |
table | Array of selected class options |
âŠī¸ Returns
nil
đ Realm
Server
ClassBroadcastMenuOpened
đ Purpose
Called when the class selection menu for broadcasts is opened.
â° When Called
When the class broadcast command is executed and the selection menu is shown.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who opened the menu |
options |
table | Array of available class options |
âŠī¸ Returns
nil
đ Realm
Server
ClassBroadcastSent
đ Purpose
Called when a class broadcast has been sent to all eligible players.
â° When Called
After the broadcast messages are sent to players.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who sent the broadcast |
message |
string | The broadcast message |
classes |
table | Array of class names that received the broadcast |
âŠī¸ Returns
nil
đ Realm
Server
FactionBroadcastLogged
đ Purpose
Called after a faction broadcast has been logged.
â° When Called
After the broadcast is sent and logged in the system.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who sent the broadcast |
message |
string | The broadcast message |
factions |
table | Array of faction names that received the broadcast |
âŠī¸ Returns
nil
đ Realm
Server
FactionBroadcastMenuClosed
đ Purpose
Called when the faction selection menu for broadcasts is closed.
â° When Called
After the player selects factions and the menu closes.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who closed the menu |
selectedOptions |
table | Array of selected faction options |
âŠī¸ Returns
nil
đ Realm
Server
FactionBroadcastMenuOpened
đ Purpose
Called when the faction selection menu for broadcasts is opened.
â° When Called
When the faction broadcast command is executed and the selection menu is shown.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who opened the menu |
options |
table | Array of available faction options |
âŠī¸ Returns
nil
đ Realm
Server
FactionBroadcastSent
đ Purpose
Called when a faction broadcast has been sent to all eligible players.
â° When Called
After the broadcast messages are sent to players.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player who sent the broadcast |
message |
string | The broadcast message |
factions |
table | Array of faction names that received the broadcast |
âŠī¸ Returns
nil
đ Realm
Server
PreClassBroadcastSend
đ Purpose
Called before a class broadcast is sent to players.
â° When Called
After class selection but before messages are sent.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player sending the broadcast |
message |
string | The broadcast message |
classes |
table | Array of class names that will receive the broadcast |
âŠī¸ Returns
nil
đ Realm
Server
PreFactionBroadcastSend
đ Purpose
Called before a faction broadcast is sent to players.
â° When Called
After faction selection but before messages are sent.
âī¸ Parameters
| Parameter | Type | Description |
|---|---|---|
client |
Player | The player sending the broadcast |
message |
string | The broadcast message |
factions |
table | Array of faction names that will receive the broadcast |
âŠī¸ Returns
nil
đ Realm
Server