Advertisement
Guest User

Untitled

a guest
Jan 19th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.92 KB | None | 0 0
  1. package MvnChatV2_Flash_10_3_fla
  2. {
  3. import flash.display.*;
  4. import flash.events.*;
  5. import flash.external.*;
  6. import flash.net.*;
  7. import flash.utils.*;
  8.  
  9. dynamic public class MainTimeline extends MovieClip
  10. {
  11. public var MvnSocket:XMLSocket;
  12. public var isReconnecting:Boolean;
  13. public var isConnected:Boolean;
  14. public var isJoined:Boolean;
  15. public var MvnServer:Object;
  16. public var MvnPort:Object;
  17. public var MvnUser:Object;
  18. public var MvnPass:Object;
  19. public var MvnChan:Object;
  20. public var MvnMask:Object;
  21. public var MvnLevel:Object;
  22. public var MvnColor:Object;
  23. public var MvnVip:Object;
  24. public var isGuest:Object;
  25. public var MvnReconnectCnt:int;
  26. public var MvnReconnectTimer:Timer;
  27. public var MvnQs:Object;
  28. public var mvnQs:Object;
  29. public var qsSplt:Object;
  30.  
  31. public function MainTimeline()
  32. {
  33. addFrameScript(0, this.frame1);
  34. return;
  35. }// end function
  36.  
  37. public function MvnSplit(param1:String, param2:String, param3:String)
  38. {
  39. var _loc_4:* = "";
  40. var _loc_5:* = "";
  41. var _loc_6:* = "";
  42. var _loc_7:* = "";
  43. try
  44. {
  45. _loc_4 = param3.split(param1);
  46. _loc_5 = _loc_4[1];
  47. _loc_6 = _loc_5.split(param2);
  48. _loc_7 = _loc_6[0];
  49. }
  50. catch (error)
  51. {
  52. }
  53. return _loc_7;
  54. }// end function
  55.  
  56. public function MvnExtCallback(param1:String, param2:String)
  57. {
  58. try
  59. {
  60. ExternalInterface.call(param1, param2).toString();
  61. }
  62. catch (error)
  63. {
  64. }
  65. return;
  66. }// end function
  67.  
  68. public function vtrace(param1:String)
  69. {
  70. trace("!! ==> VTraceChat: " + param1);
  71. ExternalInterface.call("console.log", "VTraceChat: " + param1);
  72. return;
  73. }// end function
  74.  
  75. public function Connect() : void
  76. {
  77. try
  78. {
  79. this.isConnected = true;
  80. this.vtrace(this.MvnServer + ":" + this.MvnPort);
  81. this.MvnSocket.connect(this.MvnServer, this.MvnPort);
  82. this.MvnSocket.addEventListener(Event.CONNECT, this.HandleMvnSocket);
  83. this.MvnSocket.addEventListener(Event.CLOSE, this.HandleMvnSocket);
  84. this.MvnSocket.addEventListener(IOErrorEvent.IO_ERROR, this.HandleMvnSocket);
  85. this.MvnSocket.addEventListener(DataEvent.DATA, this.HandleMvnData);
  86. this.MvnSocket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.HandleMvnSecurityError);
  87. this.MvnSocket.addEventListener(ProgressEvent.SOCKET_DATA, this.HandleMvnSocketData);
  88. }
  89. catch (error)
  90. {
  91. trace("Connect error: " + error);
  92. }
  93. return;
  94. }// end function
  95.  
  96. public function Send(param1:String) : void
  97. {
  98. var theData:* = param1;
  99. try
  100. {
  101. if (theData != "")
  102. {
  103. this.MvnSocket.send(theData + "\n\n\n\n");
  104. trace("SENT >> " + theData);
  105. }
  106. }
  107. catch (error)
  108. {
  109. trace("SEND ERROR >>> " + error);
  110. }
  111. return;
  112. }// end function
  113.  
  114. public function sendChat(param1:String)
  115. {
  116. this.Send("CHAT " + this.MvnChan + " :" + param1);
  117. ExternalInterface.call("ChatV2.Draw", this.MvnUser, this.MvnColor, this.MvnLevel, this.MvnVip, param1);
  118. return;
  119. }// end function
  120.  
  121. public function sendVaughnChat(param1:String)
  122. {
  123. this.Send("MVN VAUGHN <vn:" + this.MvnUser + ">" + param1 + "</vn>");
  124. ExternalInterface.call("ChatV2vaughn.Draw", this.MvnUser, this.MvnColor, param1);
  125. return;
  126. }// end function
  127.  
  128. public function doViewBans()
  129. {
  130. this.Send("MVN BANS " + this.MvnChan);
  131. return;
  132. }// end function
  133.  
  134. public function doViewMods()
  135. {
  136. this.Send("MVN MODS " + this.MvnChan);
  137. return;
  138. }// end function
  139.  
  140. public function doUnbanall()
  141. {
  142. this.Send("MVN UNBANALL " + this.MvnChan);
  143. return;
  144. }// end function
  145.  
  146. public function doUnmodall()
  147. {
  148. this.Send("MVN UNMODALL " + this.MvnChan);
  149. return;
  150. }// end function
  151.  
  152. public function doRandom()
  153. {
  154. this.Send("MVN RANDOM " + this.MvnChan);
  155. return;
  156. }// end function
  157.  
  158. public function doGuestOn()
  159. {
  160. this.Send("MVN GUESTON " + this.MvnChan);
  161. return;
  162. }// end function
  163.  
  164. public function doGuestOff()
  165. {
  166. this.Send("MVN GUESTOFF " + this.MvnChan);
  167. return;
  168. }// end function
  169.  
  170. public function doInvite()
  171. {
  172. this.Send("MVN INVITE " + this.MvnChan);
  173. return;
  174. }// end function
  175.  
  176. public function doInviteCohost(param1)
  177. {
  178. this.Send("MVN COHOST " + this.MvnChan + " " + param1);
  179. return;
  180. }// end function
  181.  
  182. public function doMod(param1)
  183. {
  184. this.Send("MVN MOD " + this.MvnChan + " " + param1);
  185. return;
  186. }// end function
  187.  
  188. public function doUnmod(param1)
  189. {
  190. this.Send("MVN UNMOD " + this.MvnChan + " " + param1);
  191. return;
  192. }// end function
  193.  
  194. public function doRegular(param1)
  195. {
  196. this.Send("MVN REGULAR " + this.MvnChan + " " + param1);
  197. return;
  198. }// end function
  199.  
  200. public function doUnregular(param1)
  201. {
  202. this.Send("MVN UNREGULAR " + this.MvnChan + " " + param1);
  203. return;
  204. }// end function
  205.  
  206. public function doDrop(param1)
  207. {
  208. this.Send("MVN DROP " + param1);
  209. return;
  210. }// end function
  211.  
  212. public function doGlobalBan(param1)
  213. {
  214. this.Send("MVN GBAN " + param1);
  215. return;
  216. }// end function
  217.  
  218. public function doGlobalMute(param1)
  219. {
  220. this.Send("MVN GMUTE " + param1);
  221. return;
  222. }// end function
  223.  
  224. public function doPermBan(param1)
  225. {
  226. this.Send("MVN PBAN " + param1);
  227. return;
  228. }// end function
  229.  
  230. public function delGlobalBan(param1)
  231. {
  232. this.Send("MVN DELGBAN " + param1);
  233. return;
  234. }// end function
  235.  
  236. public function delGlobalMute(param1)
  237. {
  238. this.Send("MVN DELGMUTE " + param1);
  239. return;
  240. }// end function
  241.  
  242. public function delPermBan(param1)
  243. {
  244. this.Send("MVN DELPBAN " + param1);
  245. return;
  246. }// end function
  247.  
  248. public function doSlowMode()
  249. {
  250. this.Send("MVN SLOWON " + this.MvnChan);
  251. return;
  252. }// end function
  253.  
  254. public function doSlowModeOff()
  255. {
  256. this.Send("MVN SLOWOFF " + this.MvnChan);
  257. return;
  258. }// end function
  259.  
  260. public function doActMode()
  261. {
  262. this.Send("MVN ACTON " + this.MvnChan);
  263. return;
  264. }// end function
  265.  
  266. public function doActModeOff()
  267. {
  268. this.Send("MVN ACTOFF " + this.MvnChan);
  269. return;
  270. }// end function
  271.  
  272. public function doGlobalMessage(param1)
  273. {
  274. this.Send("MVN GLOBAL " + param1);
  275. return;
  276. }// end function
  277.  
  278. public function doGlobalMessageVL(param1)
  279. {
  280. this.Send("MVN GLOBALVL " + param1);
  281. return;
  282. }// end function
  283.  
  284. public function doGlobalMessageBTV(param1)
  285. {
  286. this.Send("MVN GLOBALBTV " + param1);
  287. return;
  288. }// end function
  289.  
  290. public function doGlobalMessageIGB(param1)
  291. {
  292. this.Send("MVN GLOBALIGB " + param1);
  293. return;
  294. }// end function
  295.  
  296. public function doBan(param1)
  297. {
  298. this.Send("MVN BAN " + this.MvnChan + " " + param1);
  299. return;
  300. }// end function
  301.  
  302. public function doMute(param1)
  303. {
  304. this.Send("MVN MUTE " + this.MvnChan + " " + param1);
  305. return;
  306. }// end function
  307.  
  308. public function doKick(param1)
  309. {
  310. this.Send("MVN KICK " + this.MvnChan + " " + param1);
  311. return;
  312. }// end function
  313.  
  314. public function doPurge(param1)
  315. {
  316. this.Send("MVN PURGE " + this.MvnChan + " " + param1);
  317. return;
  318. }// end function
  319.  
  320. public function doUnban(param1)
  321. {
  322. this.Send("MVN UNBAN " + this.MvnChan + " " + param1);
  323. return;
  324. }// end function
  325.  
  326. public function doUnmute(param1)
  327. {
  328. this.Send("MVN UNMUTE " + this.MvnChan + " " + param1);
  329. return;
  330. }// end function
  331.  
  332. public function doClear()
  333. {
  334. this.Send("MVN CLEAR " + this.MvnChan);
  335. return;
  336. }// end function
  337.  
  338. public function doChatters()
  339. {
  340. this.Send("MVN CHATTERS " + this.MvnChan);
  341. return;
  342. }// end function
  343.  
  344. public function doColor(param1)
  345. {
  346. this.MvnColor = param1;
  347. this.Send("MVN COLOR " + param1);
  348. return;
  349. }// end function
  350.  
  351. public function SendIM(param1:String, param2:String)
  352. {
  353. this.Send("MVN IM <vn:" + param1 + ">" + param2 + "</vn>");
  354. return;
  355. }// end function
  356.  
  357. public function imOn()
  358. {
  359. this.Send("MVN IMSTATUS <vn:" + this.MvnMask + ">1</vn>");
  360. return;
  361. }// end function
  362.  
  363. public function imOff()
  364. {
  365. this.Send("MVN IMSTATUS <vn:" + this.MvnMask + ">0</vn>");
  366. return;
  367. }// end function
  368.  
  369. public function doUserLevel(param1)
  370. {
  371. this.MvnLevel = param1;
  372. return;
  373. }// end function
  374.  
  375. public function doUserVip(param1)
  376. {
  377. this.MvnVip = param1;
  378. return;
  379. }// end function
  380.  
  381. public function getServer(param1:String)
  382. {
  383. var chatServers:*;
  384. var user_char_1:*;
  385. var chanLength:*;
  386. var user_char_2:*;
  387. var serversLength:*;
  388. var chanName:* = param1;
  389. if (chanName == "#vl-vtest")
  390. {
  391. return "localhost";
  392. }
  393. try
  394. {
  395. chatServers;
  396. user_char_1 = chanName.charCodeAt(0);
  397. chanLength = (chanName.length - 1);
  398. user_char_2 = chanName.charCodeAt(chanLength);
  399. serversLength = chatServers.length;
  400. return chatServers[(user_char_1 + user_char_2) % serversLength];
  401. }
  402. catch (e)
  403. {
  404. return "error";
  405. }
  406. return;
  407. }// end function
  408.  
  409. public function getColor(param1:String)
  410. {
  411. var user_colors:*;
  412. var user_char_1:*;
  413. var username_length:*;
  414. var user_char_2:*;
  415. var colors_length:*;
  416. var username:* = param1;
  417. try
  418. {
  419. user_colors;
  420. user_char_1 = username.charCodeAt(0);
  421. username_length = (username.length - 1);
  422. user_char_2 = username.charCodeAt(username_length);
  423. colors_length = user_colors.length;
  424. return user_colors[(user_char_1 + user_char_2) % colors_length];
  425. }
  426. catch (e)
  427. {
  428. return "Black";
  429. }
  430. return;
  431. }// end function
  432.  
  433. public function HandleMvnSocket(param1) : void
  434. {
  435. var Event:* = param1;
  436. try
  437. {
  438. switch(Event.type)
  439. {
  440. case "ioError":
  441. {
  442. this.vtrace("ioError");
  443. this.noticeDisconnect();
  444. this.isJoined = false;
  445. break;
  446. }
  447. case "connect":
  448. {
  449. this.isJoined = false;
  450. if (this.isGuest)
  451. {
  452. this.Send("MVN AUTH guest guest");
  453. }
  454. else
  455. {
  456. this.Send("MVN AUTH " + this.MvnUser + " " + this.MvnPass);
  457. }
  458. this.isConnected = true;
  459. this.MvnReconnectTimer.stop();
  460. this.MvnReconnectCnt = 1;
  461. if (this.isReconnecting)
  462. {
  463. trace("Already Reconnecting");
  464. }
  465. this.isReconnecting = false;
  466. break;
  467. }
  468. case "close":
  469. {
  470. this.vtrace("Disconnected");
  471. this.isJoined = false;
  472. this.isConnected = false;
  473. if (!this.isReconnecting)
  474. {
  475. this.Reconnect();
  476. }
  477. this.isReconnecting = true;
  478. this.noticeDisconnect();
  479. break;
  480. }
  481. default:
  482. {
  483. this.vtrace("Socket Error: " + Event.type);
  484. this.isJoined = false;
  485. this.noticeDisconnect();
  486. break;
  487. break;
  488. }
  489. }
  490. }
  491. catch (error)
  492. {
  493. vtrace("HandleSocket error: " + error);
  494. }
  495. return;
  496. }// end function
  497.  
  498. public function HandleMvnData(param1:String) : void
  499. {
  500. var _loc_4:* = undefined;
  501. var _loc_5:* = undefined;
  502. var _loc_6:* = undefined;
  503. var _loc_7:* = undefined;
  504. var _loc_8:* = undefined;
  505. var _loc_9:* = undefined;
  506. var _loc_10:* = undefined;
  507. var _loc_11:* = null;
  508. var _loc_12:* = null;
  509. var _loc_13:* = null;
  510. var _loc_14:* = null;
  511. var _loc_15:* = null;
  512. var _loc_16:* = null;
  513. var _loc_17:* = undefined;
  514. var _loc_18:* = undefined;
  515. var _loc_19:* = undefined;
  516. var _loc_20:* = undefined;
  517. var _loc_21:* = undefined;
  518. var _loc_22:* = undefined;
  519. var _loc_23:* = undefined;
  520. var _loc_24:* = undefined;
  521. var _loc_25:* = undefined;
  522. var _loc_26:* = undefined;
  523. var _loc_27:* = undefined;
  524. var _loc_28:* = undefined;
  525. var _loc_29:* = undefined;
  526. var _loc_30:* = undefined;
  527. var _loc_31:* = undefined;
  528. var _loc_32:* = undefined;
  529. var _loc_33:* = undefined;
  530. var _loc_34:* = undefined;
  531. var _loc_35:* = undefined;
  532. var _loc_36:* = undefined;
  533. var _loc_37:* = undefined;
  534. var _loc_38:* = undefined;
  535. var _loc_39:* = undefined;
  536. var _loc_40:* = undefined;
  537. var _loc_41:* = undefined;
  538. var _loc_42:* = undefined;
  539. var _loc_43:* = null;
  540. var _loc_44:* = null;
  541. var _loc_45:* = undefined;
  542. var _loc_46:* = undefined;
  543. var _loc_47:* = undefined;
  544. var _loc_48:* = undefined;
  545. var _loc_49:* = undefined;
  546. var _loc_50:* = undefined;
  547. param1 = this.MvnSplit("data=\"", "\"]", param1);
  548. var _loc_2:* = param1.split("\n");
  549. var _loc_3:* = 0;
  550. while (_loc_3 <= (_loc_2.length - 1))
  551. {
  552.  
  553. _loc_4 = _loc_2[_loc_3];
  554. if (_loc_4 != "")
  555. {
  556. this.vtrace("RECV << " + _loc_4);
  557. try
  558. {
  559. _loc_5 = _loc_4.split(" ");
  560. _loc_6 = _loc_5[0];
  561. _loc_7 = _loc_5[1];
  562. if (_loc_6 == "MVN")
  563. {
  564. _loc_8 = _loc_5[2];
  565. _loc_9 = _loc_5[3];
  566. _loc_10 = "";
  567. try
  568. {
  569. _loc_10 = _loc_5[4];
  570. }
  571. catch (e)
  572. {
  573. }
  574. if (_loc_7 == "BAN")
  575. {
  576. this.noticeStatus(_loc_10 + " banned " + _loc_9);
  577. this.ExtBan(_loc_9);
  578. this.ExtPurge(_loc_9);
  579. }
  580. else if (_loc_7 == "UNBAN")
  581. {
  582. this.noticeStatus(_loc_10 + " unbanned " + _loc_9);
  583. }
  584. else if (_loc_7 == "MUTE")
  585. {
  586. this.noticeStatus(_loc_10 + " muted " + _loc_9);
  587. this.ExtPurge(_loc_9);
  588. }
  589. else if (_loc_7 == "UNMUTE")
  590. {
  591. this.noticeStatus(_loc_10 + " unmuted " + _loc_9);
  592. }
  593. else if (_loc_7 == "MOD")
  594. {
  595. this.noticeStatus(_loc_10 + " gave Mod status to " + _loc_9);
  596. this.ExtDoMod(_loc_9, "black");
  597. }
  598. else if (_loc_7 == "UNMOD")
  599. {
  600. this.noticeStatus(_loc_10 + " took Mod status from " + _loc_9);
  601. this.ExtDoUnMod(_loc_9);
  602. }
  603. else if (_loc_7 == "REGULAR")
  604. {
  605. this.noticeStatus(_loc_10 + " gave Regular status to " + _loc_9);
  606. this.ExtDoRegular(_loc_9);
  607. }
  608. else if (_loc_7 == "UNREGULAR")
  609. {
  610. this.noticeStatus(_loc_10 + " took Regular status from " + _loc_9);
  611. this.ExtDoUnRegular(_loc_9);
  612. }
  613. else if (_loc_7 == "KICK")
  614. {
  615. this.noticeStatus(_loc_10 + " kicked " + _loc_9 + " from chat");
  616. this.ExtPurge(_loc_9);
  617. }
  618. else if (_loc_7 == "PURGE")
  619. {
  620. this.noticeStatus(_loc_10 + " purged " + _loc_9);
  621. this.ExtPurge(_loc_9);
  622. }
  623. else if (_loc_7 == "PBAN")
  624. {
  625. this.noticeStatus(_loc_8 + " permanently banned " + _loc_9 + " from chat");
  626. }
  627. else if (_loc_7 == "GMUTE")
  628. {
  629. this.noticeStatus(_loc_8 + " globally muted " + _loc_9 + " in chat");
  630. }
  631. else if (_loc_7 == "GBAN")
  632. {
  633. this.noticeStatus(_loc_8 + " globally banned " + _loc_9 + " from chat");
  634. }
  635. else if (_loc_7 == "DELPBAN")
  636. {
  637. this.noticeStatus(_loc_8 + " lifted permanent ban on " + _loc_9 + " from chat");
  638. }
  639. else if (_loc_7 == "DELGMUTE")
  640. {
  641. this.noticeStatus(_loc_8 + " lifted global mute on " + _loc_9 + " in chat");
  642. }
  643. else if (_loc_7 == "DELGBAN")
  644. {
  645. this.noticeStatus(_loc_8 + " lifted global ban on " + _loc_9 + " from chat");
  646. }
  647. else if (_loc_7 == "CLEAR")
  648. {
  649. this.ExtClear();
  650. this.noticeStatus("Chat cleared by " + _loc_9);
  651. }
  652. else if (_loc_7 == "GLOBAL")
  653. {
  654. _loc_11 = this.MvnSplit("MVN GLOBAL ", "<EOF>", _loc_4 + "<EOF>");
  655. trace("GLOBAL MESSAGE: " + _loc_11);
  656. trace("INC: " + _loc_4);
  657. this.ExtGlobal(_loc_11);
  658. }
  659. else if (_loc_7 == "GLOBALVL")
  660. {
  661. _loc_12 = this.MvnSplit("MVN GLOBALVL ", "<EOF>", _loc_4 + "<EOF>");
  662. trace("GLOBAL MESSAGE: " + _loc_12);
  663. trace("INC: " + _loc_4);
  664. this.ExtGlobalVL(_loc_12);
  665. }
  666. else if (_loc_7 == "GLOBALBTV")
  667. {
  668. _loc_13 = this.MvnSplit("MVN GLOBALBTV ", "<EOF>", _loc_4 + "<EOF>");
  669. trace("GLOBAL MESSAGE: " + _loc_13);
  670. trace("INC: " + _loc_4);
  671. this.ExtGlobalBTV(_loc_13);
  672. }
  673. else if (_loc_7 == "GLOBALIGB")
  674. {
  675. _loc_14 = this.MvnSplit("MVN GLOBALIGB ", "<EOF>", _loc_4 + "<EOF>");
  676. trace("GLOBAL MESSAGE: " + _loc_14);
  677. trace("INC: " + _loc_4);
  678. this.ExtGlobalIGB(_loc_14);
  679. }
  680. else if (_loc_7 == "NOTICE")
  681. {
  682. _loc_15 = this.MvnSplit("MVN NOTICE ", "<EOF>", _loc_4 + "<EOF>");
  683. this.noticeStatus(_loc_15);
  684. }
  685. else if (_loc_7 == "INVITE")
  686. {
  687. _loc_16 = this.MvnSplit("MVN INVITE ", "<EOF>", _loc_4 + "<EOF>");
  688. this.noticeInvite(_loc_16);
  689. }
  690. else if (_loc_7 == "GUESTON")
  691. {
  692. this.ExtGuestOn();
  693. }
  694. else if (_loc_7 == "GUESTOFF")
  695. {
  696. this.ExtGuestOff();
  697. }
  698. else if (_loc_7 == "COHOST")
  699. {
  700. this.ExtCohostInvite(_loc_8, _loc_9);
  701. }
  702. else if (_loc_7 == "SLOWON")
  703. {
  704. this.ExtSlowOn();
  705. }
  706. else if (_loc_7 == "SLOWOFF")
  707. {
  708. this.ExtSlowOff();
  709. }
  710. else if (_loc_7 == "ACTON")
  711. {
  712. this.ExtActOn();
  713. }
  714. else if (_loc_7 == "ACTOFF")
  715. {
  716. this.ExtActOff();
  717. }
  718. else if (_loc_7 == "CHATTERS")
  719. {
  720. _loc_17 = _loc_9.split(",");
  721. if (_loc_8 != "")
  722. {
  723. _loc_18 = 0;
  724. while (_loc_18 <= (_loc_17.length - 1))
  725. {
  726.  
  727. _loc_19 = _loc_17[_loc_18];
  728. if (_loc_19 != "")
  729. {
  730. _loc_20 = _loc_19.split(";");
  731. _loc_21 = _loc_20[0];
  732. _loc_22 = _loc_20[1];
  733. _loc_23 = _loc_20[2];
  734. _loc_24 = _loc_20[3];
  735. if (_loc_22 == "" || _loc_22 == undefined)
  736. {
  737. _loc_22 = this.getColor(_loc_21);
  738. }
  739. this.vtrace(_loc_21 + ": " + _loc_22 + " = " + _loc_23);
  740. this.drawChatter(_loc_21, _loc_22, _loc_23, _loc_24);
  741. }
  742. _loc_18 = _loc_18 + 1;
  743. }
  744. }
  745. }
  746. else if (_loc_7 == "CHATTERSEND")
  747. {
  748. this.ExtChattersLoaded();
  749. }
  750. else if (_loc_7 == "CLOSE")
  751. {
  752. this.ExtRefresh();
  753. }
  754. else if (_loc_7 == "DMCA")
  755. {
  756. this.ExtRefresh();
  757. }
  758. else if (_loc_7 == "SUB")
  759. {
  760. this.ExtSubscriber(_loc_9);
  761. }
  762. else if (_loc_7 == "FOLLOW")
  763. {
  764. this.ExtFollow(_loc_9);
  765. }
  766. else if (_loc_7 == "DONATE")
  767. {
  768. this.ExtDonate(_loc_9, "9.00 USD", "Something something Marvin something something Spago");
  769. }
  770. else if (_loc_7 == "COMMERCIAL")
  771. {
  772. }
  773. else if (_loc_7 == "IPBAN")
  774. {
  775. this.ExtRefresh();
  776. }
  777. else if (_loc_7 == "SLOWNOTICE")
  778. {
  779. this.noticeStatus("Slow Mode is Enabled: Wait before you type again");
  780. }
  781. else if (_loc_7 == "TOOFAST")
  782. {
  783. this.noticeStatus("Whoa! Slow your role, breh.");
  784. }
  785. else if (_loc_7 == "VAUGHN")
  786. {
  787. _loc_25 = this.MvnSplit("<vn:", ">", _loc_4);
  788. _loc_26 = this.MvnSplit("<vn:" + _loc_25 + ">", "</vn>", _loc_4);
  789. if (_loc_26 == "")
  790. {
  791. _loc_26 = this.MvnSplit("<vn:" + _loc_25.toLowerCase() + ">", "</vn>", _loc_4);
  792. }
  793. this.ExtVaughn("vaughn", "", _loc_26);
  794. }
  795. else if (_loc_7 == "IM")
  796. {
  797. _loc_27 = this.MvnSplit("<vn:", ">", _loc_4);
  798. _loc_28 = this.MvnSplit("<vn:" + _loc_27 + ">", "</vn>", _loc_4);
  799. if (_loc_28 == "")
  800. {
  801. _loc_28 = this.MvnSplit("<vn:" + _loc_27.toLowerCase() + ">", "</vn>", _loc_4);
  802. }
  803. this.ExtIM(_loc_27, _loc_28);
  804. }
  805. else if (_loc_7 == "IMSTATUS")
  806. {
  807. _loc_29 = this.MvnSplit("<vn:", ">", _loc_4);
  808. _loc_30 = this.MvnSplit("<vn:" + _loc_29 + ">", "</vn>", _loc_4);
  809. if (_loc_30 == 0)
  810. {
  811. this.ExtIMstatusOff();
  812. }
  813. else if (_loc_30 == 1)
  814. {
  815. this.ExtIMstatusOn();
  816. }
  817. }
  818. else if (_loc_7 == "IMERROR")
  819. {
  820. _loc_31 = this.MvnSplit("<vn:", ">", _loc_4);
  821. _loc_32 = this.MvnSplit("<vn:" + _loc_31 + ">", "</vn>", _loc_4);
  822. if (_loc_31 == "IMOFF")
  823. {
  824. this.ExtIMnotice(_loc_32, _loc_32 + " has IM\'s turned off!");
  825. }
  826. else if (_loc_31 == "TYPETOOFAST")
  827. {
  828. this.ExtIMnotice(_loc_32, "You\'re typing too fast!");
  829. }
  830. }
  831. }
  832. else if (_loc_6 == "ACK")
  833. {
  834. this.Send("JOIN " + this.MvnChan);
  835. this.Connected(this.MvnUser);
  836. }
  837. else if (_loc_4 == "PING")
  838. {
  839. this.Send("PONG");
  840. }
  841. else
  842. {
  843. _loc_33 = _loc_4.split(" ");
  844. _loc_34 = _loc_33[0];
  845. _loc_35 = _loc_34.split(";");
  846. _loc_36 = _loc_35[0];
  847. _loc_37 = _loc_35[1];
  848. _loc_38 = _loc_35[2];
  849. _loc_39 = _loc_35[3];
  850. _loc_40 = _loc_33[1];
  851. _loc_41 = _loc_33[2];
  852. _loc_42 = _loc_33[3];
  853. if (_loc_37 == -2)
  854. {
  855. _loc_37 = this.getColor(_loc_36);
  856. }
  857. if (_loc_40 == "CHAT")
  858. {
  859. _loc_43 = this.MvnSplit(_loc_41 + " :", "<EOF>", _loc_4 + "<EOF>");
  860. this.DrawChat(_loc_36, _loc_37, _loc_38, _loc_39, _loc_43);
  861. }
  862. else if (_loc_40 == "HISTORY")
  863. {
  864. _loc_44 = this.MvnSplit(_loc_42 + " :", "<EOF>", _loc_4 + "<EOF>");
  865. this.DrawHistory(_loc_36, _loc_37, _loc_38, _loc_39, _loc_41, _loc_44);
  866. }
  867. else if (_loc_40 == "JOIN")
  868. {
  869. _loc_45 = _loc_42.split(";");
  870. _loc_46 = _loc_45[0];
  871. _loc_47 = _loc_45[1];
  872. _loc_48 = _loc_45[2];
  873. this.drawChatter(_loc_36, _loc_37, _loc_38, _loc_39);
  874. if (_loc_36.toLowerCase() == this.MvnUser.toLowerCase())
  875. {
  876. this.MvnUser = _loc_36;
  877. this.MvnColor = _loc_37;
  878. this.MvnLevel = _loc_38;
  879. this.MvnVip = _loc_39;
  880. if (!this.isJoined)
  881. {
  882. this.isJoined = true;
  883. this.ExtLoaded(_loc_36, _loc_37, _loc_38, this.MvnChan);
  884. if (_loc_46 == 1)
  885. {
  886. this.ExtGuestOn();
  887. }
  888. if (_loc_47 == 1)
  889. {
  890. this.ExtSlowOn();
  891. }
  892. if (_loc_48 == 1)
  893. {
  894. this.ExtActOn();
  895. }
  896. }
  897. }
  898. else if (this.MvnUser == "guest")
  899. {
  900. this.MvnUser = _loc_36;
  901. this.MvnColor = _loc_37;
  902. this.MvnLevel = _loc_38;
  903. this.isGuest = true;
  904. if (!this.isJoined)
  905. {
  906. this.isJoined = true;
  907. this.ExtLoaded(_loc_36, _loc_37, _loc_38, this.MvnChan);
  908. if (_loc_46 == 1)
  909. {
  910. this.ExtGuestOn();
  911. }
  912. if (_loc_47 == 1)
  913. {
  914. this.ExtSlowOn();
  915. }
  916. if (_loc_48 == 1)
  917. {
  918. this.ExtActOn();
  919. }
  920. }
  921. }
  922. }
  923. else if (_loc_40 == "PART")
  924. {
  925. _loc_49 = _loc_41.split(":");
  926. _loc_50 = _loc_49[1];
  927. this.eraseChatter(_loc_36, _loc_38, _loc_39);
  928. }
  929. }
  930. }
  931. catch (e)
  932. {
  933. }
  934. }
  935. ;
  936. var _loc_51:* = new catch2;
  937. e;
  938. _loc_3 = _loc_3 + 1;
  939. }
  940. return;
  941. }// end function
  942.  
  943. public function HandleMvnSocketData(event:ProgressEvent) : void
  944. {
  945. trace("socketDataHandler: " + event);
  946. return;
  947. }// end function
  948.  
  949. public function HandleMvnSecurityError(event:SecurityErrorEvent) : void
  950. {
  951. this.vtrace("securityErrorHandler: " + event);
  952. this.isConnected = false;
  953. if (!this.isReconnecting)
  954. {
  955. this.Reconnect();
  956. }
  957. this.isReconnecting = true;
  958. return;
  959. }// end function
  960.  
  961. public function Reconnect() : void
  962. {
  963. this.MvnReconnectTimer.addEventListener(TimerEvent.TIMER, this.doReconnect);
  964. this.MvnReconnectTimer.start();
  965. return;
  966. }// end function
  967.  
  968. public function doReconnect(event:TimerEvent) : void
  969. {
  970. if (!this.isConnected)
  971. {
  972. this.noticeStatus("Reconnect Attempt #" + this.MvnReconnectCnt);
  973. this.Connect();
  974. var _loc_2:* = this;
  975. var _loc_3:* = this.MvnReconnectCnt + 1;
  976. _loc_2.MvnReconnectCnt = _loc_3;
  977. }
  978. return;
  979. }// end function
  980.  
  981. public function Connected(param1:String)
  982. {
  983. ExternalInterface.call("ChatV2.Connected", param1);
  984. return;
  985. }// end function
  986.  
  987. public function DrawChat(param1, param2, param3, param4, param5)
  988. {
  989. if (param2 == "" || param2 == undefined)
  990. {
  991. param2 = this.getColor(param1);
  992. }
  993. ExternalInterface.call("ChatV2.Draw", param1, param2, param3, param4, param5);
  994. return;
  995. }// end function
  996.  
  997. public function DrawHistory(param1, param2, param3, param4, param5, param6)
  998. {
  999. if (param2 == "" || param2 == undefined)
  1000. {
  1001. param2 = this.getColor(param1);
  1002. }
  1003. ExternalInterface.call("ChatV2.Draw", param1, param2, param3, param4, param6, param5);
  1004. return;
  1005. }// end function
  1006.  
  1007. public function drawChatter(param1:String, param2:String, param3:String, param4:String)
  1008. {
  1009. ExternalInterface.call("ChatV2.DrawChatter", param1, param2, param3, param4);
  1010. return;
  1011. }// end function
  1012.  
  1013. public function eraseChatter(param1:String, param2:String, param3:String)
  1014. {
  1015. ExternalInterface.call("ChatV2.EraseChatter", param1, param2, param3);
  1016. return;
  1017. }// end function
  1018.  
  1019. public function noticeDisconnect()
  1020. {
  1021. ExternalInterface.call("ChatV2.Disconnected");
  1022. return;
  1023. }// end function
  1024.  
  1025. public function noticeWarning(param1)
  1026. {
  1027. ExternalInterface.call("ChatV2.Warning", param1);
  1028. return;
  1029. }// end function
  1030.  
  1031. public function noticeStatus(param1)
  1032. {
  1033. ExternalInterface.call("ChatV2.Status", param1);
  1034. return;
  1035. }// end function
  1036.  
  1037. public function noticeInvite(param1)
  1038. {
  1039. ExternalInterface.call("ChatV2.Notice", param1);
  1040. return;
  1041. }// end function
  1042.  
  1043. public function ExtIM(param1:String, param2:String)
  1044. {
  1045. ExternalInterface.call("doMvnIM.mvnIM", param1, param2, param1);
  1046. return;
  1047. }// end function
  1048.  
  1049. public function ExtIMstatusOn()
  1050. {
  1051. ExternalInterface.call("doMvnIM.MvnIMstatusOn");
  1052. return;
  1053. }// end function
  1054.  
  1055. public function ExtIMstatusOff()
  1056. {
  1057. ExternalInterface.call("doMvnIM.MvnIMstatusOff");
  1058. return;
  1059. }// end function
  1060.  
  1061. public function ExtIMnotice(param1:String, param2:String)
  1062. {
  1063. ExternalInterface.call("doMvnIM.MvnIMnotice", param2, param1);
  1064. return;
  1065. }// end function
  1066.  
  1067. public function ExtPurge(param1:String)
  1068. {
  1069. ExternalInterface.call("ChatV2.Purge", param1);
  1070. return;
  1071. }// end function
  1072.  
  1073. public function ExtBan(param1:String)
  1074. {
  1075. ExternalInterface.call("ChatV2.BanChatter", param1);
  1076. return;
  1077. }// end function
  1078.  
  1079. public function ExtClear()
  1080. {
  1081. ExternalInterface.call("ChatV2.Clear");
  1082. return;
  1083. }// end function
  1084.  
  1085. public function ExtLoaded(param1:String, param2:String, param3:String, param4:String)
  1086. {
  1087. ExternalInterface.call("ChatV2.Loaded", param1, param2, param3, param4);
  1088. return;
  1089. }// end function
  1090.  
  1091. public function ExtChattersLoaded()
  1092. {
  1093. ExternalInterface.call("ChatV2options.loadedChatters");
  1094. return;
  1095. }// end function
  1096.  
  1097. public function ExtGlobal(param1:String)
  1098. {
  1099. ExternalInterface.call("ChatV2.drawGlobal", param1);
  1100. return;
  1101. }// end function
  1102.  
  1103. public function ExtGlobalVL(param1:String)
  1104. {
  1105. ExternalInterface.call("ChatV2.drawGlobalVL", param1);
  1106. return;
  1107. }// end function
  1108.  
  1109. public function ExtGlobalBTV(param1:String)
  1110. {
  1111. ExternalInterface.call("ChatV2.drawGlobalBTV", param1);
  1112. return;
  1113. }// end function
  1114.  
  1115. public function ExtGlobalIGB(param1:String)
  1116. {
  1117. ExternalInterface.call("ChatV2.drawGlobalIGB", param1);
  1118. return;
  1119. }// end function
  1120.  
  1121. public function ExtDoMod(param1:String, param2:String)
  1122. {
  1123. ExternalInterface.call("ChatV2.ChatterMod", param1, param2);
  1124. return;
  1125. }// end function
  1126.  
  1127. public function ExtDoUnMod(param1:String)
  1128. {
  1129. ExternalInterface.call("ChatV2.ChatterUnmod", param1);
  1130. return;
  1131. }// end function
  1132.  
  1133. public function ExtDoRegular(param1:String)
  1134. {
  1135. ExternalInterface.call("ChatV2.ChatterRegular", param1);
  1136. return;
  1137. }// end function
  1138.  
  1139. public function ExtDoUnRegular(param1:String)
  1140. {
  1141. ExternalInterface.call("ChatV2.ChatterUnregular", param1);
  1142. return;
  1143. }// end function
  1144.  
  1145. public function ExtSubscriber(param1:String)
  1146. {
  1147. ExternalInterface.call("ChatV2.newSubscriber", param1);
  1148. return;
  1149. }// end function
  1150.  
  1151. public function ExtFollow(param1:String)
  1152. {
  1153. ExternalInterface.call("ChatV2.newFollow", param1);
  1154. return;
  1155. }// end function
  1156.  
  1157. public function ExtDonate(param1:String, param2:String, param3:String)
  1158. {
  1159. ExternalInterface.call("ChatV2.newDonation", param1, param2, param3);
  1160. return;
  1161. }// end function
  1162.  
  1163. public function ExtGuestOn()
  1164. {
  1165. ExternalInterface.call("ChatV2.setGuestOn");
  1166. return;
  1167. }// end function
  1168.  
  1169. public function ExtGuestOff()
  1170. {
  1171. ExternalInterface.call("ChatV2.setGuestOff");
  1172. return;
  1173. }// end function
  1174.  
  1175. public function ExtSlowOn()
  1176. {
  1177. ExternalInterface.call("ChatV2.setSlowOn");
  1178. return;
  1179. }// end function
  1180.  
  1181. public function ExtSlowOff()
  1182. {
  1183. ExternalInterface.call("ChatV2.setSlowOff");
  1184. return;
  1185. }// end function
  1186.  
  1187. public function ExtActOn()
  1188. {
  1189. ExternalInterface.call("ChatV2.setActivatedOn");
  1190. return;
  1191. }// end function
  1192.  
  1193. public function ExtActOff()
  1194. {
  1195. ExternalInterface.call("ChatV2.setActivatedOff");
  1196. return;
  1197. }// end function
  1198.  
  1199. public function ExtVaughn(param1:String, param2:String, param3:String)
  1200. {
  1201. ExternalInterface.call("ChatV2vaughn.Draw", param1, param2, param3);
  1202. return;
  1203. }// end function
  1204.  
  1205. public function ExtCohostInvite(param1:String, param2:String)
  1206. {
  1207. ExternalInterface.call("ChatV2.CohostInvite", param1, param2);
  1208. return;
  1209. }// end function
  1210.  
  1211. public function ExtRefresh()
  1212. {
  1213. ExternalInterface.call("location.reload", true);
  1214. return;
  1215. }// end function
  1216.  
  1217. function frame1()
  1218. {
  1219. this.MvnSocket = new XMLSocket();
  1220. this.isReconnecting = false;
  1221. this.isConnected = false;
  1222. this.isJoined = false;
  1223. this.MvnServer = "";
  1224. this.MvnPort = 0;
  1225. this.MvnUser = "";
  1226. this.MvnPass = "";
  1227. this.MvnChan = "";
  1228. this.MvnMask = "";
  1229. this.MvnLevel = 0;
  1230. this.MvnColor = "";
  1231. this.MvnVip = 0;
  1232. this.isGuest = false;
  1233. this.MvnReconnectCnt = 1;
  1234. this.MvnReconnectTimer = new Timer(2000, 100);
  1235. this.MvnQs = this.loaderInfo.parameters;
  1236. if (this.MvnQs.u != undefined)
  1237. {
  1238. this.MvnUser = this.MvnQs.u;
  1239. }
  1240. if (this.MvnQs.p != undefined)
  1241. {
  1242. this.MvnUser = this.MvnQs.p;
  1243. }
  1244. if (this.MvnQs.cs != undefined)
  1245. {
  1246. this.MvnServer = this.MvnQs.cs;
  1247. }
  1248. if (this.MvnQs.cp != undefined)
  1249. {
  1250. this.MvnPort = this.MvnQs.cp;
  1251. }
  1252. this.MvnUser = "guest";
  1253. this.MvnPass = "guest";
  1254. this.MvnChan = "#vl-vtest";
  1255. this.mvnQs = this.MvnQs.mvn;
  1256. if (this.mvnQs != undefined)
  1257. {
  1258. this.qsSplt = this.mvnQs.split(";");
  1259. this.MvnChan = "#" + this.qsSplt[0] + "-" + this.qsSplt[1];
  1260. if (this.qsSplt[0] == "vl")
  1261. {
  1262. this.MvnServer = this.getServer(this.MvnChan);
  1263. }
  1264. else
  1265. {
  1266. this.MvnServer = this.qsSplt[2];
  1267. }
  1268. this.MvnUser = this.qsSplt[3];
  1269. this.MvnPass = this.qsSplt[4];
  1270. this.MvnPort = this.qsSplt[5];
  1271. }
  1272. trace("SERVER = " + this.getServer("#vl-notmark"));
  1273. this.Connect();
  1274. ExternalInterface.addCallback("sendChat", this.sendChat);
  1275. ExternalInterface.addCallback("sendVaughnChat", this.sendVaughnChat);
  1276. ExternalInterface.addCallback("doUserLevel", this.doUserLevel);
  1277. ExternalInterface.addCallback("doUserVip", this.doUserVip);
  1278. ExternalInterface.addCallback("doBan", this.doBan);
  1279. ExternalInterface.addCallback("doMute", this.doMute);
  1280. ExternalInterface.addCallback("doKick", this.doKick);
  1281. ExternalInterface.addCallback("doPurge", this.doPurge);
  1282. ExternalInterface.addCallback("doUnban", this.doUnban);
  1283. ExternalInterface.addCallback("doUnmute", this.doUnmute);
  1284. ExternalInterface.addCallback("doClear", this.doClear);
  1285. ExternalInterface.addCallback("doChatters", this.doChatters);
  1286. ExternalInterface.addCallback("doColor", this.doColor);
  1287. ExternalInterface.addCallback("SendIM", this.SendIM);
  1288. ExternalInterface.addCallback("imOn", this.imOn);
  1289. ExternalInterface.addCallback("imOff", this.imOff);
  1290. ExternalInterface.addCallback("doMod", this.doMod);
  1291. ExternalInterface.addCallback("doUnmod", this.doUnmod);
  1292. ExternalInterface.addCallback("doRegular", this.doRegular);
  1293. ExternalInterface.addCallback("doUnregular", this.doUnregular);
  1294. ExternalInterface.addCallback("doGlobalBan", this.doGlobalBan);
  1295. ExternalInterface.addCallback("delGlobalBan", this.delGlobalBan);
  1296. ExternalInterface.addCallback("doGlobalMute", this.doGlobalMute);
  1297. ExternalInterface.addCallback("delGlobalMute", this.delGlobalMute);
  1298. ExternalInterface.addCallback("doGlobalMessage", this.doGlobalMessage);
  1299. ExternalInterface.addCallback("doGlobalMessageVL", this.doGlobalMessageVL);
  1300. ExternalInterface.addCallback("doGlobalMessageBTV", this.doGlobalMessageBTV);
  1301. ExternalInterface.addCallback("doGlobalMessageIGB", this.doGlobalMessageIGB);
  1302. ExternalInterface.addCallback("doPermBan", this.doPermBan);
  1303. ExternalInterface.addCallback("delPermBan", this.delPermBan);
  1304. ExternalInterface.addCallback("doSlowOn", this.doSlowMode);
  1305. ExternalInterface.addCallback("doSlowOff", this.doSlowModeOff);
  1306. ExternalInterface.addCallback("doActOn", this.doActMode);
  1307. ExternalInterface.addCallback("doActOff", this.doActModeOff);
  1308. ExternalInterface.addCallback("doGuestOn", this.doGuestOn);
  1309. ExternalInterface.addCallback("doGuestOff", this.doGuestOff);
  1310. ExternalInterface.addCallback("doDrop", this.doDrop);
  1311. ExternalInterface.addCallback("doInvite", this.doInvite);
  1312. ExternalInterface.addCallback("doInviteCohost", this.doInviteCohost);
  1313. ExternalInterface.addCallback("doRandom", this.doRandom);
  1314. ExternalInterface.addCallback("doViewBans", this.doViewBans);
  1315. ExternalInterface.addCallback("doViewMods", this.doViewMods);
  1316. ExternalInterface.addCallback("doUnbanall", this.doUnbanall);
  1317. ExternalInterface.addCallback("doUnmodall", this.doUnmodall);
  1318. return;
  1319. }// end function
  1320.  
  1321. }
  1322. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement