Made so the default add_default_cmdset script also removes the added cmdset when stopped. Fixed the function of @delplayer command.

This commit is contained in:
Griatch 2010-09-05 18:20:39 +00:00
parent 212061abb6
commit e125763ea5
5 changed files with 86 additions and 36 deletions

View file

@ -301,3 +301,13 @@ class AddCmdSet(Script):
else:
self.obj.cmdset.add(cmdset)
def at_stop(self):
"""
This removes the cmdset when the script stops
"""
cmdset = self.db.cmdset
if cmdset:
if self.db.add_default:
self.obj.cmdset.delete_default()
else:
self.obj.cmdset.delete(cmdset)