minor changes

This commit is contained in:
Andreas Neue 2016-01-18 23:28:13 +01:00
parent 519dc98189
commit b7f88b7a9d
2 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ func main() {
sayCh := make(chan string, 1024)
//bot := ircx.Classic(*server, *name)
cfg := ircx.Config{User: *name, MaxRetries: 10}
cfg := ircx.Config{User: *name, MaxRetries: 1000}
bot := ircx.New(*server, *name, cfg)
log.Println("Logging in")
if err := bot.Connect(); err != nil {
@ -96,12 +96,12 @@ func main() {
func RegisterHandlers(bot *ircx.Bot) {
log.Println("Registering handlers")
bot.HandleFunc(irc.RPL_WELCOME, RegisterConnect)
bot.HandleFunc(irc.RPL_WELCOME, ConnectHandler)
bot.HandleFunc(irc.PING, PingHandler)
bot.HandleFunc(irc.PRIVMSG, PrivmsgHandler)
}
func RegisterConnect(s ircx.Sender, m *irc.Message) {
func ConnectHandler(s ircx.Sender, m *irc.Message) {
if *nspass != "" {
log.Printf("Authenticating with NickServ: %v, %v", *name, *nspass)
s.Send(&irc.Message{

View File

@ -141,7 +141,7 @@ func scraper() {
}
func showScStats() {
sayCh <- "*\n*** SC User and Funding Stats ###"
sayCh <- "*\n*** SC User and Funding Stats ***"
sayCh <- fmt.Sprintf("*\nFans: %s", util.NumberToString(fans, '.'))
sayCh <- fmt.Sprintf("*\nFleet: %s", util.NumberToString(fleet, '.'))
sayCh <- fmt.Sprintf("*\nFunds: $ %s", util.NumberToString(funds, '.'))