kibot.permDB
index
/home/groups/kibot/web/contents/kibot/permDB.py

 
Modules
            
kibot
os
 
Classes
            
kibot.BaseModule.BaseModule
permDB
exceptions.Exception
CommandNotFoundError
 
class CommandNotFoundError(exceptions.Exception)
       
   Data and non-method functions defined here:
__doc__ = None
__module__ = 'kibot.permDB'

Methods inherited from exceptions.Exception:
__getitem__(...)
__init__(...)
__str__(...)
 
class permDB(kibot.BaseModule.BaseModule)
       
   Methods defined here:
__init__(self, bot)
_expand(self)
_expand_tree(self, tree)
_load(self)
_recur_get_perm(self, perm, tree, pmap=None, depth=1)
can_execute(self, command_name, obj, cperm, cmd)
can_grant_perm(self, perm, userperms)
expand_alias(self, command)
##############################################################
get_unknown_perms(self)
grant_depth(self, base_perm, granted_perm)
granted_by(self, perm)
grants(self, perm)
implied_by(self, perm)
implies(self, perm)
imply_depth(self, base_perm, implied_perm)
set_unknown_perms(self, newperms)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'kibot.permDB'
_stash_attrs = ['imply', 'grant', 'aliases', 'unknown_perms', 'default_perms']
_stash_format = 'repr'

Methods inherited from kibot.BaseModule.BaseModule:
_del_handlers(self, priority=0, prefix='_on_')
This "undoes" self._set_handlers
_get_handlers(self, prefix)
return a list of all event types for which it looks like
the module has handlers.  If the module has defined _on_join and
_on_kick, then this will return ['join', 'kick']
 
if the attribute self._handlers is defined, it will be returned
instead
_get_stasher(self, file=None, format=None, **kwargs)
#_stash_file = 'foo.pickle'    # will appear in the "data_dir"
_set_handlers(self, priority=0, prefix='_on_')
set handlers for all methods with prefix <prefix>
For example, if the method _on_join is defined, then that method
will be registered as handler for the "join" event.
 
If the attribute self._handlers is defined, it will be used instead.
each element of the self._handlers list should be the event type.
 
  def _handle_join(self, conn, event): pass
  def _handle_kick(self, conn, event): pass
  def _handle_part(self, conn, event): pass
  self._handlers = ['join', 'kick']
  _set_handlers(prefix='_handle_')
 
In this case, only the first two will be set.  If self._handlers
were not defined, then all three would be set.
_stash(self, default=<class kibot.BaseModule.NoDefault>)
Store the attributes listed in self._stash_attrs in a stasher.
One will be created if necessary.  If a value isn't set and
a default is provided, that value will be used.
_unload(self)
1) save the stasher if any _stash_attrs are defined
2) remove any _on_XXXX handlers
_unstash(self, default=<class kibot.BaseModule.NoDefault>)
Reload the attributes listed in self._stash_attrs from the
stasher.  If the attribute was not in the stasher (or if the file
didn't exist) then the attribute will be set to 'default'.  If
default is not provided, then the attribute will not be set at all.
 
Data
             __file__ = '/home/groups/kibot/web/contents/kibot/permDB.pyc'
__name__ = 'kibot.permDB'
default_grant = {'manager': ['op', 'kick', 'introduce', 'ignore'], 'owner': ['owner', 'manager', 'load']}
default_imply = {'manager': ['op', 'kick', 'introduce', 'load'], 'owner': ['manager']}