* Implemented @chperm - a command for viewing and setting individual permissions on a user without using the admin interface. I consider expanding this later with a group handling method as well (@chgroup). The command supports viewing all permissions available in the game, viewing those set on a user, add and delete a permission. No refactoring of the permission models (moving them into their respective application) has been done yet.
* Added del_event() to scheduler, allowing to remove events from the event queue. This allows for creating e.g. one-time events. . Griatch
This commit is contained in:
parent
82fe65f31f
commit
e05eabe5ef
3 changed files with 152 additions and 11 deletions
|
|
@ -38,7 +38,7 @@ class IntervalEvent(object):
|
|||
String representation of the event.
|
||||
"""
|
||||
return self.name
|
||||
|
||||
|
||||
def start_event_loop(self):
|
||||
"""
|
||||
Called to start up the event loop when the event is added to the
|
||||
|
|
@ -49,6 +49,13 @@ class IntervalEvent(object):
|
|||
self.looped_task = task.LoopingCall(self.fire_event)
|
||||
# Start the task up with the specified interval.
|
||||
self.looped_task.start(self.interval, now=False)
|
||||
|
||||
def stop_event_loop(self):
|
||||
"""
|
||||
Called to stop the event loop when the event is removed from the
|
||||
scheduler.
|
||||
"""
|
||||
self.looped_task.stop()
|
||||
|
||||
def event_function(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue