Beispiel #1
0
func init() {
	events.AddHandler("RecvFromClient", "commands", events.PrioNormal, recvFromClient)

	AddCommand("help", help,
		`usage: help [<command>]
Shows documentation on a given command.  If no command is given, then all
available commands are listed.`)
}
Beispiel #2
0
func (bouncer *bouncer) Enable() bool {
	events.AddHandler("RecvFromClient", "bouncer", events.PrioLast, recvFromClient)
	events.AddHandler("RecvFromServer", "bouncer", events.PrioLast, recvFromServer)
	return true
}
Beispiel #3
0
func init() {
	events.AddChain("RecvFromClient", InvokeSendRecv)
	events.AddChain("SendToClient", InvokeSendRecv)

	events.AddHandler("SendToClient", "client", events.PrioLast, sendToClient)
}
Beispiel #4
0
func init() {
	events.AddChain("RecvFromServer", InvokeSendRecv)
	events.AddChain("SendToServer", InvokeSendRecv)

	events.AddHandler("SendToServer", "server", events.PrioLast, sendToServer)
}
Beispiel #5
0
func (ping *ping) Enable() bool {
	events.AddHandler("RecvFromClient", "ping", events.PrioNormal, handlePing)
	events.AddHandler("RecvFromServer", "ping", events.PrioNormal, handlePing)
	return true
}