mirror of
https://github.com/fluffle/goirc
synced 2025-07-01 02:53:53 +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
|
@ -55,14 +55,14 @@ func NewNick(n string, l logging.Logger) *Nick {
|
|||
}
|
||||
|
||||
// Returns true if the Nick is associated with the Channel.
|
||||
func (nk *Nick) IsOn(ch *Channel) bool {
|
||||
_, ok := nk.chans[ch]
|
||||
return ok
|
||||
func (nk *Nick) IsOn(ch *Channel) (*ChanPrivs, bool) {
|
||||
cp, ok := nk.chans[ch]
|
||||
return cp, ok
|
||||
}
|
||||
|
||||
func (nk *Nick) IsOnStr(c string) bool {
|
||||
_, ok := nk.lookup[c]
|
||||
return ok
|
||||
func (nk *Nick) IsOnStr(c string) (*Channel, bool) {
|
||||
ch, ok := nk.lookup[c]
|
||||
return ch, ok
|
||||
}
|
||||
|
||||
// Associates a Channel with a Nick.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue