Versions in this module Expand all Collapse all v0 v0.5.7 Jun 14, 2021 Changes in this version + var ErrAlreadyRunning = errors.New("game is already running") + var ErrGameNotExist = errors.New("requested game does not exist") + var ErrGameNotRunning = errors.New("game is not running") + type Game struct + func NewGame(conf *tomlconf.Game, manager *Manager) (*Game, error) + func (g *Game) AutoStart() + func (g *Game) GetComment() string + func (g *Game) GetName() string + func (g *Game) IsRunning() bool + func (g *Game) OnJoin(source, channel string) + func (g *Game) OnKick(source, channel, kickee, message string) + func (g *Game) OnMessage(source, target, msg string, isAction bool) + func (g *Game) OnNick(source, newnick string) + func (g *Game) OnPart(source, target, message string) + func (g *Game) OnQuit(source, message string) + func (g *Game) Run() error + func (g *Game) SendFormattedLine(d interface{}, fmt *format.Format) error + func (g *Game) SendLineFromOtherGame(msg string, source interfaces.Game) + func (g *Game) Status() string + func (g *Game) StopOrKill() error + func (g *Game) StopOrKillTimeout(timeout time.Duration) error + func (g *Game) StopOrKillWaitgroup(wg *sync.WaitGroup) + func (g *Game) String() string + func (g *Game) UpdateFromConfig(conf *tomlconf.Game) error + func (g *Game) Write(p []byte) (n int, err error) + func (g *Game) WriteString(s string) (n int, err error) + type Manager struct + Cmd *command.Manager + func NewManager(conf *tomlconf.Config, bot interfaces.Bot, logger *log.Logger) (*Manager, error) + func (m *Manager) AddGame(g interfaces.Game) error + func (m *Manager) Error(err error) + func (m *Manager) ForEachGame(gameFunc func(interfaces.Game), skip []interfaces.Game) + func (m *Manager) GameExists(name string) bool + func (m *Manager) GetGameFromName(name string) interfaces.Game + func (m *Manager) ReloadGames(configs []*tomlconf.Game) + func (m *Manager) Run() (bool, error) + func (m *Manager) StartAutoStartGames() + func (m *Manager) StartGame(name string) error + func (m *Manager) Stop(msg string, restart bool) + func (m *Manager) StopAllGames() + func (m *Manager) StopGame(name string) error + func (m *Manager) String() string + type Regexp struct + func NewRegexp(conf tomlconf.Regexp, manager *RegexpManager, root *template.Template) (*Regexp, error) + func (r *Regexp) String() string + type RegexpList []*Regexp + func (gl RegexpList) Len() int + func (gl RegexpList) Less(i, j int) bool + func (gl RegexpList) Swap(i, j int) + type RegexpManager struct + func NewRegexpManager(game *Game) *RegexpManager + func (r *RegexpManager) String() string + func (r *RegexpManager) UpdateFromConf(res []tomlconf.Regexp, root *template.Template) error v0.5.6 Sep 25, 2020