mirror of
https://github.com/fluffle/goirc
synced 2025-07-17 09:11:13 +00:00
We need to be able to get at ChanPrivs easily.
This commit is contained in:
parent
2603e0984c
commit
47dd5b3430
4 changed files with 28 additions and 28 deletions
|
@ -102,14 +102,14 @@ func NewChannel(name string, l logging.Logger) *Channel {
|
|||
}
|
||||
|
||||
// Returns true if the Nick is associated with the Channel
|
||||
func (ch *Channel) IsOn(nk *Nick) bool {
|
||||
_, ok := ch.nicks[nk]
|
||||
return ok
|
||||
func (ch *Channel) IsOn(nk *Nick) (*ChanPrivs, bool) {
|
||||
cp, ok := ch.nicks[nk]
|
||||
return cp, ok
|
||||
}
|
||||
|
||||
func (ch *Channel) IsOnStr(n string) bool {
|
||||
_, ok := ch.lookup[n]
|
||||
return ok
|
||||
func (ch *Channel) IsOnStr(n string) (*Nick, bool) {
|
||||
nk, ok := ch.lookup[n]
|
||||
return nk, ok
|
||||
}
|
||||
|
||||
// Associates a Nick with a Channel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue