mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
simplify new channel insert
This commit is contained in:
parent
02abeeb164
commit
e409bcec99
@ -35,11 +35,7 @@ func NewChannel(s *Server, name string) *Channel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
s.channels[name] = channel
|
s.channels[name] = channel
|
||||||
s.db.Exec(`INSERT INTO channel
|
s.db.Exec(`INSERT INTO channel (name) VALUES (?)`, channel.name)
|
||||||
(name, flags, key, topic, user_limit)
|
|
||||||
VALUES (?, ?, ?, ?, ?)`,
|
|
||||||
channel.name, channel.flags.String(), channel.key, channel.topic,
|
|
||||||
channel.userLimit)
|
|
||||||
|
|
||||||
return channel
|
return channel
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ const (
|
|||||||
LocalOperator UserMode = 'O'
|
LocalOperator UserMode = 'O'
|
||||||
Operator UserMode = 'o'
|
Operator UserMode = 'o'
|
||||||
Restricted UserMode = 'r'
|
Restricted UserMode = 'r'
|
||||||
ServerNotice UserMode = 's'
|
ServerNotice UserMode = 's' // deprecated
|
||||||
WallOps UserMode = 'w'
|
WallOps UserMode = 'w'
|
||||||
|
|
||||||
Anonymous ChannelMode = 'a' // flag
|
Anonymous ChannelMode = 'a' // flag
|
||||||
|
Loading…
Reference in New Issue
Block a user