Print ERROR messages
This commit is contained in:
parent
ae6ad0a5b9
commit
9dffb541b9
11
irc/const.go
11
irc/const.go
@ -1,15 +1,16 @@
|
||||
package irc
|
||||
|
||||
const (
|
||||
Ping = "PING"
|
||||
Nick = "NICK"
|
||||
Error = "ERROR"
|
||||
Join = "JOIN"
|
||||
Part = "PART"
|
||||
Mode = "MODE"
|
||||
Privmsg = "PRIVMSG"
|
||||
Nick = "NICK"
|
||||
Notice = "NOTICE"
|
||||
Topic = "TOPIC"
|
||||
Part = "PART"
|
||||
Ping = "PING"
|
||||
Privmsg = "PRIVMSG"
|
||||
Quit = "QUIT"
|
||||
Topic = "TOPIC"
|
||||
|
||||
ReplyWelcome = "001"
|
||||
ReplyYourHost = "002"
|
||||
|
@ -287,6 +287,10 @@ func (i *ircHandler) badNick(msg *irc.Message) {
|
||||
})
|
||||
}
|
||||
|
||||
func (i *ircHandler) error(msg *irc.Message) {
|
||||
i.session.printError(msg.LastParam())
|
||||
}
|
||||
|
||||
func (i *ircHandler) initHandlers() {
|
||||
i.handlers = map[string]func(*irc.Message){
|
||||
irc.Nick: i.nick,
|
||||
@ -297,6 +301,7 @@ func (i *ircHandler) initHandlers() {
|
||||
irc.Notice: i.message,
|
||||
irc.Quit: i.quit,
|
||||
irc.Topic: i.topic,
|
||||
irc.Error: i.error,
|
||||
irc.ReplyWelcome: i.info,
|
||||
irc.ReplyYourHost: i.info,
|
||||
irc.ReplyCreated: i.info,
|
||||
|
Loading…
Reference in New Issue
Block a user