2b86a17478
Theme resources can now be restricted to logged in users to avoid wasting bandwidth. The template building step is now a flag to gosora.exe / Gosora. Added build_templates.bat for test and development purposes. Added some extra error checks to the batch files. Fixed a compile error in the installer. Fixed a big data race in the template transpiler and cleaned up a few loose ends. Renamed CTemplateSet.log() to CTemplateSet.detail() to bring it in line with the /common/ logging Renamed CTemplateSet.logf() to CTemplateSet.detailf() to bring it in line with the /common/ logging You can now override templates in /templates/ without overwriting them by adding a modified version of a template with the same name in /templates/overrides/ Added Go Git as a dependency. Removed config.go from the repository, you need to rely on the installer to generate this now, or make one yourself based on the implementation of it in the installer. Travis now does tests for Go 1.10 Began work on the upgrader.
35 lines
902 B
Go
35 lines
902 B
Go
// +build no_ws
|
|
|
|
package common
|
|
|
|
import "errors"
|
|
import "net/http"
|
|
|
|
// TODO: Disable WebSockets on high load? Add a Control Panel interface for disabling it?
|
|
var EnableWebsockets = false // Put this in caps for consistency with the other constants?
|
|
|
|
var wsHub WSHub
|
|
var errWsNouser = errors.New("This user isn't connected via WebSockets")
|
|
|
|
type WSHub struct{}
|
|
|
|
func (_ *WSHub) guestCount() int { return 0 }
|
|
|
|
func (_ *WSHub) userCount() int { return 0 }
|
|
|
|
func (hub *WSHub) broadcastMessage(_ string) error { return nil }
|
|
|
|
func (hub *WSHub) pushMessage(_ int, _ string) error {
|
|
return errWsNouser
|
|
}
|
|
|
|
func (hub *WSHub) pushAlert(_ int, _ int, _ string, _ string, _ int, _ int, _ int) error {
|
|
return errWsNouser
|
|
}
|
|
|
|
func (hub *WSHub) pushAlerts(_ []int, _ int, _ string, _ string, _ int, _ int, _ int) error {
|
|
return errWsNouser
|
|
}
|
|
|
|
func RouteWebsockets(_ http.ResponseWriter, _ *http.Request, _ User) {}
|