Documentation ¶
Overview ¶
Copyright (C) 2015 TF2Stadium Use of this source code is governed by the GPLv3 that can be found in the COPYING file.
Index ¶
- Constants
- Variables
- func ConnectAMQP()
- func DiscordEmoji(emoji string) string
- func DiscordSendToChannel(channelName string, msg string)
- func GetGroupMembers(url string) ([]string, error)
- func GetRegion(server string) (string, string)
- func GetServemeContext(addrStr string) *servemetf.Context
- func GetServemeContextIP(ipaddr string) *servemetf.Context
- func InitGeoIPDB()
- func IsWhitelisted(steamid, url string) bool
- func LockRecord(id uint, recType interface{})
- func RLockRecord(id uint, recType interface{})
- func RUnlockRecord(id uint, recType interface{})
- func RemoveRecord(id uint, recType interface{})
- func UnlockRecord(id uint, recType interface{})
- type GroupXML
- type Request
Constants ¶
View Source
const ( RolePlayer authority.AuthRole = iota RoleMod RoleAdmin RoleDeveloper )
DO NOT CHANGE THE INTEGER VALUES OF ALREADY EXISTING ROLES.
View Source
const ( ActionBanJoin authority.AuthAction = iota ActionBanCreate ActionBanChat ActionChangeRole ActionViewLogs ActionViewPage //view admin pages ActionDeleteChat ModifyServers //add/remove servers )
You can't change the order of these
Variables ¶
View Source
var ( ServemeNA = &servemetf.Context{Host: "na.serveme.tf"} ServemeEU = &servemetf.Context{Host: "serveme.tf"} ServemeAU = &servemetf.Context{Host: "au.serveme.tf"} )
View Source
var AMQPChannel *amqp.Channel
View Source
var AMQPConn *amqp.Connection
View Source
var ActionNames = map[authority.AuthAction]string{ ActionBanCreate: "ActionBanCreate", ActionBanJoin: "ActionBanJoin", ActionBanChat: "ActionBanChat", ActionChangeRole: "ActionChangeRole", }
View Source
var (
Discord *dg.Session
)
View Source
var GlobalWait = new(sync.WaitGroup)
GlobalWait is used by the main signal handler to wait for all state changes to finish, so as to avoid inconsistent state changes
View Source
var HTTPClient = &http.Client{ Timeout: 20 * time.Second, }
View Source
var Raven *raven.Client = nil
View Source
var RoleMap = map[string]authority.AuthRole{ "player": RolePlayer, "moderator": RoleMod, "administrator": RoleAdmin, "developer": RoleDeveloper, }
View Source
var RoleNames = map[authority.AuthRole]string{ RoleDeveloper: "developer", RolePlayer: "player", RoleMod: "moderator", RoleAdmin: "administrator", }
Functions ¶
func ConnectAMQP ¶
func ConnectAMQP()
func DiscordEmoji ¶
func DiscordSendToChannel ¶
func GetGroupMembers ¶
Get Steam IDs of the members of a given steam group
func GetServemeContext ¶
func GetServemeContextIP ¶
func InitGeoIPDB ¶
func InitGeoIPDB()
func IsWhitelisted ¶
func LockRecord ¶
func LockRecord(id uint, recType interface{})
func RLockRecord ¶
func RLockRecord(id uint, recType interface{})
func RUnlockRecord ¶
func RUnlockRecord(id uint, recType interface{})
func RemoveRecord ¶
func RemoveRecord(id uint, recType interface{})
func UnlockRecord ¶
func UnlockRecord(id uint, recType interface{})
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.