forked from External/ergo
Move all errors into errors.go
This commit is contained in:
parent
3ef4c5f799
commit
2419f69879
17 changed files with 100 additions and 100 deletions
|
|
@ -6,7 +6,6 @@
|
|||
package irc
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
|
@ -18,10 +17,6 @@ import (
|
|||
"github.com/oragono/oragono/irc/modes"
|
||||
)
|
||||
|
||||
var (
|
||||
ChannelAlreadyRegistered = errors.New("Channel is already registered")
|
||||
)
|
||||
|
||||
// Channel represents a channel that clients can join.
|
||||
type Channel struct {
|
||||
flags modes.ModeSet
|
||||
|
|
@ -132,7 +127,7 @@ func (channel *Channel) SetRegistered(founder string) error {
|
|||
defer channel.stateMutex.Unlock()
|
||||
|
||||
if channel.registeredFounder != "" {
|
||||
return ChannelAlreadyRegistered
|
||||
return errChannelAlreadyRegistered
|
||||
}
|
||||
channel.registeredFounder = founder
|
||||
channel.registeredTime = time.Now()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue