Add /away

This commit is contained in:
khlieng 2015-02-21 13:06:05 +01:00
parent ed9a1c3216
commit ccb0149b3d
6 changed files with 29 additions and 5 deletions

6
irc.go
View file

@ -30,6 +30,8 @@ const (
RPL_LUSERCHANNELS = "254"
RPL_LUSERME = "255"
RPL_AWAY = "301"
RPL_WHOISUSER = "311"
RPL_WHOISSERVER = "312"
RPL_WHOISOPERATOR = "313"
@ -195,6 +197,10 @@ func (i *IRC) Whois(nick string) {
i.Write("WHOIS " + nick)
}
func (i *IRC) Away(message string) {
i.Write("AWAY :" + message)
}
func (i *IRC) GetNick() string {
i.nickLock.Lock()
defer i.nickLock.Unlock()