channel.go 475 B

1234567891011121314151617
  1. // This file is subject to a 1-clause BSD license.
  2. // Its contents can be found in the enclosed LICENSE file.
  3. package irc
  4. // Channel defines a single IRC channel.
  5. type Channel struct {
  6. Name string // Channel's name.
  7. Key string // Authentication key for protected channel.
  8. }
  9. // Returns true if the channel is local to the current server.
  10. // This is the case when its name starts with '&'.
  11. func (c *Channel) IsLocal() bool {
  12. return len(c.Name) > 0 && c.Name[0] == '&'
  13. }