Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / plugin / plugin.events.js
index 70222d2..0a19b2c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc319=['update','emit','hasOwnProperty','hook','exports','events','../../mysqldb','Plugin','save'];(function(_0x2ec869,_0x59782e){var _0xdcbc41=function(_0x48c01f){while(--_0x48c01f){_0x2ec869['push'](_0x2ec869['shift']());}};_0xdcbc41(++_0x59782e);}(_0xc319,0x12e));var _0x9c31=function(_0x21076c,_0x35a7d2){_0x21076c=_0x21076c-0x0;var _0x20ae3c=_0xc319[_0x21076c];return _0x20ae3c;};'use strict';var EventEmitter=require(_0x9c31('0x0'));var Plugin=require(_0x9c31('0x1'))['db'][_0x9c31('0x2')];var PluginEvents=new EventEmitter();PluginEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9c31('0x3'),'afterUpdate':_0x9c31('0x4'),'afterDestroy':'remove'};function emitEvent(_0x953a08){return function(_0x43faca,_0x16ed0c,_0x17d7dc){PluginEvents['emit'](_0x953a08+':'+_0x43faca['id'],_0x43faca);PluginEvents[_0x9c31('0x5')](_0x953a08,_0x43faca);_0x17d7dc(null);};}for(var e in events){if(events[_0x9c31('0x6')](e)){var event=events[e];Plugin[_0x9c31('0x7')](e,emitEvent(event));}}module[_0x9c31('0x8')]=PluginEvents;
\ No newline at end of file
+var _0x2e65=['save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','Plugin','setMaxListeners'];(function(_0x274057,_0x8e11c8){var _0x29fc37=function(_0x4b633c){while(--_0x4b633c){_0x274057['push'](_0x274057['shift']());}};_0x29fc37(++_0x8e11c8);}(_0x2e65,0x193));var _0x52e6=function(_0x5f0089,_0x227e2c){_0x5f0089=_0x5f0089-0x0;var _0x193892=_0x2e65[_0x5f0089];return _0x193892;};'use strict';var EventEmitter=require(_0x52e6('0x0'));var Plugin=require(_0x52e6('0x1'))['db'][_0x52e6('0x2')];var PluginEvents=new EventEmitter();PluginEvents[_0x52e6('0x3')](0x0);var events={'afterCreate':_0x52e6('0x4'),'afterUpdate':_0x52e6('0x5'),'afterDestroy':_0x52e6('0x6')};function emitEvent(_0x74e40d){return function(_0x47912f,_0x383919,_0x12ee44){PluginEvents[_0x52e6('0x7')](_0x74e40d+':'+_0x47912f['id'],_0x47912f);PluginEvents[_0x52e6('0x7')](_0x74e40d,_0x47912f);_0x12ee44(null);};}for(var e in events){if(events[_0x52e6('0x8')](e)){var event=events[e];Plugin[_0x52e6('0x9')](e,emitEvent(event));}}module[_0x52e6('0xa')]=PluginEvents;
\ No newline at end of file