1
0
Fork 0
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:
Alex Bramley 2011-10-27 17:03:01 +01:00
parent 2603e0984c
commit 47dd5b3430
4 changed files with 28 additions and 28 deletions

View file

@ -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.