Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / chatWebsite / chatWebsite.rpc.js
index 4483988..69556bd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x10bb=['rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./chatWebsite.socket','register','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x4d71b9,_0x8960b2){var _0x279326=function(_0x3b94d9){while(--_0x3b94d9){_0x4d71b9['push'](_0x4d71b9['shift']());}};_0x279326(++_0x8960b2);}(_0x10bb,0x12d));var _0xb10b=function(_0x2c05bd,_0x7244a){_0x2c05bd=_0x2c05bd-0x0;var _0x1ac6c4=_0x10bb[_0x2c05bd];return _0x1ac6c4;};'use strict';var _=require(_0xb10b('0x0'));var util=require(_0xb10b('0x1'));var moment=require('moment');var BPromise=require(_0xb10b('0x2'));var rs=require(_0xb10b('0x3'));var fs=require('fs');var Redis=require(_0xb10b('0x4'));var db=require(_0xb10b('0x5'))['db'];var utils=require(_0xb10b('0x6'));var logger=require('../../config/logger')(_0xb10b('0x7'));var config=require(_0xb10b('0x8'));var jayson=require(_0xb10b('0x9'));var client=jayson[_0xb10b('0xa')][_0xb10b('0xb')]({'port':0x232a});config[_0xb10b('0xc')]=_[_0xb10b('0xd')](config['redis'],{'host':_0xb10b('0xe'),'port':0x18eb});var socket=require(_0xb10b('0xf'))(new Redis(config[_0xb10b('0xc')]));require(_0xb10b('0x10'))[_0xb10b('0x11')](socket);function respondWithRpcPromise(_0x1fbcc6,_0x45e120,_0x270408){return new BPromise(function(_0x4195c2,_0x29cb9a){return client['request'](_0x1fbcc6,_0x270408)['then'](function(_0x527bb8){logger[_0xb10b('0x12')](_0xb10b('0x13'),_0x45e120,_0xb10b('0x14'));logger[_0xb10b('0x15')](_0xb10b('0x16'),_0x45e120,'request\x20sent',JSON[_0xb10b('0x17')](_0x527bb8));if(_0x527bb8[_0xb10b('0x18')]){if(_0x527bb8['error'][_0xb10b('0x19')]===0x1f4){logger['error'](_0xb10b('0x13'),_0x45e120,_0x527bb8[_0xb10b('0x18')]['message']);return _0x29cb9a(_0x527bb8['error'][_0xb10b('0x1a')]);}logger['error'](_0xb10b('0x13'),_0x45e120,_0x527bb8[_0xb10b('0x18')][_0xb10b('0x1a')]);return _0x4195c2(_0x527bb8[_0xb10b('0x18')][_0xb10b('0x1a')]);}else{logger[_0xb10b('0x12')](_0xb10b('0x13'),_0x45e120,_0xb10b('0x14'));_0x4195c2(_0x527bb8[_0xb10b('0x1b')][_0xb10b('0x1a')]);}})['catch'](function(_0x489f2e){logger[_0xb10b('0x18')](_0xb10b('0x13'),_0x45e120,_0x489f2e);_0x29cb9a(_0x489f2e);});});}
\ No newline at end of file
+var _0x86ee=['localhost','./chatWebsite.socket','info','request\x20sent','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatWebsite,\x20%s,\x20%s','message','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','redis'];(function(_0x4c639c,_0x2e1398){var _0x3c15b6=function(_0x116d9f){while(--_0x116d9f){_0x4c639c['push'](_0x4c639c['shift']());}};_0x3c15b6(++_0x2e1398);}(_0x86ee,0x66));var _0xe86e=function(_0x1e4a8e,_0x18022b){_0x1e4a8e=_0x1e4a8e-0x0;var _0x5408f9=_0x86ee[_0x1e4a8e];return _0x5408f9;};'use strict';var _=require(_0xe86e('0x0'));var util=require(_0xe86e('0x1'));var moment=require(_0xe86e('0x2'));var BPromise=require(_0xe86e('0x3'));var rs=require(_0xe86e('0x4'));var fs=require('fs');var Redis=require(_0xe86e('0x5'));var db=require(_0xe86e('0x6'))['db'];var utils=require(_0xe86e('0x7'));var logger=require(_0xe86e('0x8'))('rpc');var config=require(_0xe86e('0x9'));var jayson=require(_0xe86e('0xa'));var client=jayson[_0xe86e('0xb')]['http']({'port':0x232a});config[_0xe86e('0xc')]=_['defaults'](config[_0xe86e('0xc')],{'host':_0xe86e('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe86e('0xc')]));require(_0xe86e('0xe'))['register'](socket);function respondWithRpcPromise(_0x558975,_0x1349aa,_0x5deaae){return new BPromise(function(_0xcb0890,_0x1e5a4a){return client['request'](_0x558975,_0x5deaae)['then'](function(_0x267ff8){logger[_0xe86e('0xf')]('ChatWebsite,\x20%s,\x20%s',_0x1349aa,_0xe86e('0x10'));logger['debug'](_0xe86e('0x11'),_0x1349aa,'request\x20sent',JSON[_0xe86e('0x12')](_0x267ff8));if(_0x267ff8[_0xe86e('0x13')]){if(_0x267ff8[_0xe86e('0x13')][_0xe86e('0x14')]===0x1f4){logger[_0xe86e('0x13')](_0xe86e('0x15'),_0x1349aa,_0x267ff8[_0xe86e('0x13')][_0xe86e('0x16')]);return _0x1e5a4a(_0x267ff8[_0xe86e('0x13')][_0xe86e('0x16')]);}logger[_0xe86e('0x13')]('ChatWebsite,\x20%s,\x20%s',_0x1349aa,_0x267ff8[_0xe86e('0x13')]['message']);return _0xcb0890(_0x267ff8[_0xe86e('0x13')][_0xe86e('0x16')]);}else{logger[_0xe86e('0xf')](_0xe86e('0x15'),_0x1349aa,_0xe86e('0x10'));_0xcb0890(_0x267ff8['result'][_0xe86e('0x16')]);}})['catch'](function(_0x331016){logger['error'](_0xe86e('0x15'),_0x1349aa,_0x331016);_0x1e5a4a(_0x331016);});});}
\ No newline at end of file