Beispiel #1
0
func Bot(c *client.Conn, pm base.PluginManager, l logging.Logger) *Sp0rkle {
	s := strings.Split(*rebuilder, ":")
	bot := &Sp0rkle{
		Conn:     c,
		ER:       c.ER,
		ED:       c.ED,
		PM:       pm,
		l:        l,
		drivers:  make(map[string]base.Driver),
		channels: make([]string, 0, 1),
		rbnick:   s[0],
		Prefix:   *prefix,
		Quit:     make(chan bool),
	}
	if len(s) > 1 {
		bot.rbpw = s[1]
	}
	c.State = bot
	return bot
}