channel.go 522 B

123456789101112131415161718
  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. Password string // Chanserv password.
  9. }
  10. // Returns true if the channel is local to the current server.
  11. // This is the case when its name starts with '&'.
  12. func (c *Channel) IsLocal() bool {
  13. return len(c.Name) > 0 && c.Name[0] == '&'
  14. }