Handle NOTICEs in isFromChannel and isFromUser (#21)
This commit is contained in:
parent
5a5805298c
commit
3a1cc735c7
4
event.go
4
event.go
@ -472,7 +472,7 @@ func (e *Event) IsCTCP() (ok bool, ctcp *CTCPEvent) {
|
||||
// IsFromChannel checks to see if a message was from a channel (rather than
|
||||
// a private message).
|
||||
func (e *Event) IsFromChannel() bool {
|
||||
if e.Source == nil || e.Command != PRIVMSG || len(e.Params) < 1 {
|
||||
if e.Source == nil || (e.Command != PRIVMSG && e.Command != NOTICE) || len(e.Params) < 1 {
|
||||
return false
|
||||
}
|
||||
|
||||
@ -486,7 +486,7 @@ func (e *Event) IsFromChannel() bool {
|
||||
// IsFromUser checks to see if a message was from a user (rather than a
|
||||
// channel).
|
||||
func (e *Event) IsFromUser() bool {
|
||||
if e.Source == nil || e.Command != PRIVMSG || len(e.Params) < 1 {
|
||||
if e.Source == nil || (e.Command != PRIVMSG && e.Command != NOTICE) || len(e.Params) < 1 {
|
||||
return false
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user