1
0
Fork 0
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:
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

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