Throw callback on change in Dedimania records

This commit is contained in:
Max Klaversma 2014-04-17 19:35:27 +02:00 committed by Steffen Schröder
parent cb0205273b
commit ea5faab2b0

View File

@ -47,6 +47,7 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
const SETTING_WIDGET_LINESCOUNT = 'Widget Displayed Lines Count';
const SETTING_WIDGET_LINEHEIGHT = 'Widget Line Height';
const SETTING_DEDIMANIA_CODE = '$l[http://dedimania.net/tm2stats/?do=register]Dedimania Code for ';
const CB_DEDIMANIA_CHANGE = 'Dedimania.Change';
/**
* Private Properties
@ -441,6 +442,8 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
break;
}
$this->maniaControl->callbackManager->triggerCallback(self::CB_DEDIMANIA_CHANGE, array($newRecord));
// Announce record
if ($oldRecord->nullRecord || $newRecord->rank < $oldRecord->rank) {
// Gained rank