mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Add the OnServerBurst hook and fix the docs for OnServerLink.
This commit is contained in:
parent
cf5d382b82
commit
65f74be719
@ -61,11 +61,16 @@ class ServerProtocol::LinkEventListener
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Fired when a server finishes burst
|
/** Fired when a server has linked to the network.
|
||||||
* @param server Server that recently linked and finished burst
|
* @param server Server that recently linked.
|
||||||
*/
|
*/
|
||||||
virtual void OnServerLink(const Server* server) { }
|
virtual void OnServerLink(const Server* server) { }
|
||||||
|
|
||||||
|
/** Fired when a server has finished bursting.
|
||||||
|
* @param server Server that recently finished bursting.
|
||||||
|
*/
|
||||||
|
virtual void OnServerBurst(const Server* server) { }
|
||||||
|
|
||||||
/** Fired when a server splits
|
/** Fired when a server splits
|
||||||
* @param server Server that split
|
* @param server Server that split
|
||||||
* @param error Whether the server split because of an error.
|
* @param error Whether the server split because of an error.
|
||||||
|
@ -167,6 +167,7 @@ void TreeServer::FinishBurst()
|
|||||||
unsigned long bursttime = ts - this->StartBurst;
|
unsigned long bursttime = ts - this->StartBurst;
|
||||||
ServerInstance->SNO->WriteToSnoMask(Parent == Utils->TreeRoot ? 'l' : 'L', "Received end of netburst from \002%s\002 (burst time: %lu %s)",
|
ServerInstance->SNO->WriteToSnoMask(Parent == Utils->TreeRoot ? 'l' : 'L', "Received end of netburst from \002%s\002 (burst time: %lu %s)",
|
||||||
GetName().c_str(), (bursttime > 10000 ? bursttime / 1000 : bursttime), (bursttime > 10000 ? "secs" : "msecs"));
|
GetName().c_str(), (bursttime > 10000 ? bursttime / 1000 : bursttime), (bursttime > 10000 ? "secs" : "msecs"));
|
||||||
|
FOREACH_MOD_CUSTOM(Utils->Creator->GetLinkEventProvider(), ServerProtocol::LinkEventListener, OnServerBurst, (this));
|
||||||
|
|
||||||
StartBurst = 0;
|
StartBurst = 0;
|
||||||
FinishBurstInternal();
|
FinishBurstInternal();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user