Built motion from commit 616d3211.|2.6.4
[motion2.git] / server / api / plugin / plugin.events.js
index 5c18935..b3e0bc5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1c9a=['events','Plugin','save','update','remove','emit','hasOwnProperty','exports'];(function(_0x24d268,_0x54cbcf){var _0x25f6f6=function(_0x2c6c38){while(--_0x2c6c38){_0x24d268['push'](_0x24d268['shift']());}};_0x25f6f6(++_0x54cbcf);}(_0x1c9a,0x98));var _0xa1c9=function(_0xb87ff7,_0x1471da){_0xb87ff7=_0xb87ff7-0x0;var _0x438bac=_0x1c9a[_0xb87ff7];return _0x438bac;};'use strict';var EventEmitter=require(_0xa1c9('0x0'));var Plugin=require('../../mysqldb')['db'][_0xa1c9('0x1')];var PluginEvents=new EventEmitter();PluginEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xa1c9('0x2'),'afterUpdate':_0xa1c9('0x3'),'afterDestroy':_0xa1c9('0x4')};function emitEvent(_0x4bf57e){return function(_0x21c0fc,_0x45d1f7,_0x20f0bf){PluginEvents[_0xa1c9('0x5')](_0x4bf57e+':'+_0x21c0fc['id'],_0x21c0fc);PluginEvents['emit'](_0x4bf57e,_0x21c0fc);_0x20f0bf(null);};}for(var e in events){if(events[_0xa1c9('0x6')](e)){var event=events[e];Plugin['hook'](e,emitEvent(event));}}module[_0xa1c9('0x7')]=PluginEvents;
\ No newline at end of file
+var _0x99fb=['hasOwnProperty','exports','events','Plugin','setMaxListeners','save','update','remove','emit'];(function(_0x2235bf,_0x3a06a7){var _0x4c3a64=function(_0x3b3bb6){while(--_0x3b3bb6){_0x2235bf['push'](_0x2235bf['shift']());}};_0x4c3a64(++_0x3a06a7);}(_0x99fb,0x92));var _0xb99f=function(_0x1e65a5,_0x46212f){_0x1e65a5=_0x1e65a5-0x0;var _0x20620b=_0x99fb[_0x1e65a5];return _0x20620b;};'use strict';var EventEmitter=require(_0xb99f('0x0'));var Plugin=require('../../mysqldb')['db'][_0xb99f('0x1')];var PluginEvents=new EventEmitter();PluginEvents[_0xb99f('0x2')](0x0);var events={'afterCreate':_0xb99f('0x3'),'afterUpdate':_0xb99f('0x4'),'afterDestroy':_0xb99f('0x5')};function emitEvent(_0x5891ab){return function(_0x23a1ef,_0x3e0d06,_0x58357b){PluginEvents[_0xb99f('0x6')](_0x5891ab+':'+_0x23a1ef['id'],_0x23a1ef);PluginEvents[_0xb99f('0x6')](_0x5891ab,_0x23a1ef);_0x58357b(null);};}for(var e in events){if(events[_0xb99f('0x7')](e)){var event=events[e];Plugin['hook'](e,emitEvent(event));}}module[_0xb99f('0x8')]=PluginEvents;
\ No newline at end of file