2cfe271f2fc33633ed6dcaeef73df7a450612406
[motion2.git] / server / services / ami / trigger / integration / sugarcrm.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x51f2=['serverUrl','uri','%s/service/v4_1/rest.php','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','Fields','Inbound','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','users','contacts','version','charAt','%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s','%s/#bwc/index.php?module=Calls&action=EditView&record=%s','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','catch','error','recordingFormat','none','[OUTBOUND]','destcalleridname','destcalleridnum','Outbound','monitor_format','lastevent','toUpperCase','lodash','bluebird','ioredis','./util','../../../../config/environment','../../../../config/logger','redis','defaults','POST','emit','name','getString','assigned_user_id','description','Descriptions','date_start','slice','replace','duration_hours','parent_type','parent_name','direction','forEach','variableName','JSON','stringify','format','Basic\x20%s','apiKey','toString','base64','get_server_info','Getting\x20agent\x20with\x20name','get_entry_list','Employees','user_name','then','entry_list','length','find','name_value_list','value','info','Agent\x20found!','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','resolve','user_id','Contacts','contacts.phone_home\x20=\x20\x22%s\x22','phone_home','Enduser\x20found!','set_entry','first_name','<unknown>','Enduser\x20created.','[HTTP]','merge','map','type','nameField','customField','toLowerCase','string','push','content','variable','idField','custom_fields','customVariable','Variable','username','password','xCALLY\x20Motion\x20integration','sessionID','set_relationship','Calls','queue','remoteUri','stripTrailingSlash'];(function(_0x2aec52,_0x59d962){var _0x3b8835=function(_0x3e2604){while(--_0x3e2604){_0x2aec52['push'](_0x2aec52['shift']());}};_0x3b8835(++_0x59d962);}(_0x51f2,0x179));var _0x251f=function(_0x52d865,_0x527355){_0x52d865=_0x52d865-0x0;var _0x286b23=_0x51f2[_0x52d865];return _0x286b23;};'use strict';var _=require(_0x251f('0x0'));var rp=require('request-promise');var BPromise=require(_0x251f('0x1'));var md5=require('md5');var util=require('util');var Redis=require(_0x251f('0x2'));var intUtil=require(_0x251f('0x3'));var config=require(_0x251f('0x4'));var logger=require(_0x251f('0x5'))('sugarcrm');config[_0x251f('0x6')]=_[_0x251f('0x7')](config[_0x251f('0x6')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x251f('0x6')]));var def={'method':_0x251f('0x8'),'json':!![]};function emit(_0x32e0ea,_0x429787,_0x3399ba){io['to'](_0x32e0ea)[_0x251f('0x9')](_0x429787,_0x3399ba);}function getTicket(_0x2de8e4,_0x45ebcf,_0x2934eb,_0x1f9c12,_0x4f6d85,_0x564a67,_0x25b4a1,_0x16899c){logger['info']('Creating\x20new\x20ticket...');var _0x530e49=new Date();var _0x14ec87=[{'name':_0x251f('0xa'),'value':intUtil[_0x251f('0xb')](_0x1f9c12['Subjects'],_0x4f6d85,'\x20')},{'name':_0x251f('0xc'),'value':_0x45ebcf['id']},{'name':'created_by','value':_0x45ebcf['id']},{'name':_0x251f('0xd'),'value':intUtil['getString'](_0x1f9c12[_0x251f('0xe')],_0x4f6d85,'\x0a')},{'name':_0x251f('0xf'),'value':_0x530e49['toISOString']()[_0x251f('0x10')](0x0,0x13)[_0x251f('0x11')]('T','\x20')},{'name':_0x251f('0x12'),'value':'0'},{'name':'duration_minutes','value':'15'},{'name':'parent_id','value':_0x2934eb['id']},{'name':_0x251f('0x13'),'value':'Contacts'},{'name':_0x251f('0x14'),'value':_0x2934eb[_0x251f('0xa')]},{'name':_0x251f('0x15'),'value':_0x16899c}];if(_0x564a67['length']){_[_0x251f('0x16')](_0x564a67,function(_0x1b78b1){if(_0x4f6d85[_0x1b78b1[_0x251f('0x17')]]){_0x14ec87['push']({'name':_0x1b78b1['idField'],'value':_0x4f6d85[_0x1b78b1['variableName']]});}});}return request({'form':{'method':'set_entry','input_type':'JSON','response_type':_0x251f('0x18'),'rest_data':JSON[_0x251f('0x19')]({'session':_0x25b4a1['id'],'module_name':'Calls','name_value_list':_0x14ec87})}});}function getAuth(_0x37c490){return util[_0x251f('0x1a')](_0x251f('0x1b'),new Buffer(_0x37c490[_0x251f('0x1c')]+':X')[_0x251f('0x1d')](_0x251f('0x1e')));}function getServerInfo(_0xd7075a){return request({'form':{'method':_0x251f('0x1f'),'input_type':_0x251f('0x18'),'response_type':_0x251f('0x18'),'rest_data':JSON[_0x251f('0x19')]({'session':_0xd7075a['id']})}});}function getUser(_0x229f78,_0x415873,_0x2871b4){if(!_['isNil'](_0x415873)){logger['info'](_0x251f('0x20'),_0x415873);return request({'form':{'method':_0x251f('0x21'),'input_type':_0x251f('0x18'),'response_type':'JSON','rest_data':JSON['stringify']({'session':_0x2871b4['id'],'module_name':_0x251f('0x22'),'query':util[_0x251f('0x1a')]('INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200',_0x415873),'order_by':'','offset':'0','select_fields':['id',_0x251f('0xa'),_0x251f('0x23')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x251f('0x24')](function(_0xa698b0){if(_0xa698b0[_0x251f('0x25')][_0x251f('0x26')]){var _0xeee3cb=_[_0x251f('0x27')](_0xa698b0['entry_list'],function(_0x145f68){return _0x145f68[_0x251f('0x28')][_0x251f('0x23')][_0x251f('0x29')]===_0x415873;});if(_0xeee3cb){logger[_0x251f('0x2a')](_0x251f('0x2b'));return BPromise['resolve']({'id':_0xeee3cb[_0x251f('0x28')]['id'][_0x251f('0x29')],'name':_0xeee3cb[_0x251f('0x28')][_0x251f('0xa')][_0x251f('0x29')]});}}logger[_0x251f('0x2a')](_0x251f('0x2c'));return BPromise[_0x251f('0x2d')]({'id':_0x2871b4[_0x251f('0x28')][_0x251f('0x2e')][_0x251f('0x29')],'name':_0x2871b4['name_value_list']['user_name'][_0x251f('0x29')]});});}else{logger[_0x251f('0x2a')]('Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!');return BPromise[_0x251f('0x2d')]({'id':_0x2871b4['name_value_list'][_0x251f('0x2e')][_0x251f('0x29')],'name':_0x2871b4[_0x251f('0x28')][_0x251f('0x23')]['value']});}}function getEndUser(_0xcc68fa,_0x3825d2,_0x480739,_0x76e9f){logger['info']('Searching\x20enduser\x20with\x20phone',_0x480739);return request({'form':{'method':_0x251f('0x21'),'input_type':_0x251f('0x18'),'response_type':_0x251f('0x18'),'rest_data':JSON[_0x251f('0x19')]({'session':_0x76e9f['id'],'module_name':_0x251f('0x2f'),'query':util['format'](_0x251f('0x30'),_0x480739),'order_by':'','offset':'0','select_fields':['id',_0x251f('0xa'),_0x251f('0x31')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x251f('0x24')](function(_0x1eca8d){if(_0x1eca8d[_0x251f('0x25')][_0x251f('0x26')]){var _0x84e203=_[_0x251f('0x27')](_0x1eca8d[_0x251f('0x25')],function(_0x46a970){return _0x46a970[_0x251f('0x28')][_0x251f('0x31')][_0x251f('0x29')]===_0x480739;});if(_0x84e203){logger[_0x251f('0x2a')](_0x251f('0x32'));return BPromise[_0x251f('0x2d')]({'id':_0x84e203['name_value_list']['id'][_0x251f('0x29')],'name':_0x84e203[_0x251f('0x28')]['name'][_0x251f('0x29')],'phone':_0x84e203[_0x251f('0x28')][_0x251f('0x31')]['value']});}}else{logger[_0x251f('0x2a')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'form':{'method':_0x251f('0x33'),'input_type':_0x251f('0x18'),'response_type':_0x251f('0x18'),'rest_data':JSON[_0x251f('0x19')]({'session':_0x76e9f['id'],'module_name':_0x251f('0x2f'),'name_value_list':[{'name':_0x251f('0x34'),'value':_0x3825d2!==_0x251f('0x35')?_0x3825d2:util[_0x251f('0x1a')]('Caller\x20-\x20%s',_0x480739)},{'name':'phone_home','value':_0x480739}]})}})[_0x251f('0x24')](function(_0x29fc46){logger[_0x251f('0x2a')](_0x251f('0x36'));return BPromise['resolve']({'id':_0x29fc46['id'],'name':_0x29fc46['entry_list'][_0x251f('0x34')][_0x251f('0x29')],'phone':_0x29fc46['entry_list'][_0x251f('0x31')][_0x251f('0x29')]});});}});}function request(_0x51fd46){logger['debug'](_0x251f('0x37'),JSON['stringify'](_0x51fd46));return rp(_[_0x251f('0x38')](def,_0x51fd46));}function getTags(_0x30d38a,_0x23401a){var _0x1ba7f7=[];if(_0x30d38a&&_0x30d38a[_0x251f('0x26')]>0x0){_0x1ba7f7=_[_0x251f('0x39')](_0x30d38a,_0x23401a);}return _0x1ba7f7;}function getCustomFields(_0x7e9ca2,_0xeabbf7){var _0x133dfe=[];var _0x2f4099={'custom_fields':[]};if(_0x7e9ca2[_0x251f('0x26')]>0x0){_[_0x251f('0x16')](_0x7e9ca2,function(_0x296fc0){if(_0x296fc0[_0x251f('0x3a')]==='string'&&_0x296fc0[_0x251f('0x3b')]&&!_0x296fc0[_0x251f('0x3c')]){_0x2f4099[_0x296fc0[_0x251f('0x3b')][_0x251f('0x3d')]()]=_0x296fc0['content'][_0x251f('0x1d')]();}else if(_0x296fc0[_0x251f('0x3a')]===_0x251f('0x3e')&&_0x296fc0['idField']&&_0x296fc0[_0x251f('0x3c')]){_0x2f4099['custom_fields'][_0x251f('0x3f')]({'id':_0x296fc0['idField'],'value':_0x296fc0[_0x251f('0x40')]['toString']()});}else if(_0x296fc0[_0x251f('0x3a')]===_0x251f('0x41')&&_0x296fc0[_0x251f('0x17')]&&_0x296fc0[_0x251f('0x42')]&&_0x296fc0[_0x251f('0x3c')]){_0xeabbf7[_0x296fc0[_0x251f('0x17')]]&&_0x2f4099[_0x251f('0x43')][_0x251f('0x3f')]({'id':_0x296fc0[_0x251f('0x42')],'value':_0xeabbf7[_0x296fc0[_0x251f('0x17')]]['toString']()});}else if(_0x296fc0[_0x251f('0x3a')]===_0x251f('0x44')&&_0x296fc0[_0x251f('0x45')]&&_0x296fc0['Variable'][_0x251f('0xa')]&&_0x296fc0[_0x251f('0x42')]&&_0x296fc0[_0x251f('0x3c')]){_0xeabbf7[_0x296fc0[_0x251f('0x45')]['name']['toLowerCase']()]&&_0x2f4099[_0x251f('0x43')][_0x251f('0x3f')]({'id':_0x296fc0['idField'],'value':_0xeabbf7[_0x296fc0['Variable'][_0x251f('0xa')][_0x251f('0x3d')]()][_0x251f('0x1d')]()});}});}return _0x2f4099;}function getConnection(_0x2c7fa9){return request({'method':_0x251f('0x8'),'form':{'method':'login','input_type':_0x251f('0x18'),'response_type':_0x251f('0x18'),'rest_data':JSON['stringify']({'user_auth':{'user_name':_0x2c7fa9[_0x251f('0x46')],'password':_0x2c7fa9[_0x251f('0x47')],'encryption':'PLAIN'},'application':_0x251f('0x48')})}})[_0x251f('0x24')](function(_0x1b6a10){var _0x1e91e3=_0x1b6a10;if(_0x1e91e3['id']){def[_0x251f('0x49')]=_0x1e91e3['id'];return BPromise['resolve'](_0x1e91e3);}else{throw new Error(util[_0x251f('0x1a')]('Account\x20%d\x20is\x20not\x20valid',_0x2c7fa9['id']));}});}function setRelationship(_0xfd8cb8,_0x2df6f2,_0x836ced,_0x153559){return request({'form':{'method':_0x251f('0x4a'),'input_type':_0x251f('0x18'),'response_type':_0x251f('0x18'),'rest_data':JSON[_0x251f('0x19')]({'session':_0xfd8cb8['id'],'module_name':_0x251f('0x4b'),'module_id':_0x836ced['id'],'link_field_name':_0x153559,'related_ids':[_0x2df6f2['id']],'name_value_list':[],'delete':0x0})}});}exports[_0x251f('0x4c')]=function(_0x3b230e,_0x208bbb,_0x505d3e,_0x20c3d6,_0x4272eb,_0x248f70){var _0x1ded63,_0x49f587,_0xfc1feb,_0x40dd45;_0x248f70[_0x251f('0x4d')]=intUtil[_0x251f('0x4e')](_0x248f70[_0x251f('0x4d')]);_0x248f70[_0x251f('0x4f')]=intUtil['stripTrailingSlash'](_0x248f70['serverUrl']);def[_0x251f('0x50')]=util[_0x251f('0x1a')](_0x251f('0x51'),_0x248f70['remoteUri']);if(_0x4272eb&&_0x4272eb['monitor_format']){logger[_0x251f('0x2a')](_0x251f('0x52'),_0x251f('0x53'));_0x208bbb[_0x251f('0x54')]=util['format'](_0x251f('0x55'),_0x248f70['serverUrl'],_0x208bbb[_0x251f('0x56')],md5(_0x208bbb[_0x251f('0x56')]));}else{_0x208bbb[_0x251f('0x54')]='';}return getConnection(_0x248f70)[_0x251f('0x24')](function(_0x369a35){_0x40dd45=_0x369a35;return getUser(_0x248f70,_0x20c3d6[_0x251f('0xa')],_0x40dd45);})[_0x251f('0x24')](function(_0x35a68f){_0x1ded63=_0x35a68f;logger['info'](_0x251f('0x57'),_0x1ded63['id']);return getEndUser(_0x248f70,_0x208bbb[_0x251f('0x58')],_0x208bbb[_0x251f('0x59')],_0x40dd45);})[_0x251f('0x24')](function(_0x815566){_0x49f587=_0x815566;logger[_0x251f('0x2a')](_0x251f('0x5a'),_0x49f587['id']);return getTicket(_0x248f70,_0x1ded63,_0x49f587,_0x505d3e,_0x208bbb,_0x505d3e[_0x251f('0x5b')],_0x40dd45,_0x251f('0x5c'));})[_0x251f('0x24')](function(_0x4caddc){_0xfc1feb=_0x4caddc;logger['info'](_0x251f('0x5d'));logger[_0x251f('0x2a')](_0x251f('0x5e'),_0xfc1feb['id']);return setRelationship(_0x40dd45,_0x1ded63,_0xfc1feb,_0x251f('0x5f'));})[_0x251f('0x24')](function(){return setRelationship(_0x40dd45,_0x49f587,_0xfc1feb,_0x251f('0x60'));})[_0x251f('0x24')](function(){return getServerInfo(_0x40dd45);})[_0x251f('0x24')](function(_0x164ac5){var _0xfb6412=parseInt(_0x164ac5[_0x251f('0x61')][_0x251f('0x62')](0x0));var _0x207396=util['format'](_0x251f('0x63'),_0x248f70[_0x251f('0x4d')],_0xfc1feb['id']);if(_0xfb6412>0x6){_0x207396=util[_0x251f('0x1a')](_0x251f('0x64'),_0x248f70[_0x251f('0x4d')],_0xfc1feb['id']);}logger[_0x251f('0x2a')](_0x251f('0x52'),_0x251f('0x65'));emit(util['format'](_0x251f('0x66'),_0x20c3d6[_0x251f('0xa')]),'trigger:browser:url',{'uri':_0x207396});})[_0x251f('0x67')](function(_0x330574){logger[_0x251f('0x68')]('[QUEUE]',JSON[_0x251f('0x19')](_0x330574));});};exports['outbound']=function(_0xca473c,_0x28cd9f,_0x5bfbb7,_0x21978e,_0x47bef9,_0x285fc0,_0x1cf464){var _0x16b495,_0x53c99d,_0x1a9eb2,_0x38f376;_0x285fc0[_0x251f('0x4d')]=intUtil[_0x251f('0x4e')](_0x285fc0[_0x251f('0x4d')]);_0x285fc0[_0x251f('0x4f')]=intUtil['stripTrailingSlash'](_0x285fc0['serverUrl']);def[_0x251f('0x50')]=util['format']('%s/service/v4_1/rest.php',_0x285fc0[_0x251f('0x4d')]);if(_0x1cf464&&_0x1cf464[_0x251f('0x69')]&&_0x1cf464['recordingFormat']!==_0x251f('0x6a')){logger[_0x251f('0x2a')](_0x251f('0x6b'),_0x251f('0x53'));_0x28cd9f['recordingURL']=util[_0x251f('0x1a')](_0x251f('0x55'),_0x285fc0['serverUrl'],_0x28cd9f[_0x251f('0x56')],md5(_0x28cd9f[_0x251f('0x56')]));}return getConnection(_0x285fc0)['then'](function(_0x480eef){_0x38f376=_0x480eef;return getUser(_0x285fc0,_0x21978e[_0x251f('0xa')],_0x38f376);})[_0x251f('0x24')](function(_0x24c575){_0x16b495=_0x24c575;logger[_0x251f('0x2a')]('The\x20User\x20ID\x20is:',_0x16b495['id']);return getEndUser(_0x285fc0,_0x28cd9f[_0x251f('0x6c')],_0x28cd9f[_0x251f('0x6d')],_0x38f376);})['then'](function(_0x424504){_0x53c99d=_0x424504;logger[_0x251f('0x2a')](_0x251f('0x5a'),_0x53c99d['id']);return getTicket(_0x285fc0,_0x16b495,_0x53c99d,_0x5bfbb7,_0x28cd9f,_0x5bfbb7[_0x251f('0x5b')],_0x38f376,_0x251f('0x6e'));})[_0x251f('0x24')](function(_0x414264){_0x1a9eb2=_0x414264;logger[_0x251f('0x2a')](_0x251f('0x5d'));logger[_0x251f('0x2a')](_0x251f('0x5e'),_0x1a9eb2['id']);return setRelationship(_0x38f376,_0x16b495,_0x1a9eb2,_0x251f('0x5f'));})['then'](function(){return setRelationship(_0x38f376,_0x53c99d,_0x1a9eb2,'contacts');})[_0x251f('0x24')](function(){return getServerInfo(_0x38f376);})['then'](function(_0x5293d9){var _0x5b2496=parseInt(_0x5293d9['version'][_0x251f('0x62')](0x0));var _0xbbdc78=util[_0x251f('0x1a')]('%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s',_0x285fc0['remoteUri'],_0x1a9eb2['id']);if(_0x5b2496>0x6){_0xbbdc78=util[_0x251f('0x1a')](_0x251f('0x64'),_0x285fc0[_0x251f('0x4d')],_0x1a9eb2['id']);}logger[_0x251f('0x2a')](_0x251f('0x6b'),_0x251f('0x65'));emit(util['format'](_0x251f('0x66'),_0x21978e[_0x251f('0xa')]),'trigger:browser:url',{'uri':_0xbbdc78});})[_0x251f('0x67')](function(_0x179fbc){logger[_0x251f('0x68')](_0x251f('0x6b'),JSON[_0x251f('0x19')](_0x179fbc));});};exports['unmanaged']=function(_0x45eff5,_0x47ffd7,_0x3eac2b,_0x2ffdf9,_0x386eb0,_0x2a96bb){var _0x26a01e,_0x4d5336,_0xed1e3b,_0x4eaa95;_0x2a96bb[_0x251f('0x4d')]=intUtil['stripTrailingSlash'](_0x2a96bb[_0x251f('0x4d')]);_0x2a96bb[_0x251f('0x4f')]=intUtil[_0x251f('0x4e')](_0x2a96bb[_0x251f('0x4f')]);def[_0x251f('0x50')]=util[_0x251f('0x1a')]('%s/service/v4_1/rest.php',_0x2a96bb[_0x251f('0x4d')]);if(_0x386eb0&&_0x386eb0[_0x251f('0x6f')]){logger[_0x251f('0x2a')]('['+_0x47ffd7[_0x251f('0x70')][_0x251f('0x71')]()+']',_0x251f('0x53'));_0x47ffd7[_0x251f('0x54')]=util[_0x251f('0x1a')](_0x251f('0x55'),_0x2a96bb[_0x251f('0x4f')],_0x47ffd7[_0x251f('0x56')],md5(_0x47ffd7[_0x251f('0x56')]));}else{_0x47ffd7[_0x251f('0x54')]='';}return getConnection(_0x2a96bb)[_0x251f('0x24')](function(_0x10119a){_0x4eaa95=_0x10119a;if(!_['isNil'](_0x2ffdf9)){return getUser(_0x2a96bb,_0x2ffdf9[_0x251f('0xa')],_0x4eaa95);}else{return getUser(_0x2a96bb,null,_0x4eaa95);}})[_0x251f('0x24')](function(_0x423098){_0x26a01e=_0x423098;logger[_0x251f('0x2a')](_0x251f('0x57'),_0x26a01e['id']);return getEndUser(_0x2a96bb,_0x47ffd7['calleridname'],_0x47ffd7[_0x251f('0x59')],_0x4eaa95);})['then'](function(_0x1cb5bd){_0x4d5336=_0x1cb5bd;logger['info']('The\x20Enduser\x20ID\x20is:',_0x4d5336['id']);return getTicket(_0x2a96bb,_0x26a01e,_0x4d5336,_0x3eac2b,_0x47ffd7,_0x3eac2b[_0x251f('0x5b')],_0x4eaa95,'Inbound');})[_0x251f('0x24')](function(_0x501a82){_0xed1e3b=_0x501a82;logger[_0x251f('0x2a')](_0x251f('0x5d'));logger[_0x251f('0x2a')](_0x251f('0x5e'),_0xed1e3b['id']);return setRelationship(_0x4eaa95,_0x26a01e,_0xed1e3b,_0x251f('0x5f'));})[_0x251f('0x24')](function(){return setRelationship(_0x4eaa95,_0x4d5336,_0xed1e3b,'contacts');})[_0x251f('0x24')](function(){return getServerInfo(_0x4eaa95);})[_0x251f('0x67')](function(_0x822165){logger[_0x251f('0x68')]('['+_0x47ffd7['lastevent'][_0x251f('0x71')]()+']',JSON[_0x251f('0x19')](_0x822165));});};