Plugins check_version()

Plugins need a check_version() to return True if we are using a
compatible version and False if we aren't.
This commit is contained in:
Bryan Schumaker 2010-11-05 08:14:31 -04:00
parent 99c510dd20
commit f93b8178d5
3 changed files with 21 additions and 2 deletions

View File

@ -23,3 +23,10 @@ def start():
def stop():
pass
def check_version():
if ocarina.__major__ != 4:
return False
if ocarina.__minor__ != 1:
return False
return True

View File

@ -41,7 +41,13 @@ def start():
children.append("Groove Shark")
ocarina.add_tab("Groove Shark", groove)
def stop():
for child in children:
ocarina.remove_tab(child)
def check_version():
if ocarina.__major__ != 4:
return False
if ocarina.__minor__ != 1:
return False
return True

View File

@ -27,6 +27,12 @@ def start():
invite("POSTLOAD", tweak_title)
invite("POSTGETART", tweak_icon)
def stop():
pass
def check_version():
if ocarina.__major__ != 4:
return False
if ocarina.__minor__ != 1:
return False
return True