2017-11-02 02:52:21 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
var fpstore *ForumPermsStore
|
|
|
|
|
|
|
|
type ForumPermsStore struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewForumPermsStore() *ForumPermsStore {
|
|
|
|
return &ForumPermsStore{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fps *ForumPermsStore) Get(fid int, gid int) (fperms ForumPerms, err error) {
|
2017-11-02 04:12:51 +00:00
|
|
|
// TODO: Add a hook here and have plugin_guilds use it
|
2017-11-02 02:52:21 +00:00
|
|
|
group, err := gstore.Get(gid)
|
|
|
|
if err != nil {
|
|
|
|
return fperms, ErrNoRows
|
|
|
|
}
|
|
|
|
return group.Forums[fid], nil
|
|
|
|
}
|