package { import flash.display.*; public dynamic class fb extends MovieClip { public var hold:MovieClip; public function fb(){ addFrameScript(0, this.frame1); } function frame1(){ new xBut(this.hold, 0, 0, 32, 32, "", undefined, xBut.b_NoPress, 8, 3889560); } } }//package package { import flash.events.*; import com.adobe.serialization.json.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.geom.*; import flash.system.*; import flash.ui.*; public class chat extends Sprite { public static const cVersion = "22122012e"; public static const sv = 32; public static const lv = 2; static const period = 120; static const times = 36; public static var debug = false; static var force_xc = undefined; static var force_lang = undefined; static var gctrick = 0; static var framet = 0; static var framec = 0; static var timesc = 0; static var fpsstr = ""; static var fps = 12; static var afps = 12; static var fpsa = 0; static var fpsc = 0; static var timer = new Object(); static var State = 0; static var Timeout = undefined; static var sot = null; static var keybits:Array = new Array(0x0100); static var ctrlTimer; public static var mainDlg:main; public static var IM = new im(); public static var beep:Sound; public static var dingdong:Sound; public static var tab_sound:Sound; public static var sending_lc:LocalConnection; public static var receiving_lc:LocalConnection; public static var toxat = "toxat"; public static var fromxat = "fromxat"; public static var AppTimeout = undefined; public static var connectchannel = undefined; public static var connectuser = undefined; public static var connectmessage = undefined; public static var connectmsg = undefined; public static var onMsg2; public function chat(){ addEventListener(Event.ADDED_TO_STAGE, this.init); } static function NotAway(){ var _local1:* = xatlib.FindUser(todo.w_userno); if ((todo.Users[_local1].flag0 & 0x4000)){ network.NetworkSendMsg(todo.w_userno, "/back"); }; todo.Away = 1; } public static function onLang(_arg1:Event){ var _local2:URLLoader = URLLoader(_arg1.target); todo.LangText = _local2.data; xconst.CreateST(); xconst.MakeBads(); } static function isKeyDown(_arg1:int):Boolean{ return ((true == Boolean(keybits[_arg1]))); } function init(_arg1:Event){ var _local2:*; todo.config["WEB"] = true; stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; todo.StageWidth = stage.stageWidth; todo.StageHeight = stage.stageHeight; stage.addEventListener(Event.RESIZE, this.onResize); if (todo.config["WEB"]){ Security.allowDomain("cdn.gigya.com"); Security.allowInsecureDomain("cdn.gigya.com"); Security.allowDomain("xat.com"); Security.allowInsecureDomain("xat.com"); }; if (todo.config["WEB"]){ if (((parent) && (parent.parent))){ _local2 = parent.parent.root.loaderInfo.parameters; } else { _local2 = root.loaderInfo.parameters; }; if (_local2.id != undefined){ todo.w_room = xatlib.xInt(_local2.id); }; if (_local2.pass != undefined){ todo.pass = (global.pass = xatlib.xInt(_local2.pass)); }; if (_local2.rf != undefined){ global.rf = xatlib.xInt(_local2.rf); }; if (_local2.gn != undefined){ global.gn = _local2.gn; }; if (_local2.um != undefined){ global.um = xatlib.xInt(_local2.um); }; if (_local2.lg != undefined){ global.lg = _local2.lg; }; if (_local2.rl != undefined){ global.rl = _local2.rl; }; if (((!((_local2.pw == undefined))) && (!((_local2.em == undefined))))){ todo.w_password = xatlib.CleanText(_local2.pw, 1); }; if (_local2.pw == "##"){ todo.RefreshLogin = true; }; if (_local2.em != undefined){ todo.w_email = xatlib.CleanText(_local2.em, 0); }; if (_local2.cn != undefined){ global.cn = xatlib.xInt(_local2.cn); }; global.gb = _local2.gb; if (_local2.xn != undefined){ global.xn = _local2.xn; }; if (_local2.xp != undefined){ global.xp = _local2.xp; }; if (_local2.xh != undefined){ global.xh = _local2.xh; }; if (_local2.xb != undefined){ global.xb = _local2.xb; }; if (_local2.xl != undefined){ global.xl = _local2.xl; }; if (_local2.xm != undefined){ global.xm = _local2.xm; }; if (_local2.xt != undefined){ global.xt = _local2.xt; }; if (_local2.xo != undefined){ global.xo = _local2.xo; }; if (_local2.xc != undefined){ global.xc = xatlib.xInt(_local2.xc); }; global.sv = sv; global.lv = lv; }; if (todo.config["MOBILE"]){ todo.w_room = 5713805; }; todo.w_useroom = todo.w_room; xconst.xconstInit(); beep = new beepsnd(); tab_sound = new beepsnd(); dingdong = new dingdongsnd(); this.SetState(0); if (xatlib.xInt(Capabilities.version.split(" ")[1]) < 10){ gctrick = 60; }; stage.addEventListener(KeyboardEvent.KEY_DOWN, this.onkeyDown); stage.addEventListener(KeyboardEvent.KEY_UP, this.onkeyUp); stage.addEventListener(MouseEvent.MOUSE_MOVE, this.onmouseMove); addEventListener(Event.ENTER_FRAME, this.tick); } function onResize(_arg1:Event){ } function onmouseMove(_arg1:Event){ if ((((todo.OnSuper == false)) && ((todo.lb == "t")))){ network.NetworkSendMsg(1, "/K2", 0, 0, 1); todo.OnSuper = true; }; if (todo.Away){ NotAway(); }; } function SetState(_arg1, _arg2=undefined){ State = _arg1; Timeout = _arg2; } function tick(_arg1:Event){ var flushret:* = undefined; var temp_comm:* = undefined; var Request:* = null; var loader:* = null; var t:* = undefined; var str:* = undefined; var event:* = _arg1; if (State == 0){ sot = xatlib.getLocal("chat", "/"); sot.objectEncoding = ObjectEncoding.AMF0; sot.data.w_test = Math.random(); this.SetState(1); }; if (State == 1){ flushret = sot.flush(); if (flushret == SharedObjectFlushStatus.FLUSHED){ sot = null; this.SetState(2); }; }; if (State == 2){ this.CookieStuff(); if (todo.w_lang == undefined){ if (todo.w_roomlang == undefined){ this.SetState(5); } else { todo.w_lang = todo.w_roomlang; this.SetState(3); }; } else { if (todo.w_lang == 0){ this.SetState(5); } else { this.SetState(3); }; }; }; if (State == 3){ todo.LangText = undefined; temp_comm = (((xconst.usedomain + "/json/lang/Chat/") + todo.w_lang) + ".php"); xatlib.LoadVariables(temp_comm, onLang); this.SetState(4, 20); }; if (State == 4){ if (todo.LangText != undefined){ this.SetState(5); }; if (Timeout != undefined){ Timeout--; }; if (Timeout <= 0){ this.SetState(5); }; }; if (State == 5){ mainDlg = new main(); addChild(mainDlg); mainDlg.StartChat(); network.NetworkInit(); network.NetworkStartChat(); if (!todo.config["nolocalconnection"]){ this.AppComms(); }; IM.IMComms(); if (todo.w_room == 8){ xatlib.AddBackground(this, -10, -10, 240, 160, (((((128 << 10) | xatlib.c_tl) | xatlib.c_tr) | xatlib.c_bl) | xatlib.c_br)); }; if ((global.xc & 1)){ if (global.xp != undefined){ xatlib.GeneralMessage(" ", (xconst.ST(249) + global.xp)); main.box_layer.GeneralMessageH.Dia.Ok.But.PressFunc = function (_arg1){ main.box_layer.GeneralMessageH.Delete(); todo.w_avatar = global.xp; xatlib.MainSolWrite("w_avatar", todo.w_avatar); xatlib.ReLogin(); }; }; }; Request = new URLRequest(); Request.url = (xconst.chatdomain + "pow2.php"); Request.method = URLRequestMethod.GET; loader = new URLLoader(); loader.load(Request); loader.addEventListener(Event.COMPLETE, this.PowHandler); this.SetState(6); }; if (State == 6){ if (AppTimeout != undefined){ AppTimeout--; if (AppTimeout <= 0){ if (todo.messageecho == "m"){ todo.messageecho = undefined; }; AppTimeout = undefined; }; }; network.NetworkTick(); tickcode.DoTick(); if (mainDlg){ mainDlg.tick2(null); }; }; if (((!((gctrick == 0))) && (((todo.tick % gctrick) == 0)))){ try { new LocalConnection().connect("foo"); new LocalConnection().connect("foo"); } catch(e:Error) { }; }; if (((((((debug) || ((((todo.useport == 10025)) && ((todo.sockdomain == "174.36.242.26")))))) && (!(todo.bStrip)))) && (!(todo.bSmilies)))){ framec++; if (framec >= period){ t = getTimer(); fps = (Math.round((((period * 1000) / (t - framet)) * 100)) / 100); fpsa = (fpsa + fps); fpsc++; afps = (Math.round(((fpsa / fpsc) * 100)) / 100); fpsstr = (fpsstr + (fps.toString() + ",")); timesc++; if (timesc >= times){ str = (((((((((("lag=" + fpsstr) + Capabilities.version) + ",") + System.totalMemory) + ",") + mainDlg.stage.frameRate) + ",") + afps) + ",") + cVersion); network.NetworkSendMsg(1, ("/KD " + str), 0, 0, 1); fpsstr = ""; timesc = 0; }; framet = t; framec = 0; }; }; if (ctrlTimer != undefined){ ctrlTimer--; if (ctrlTimer <= 0){ ctrlTimer = undefined; keybits[Keyboard.CONTROL] = false; }; }; } function PowHandler(_arg1:Event){ var _local6:*; var _local7:*; var _local2:URLLoader = URLLoader(_arg1.target); var _local3:* = xJSON.decode(_local2.data); var _local4:* = false; var _local5:* = 0; while (_local5 < _local3.length) { for (_local6 in _local3[_local5][1]) { switch (_local3[_local5][0]){ case "backs": _local4 = true; xconst.backs[_local6] = _local3[_local5][1][_local6]; break; case "topsh": xconst.topsh[_local6] = xatlib.xInt(_local3[_local5][1][_local6]); xconst.smi = (xconst.smi + ("," + _local6)); xconst.smia.push(_local6); xconst.smih[_local6] = true; break; case "Puzzle": xconst.Puzzle[_local6] = _local3[_local5][1][_local6]; break; case "NotGroup": xconst.NotGroup[_local6] = _local3[_local5][1][_local6]; break; case "pssa": _local7 = xatlib.xInt(_local3[_local5][1][_local6]); xconst.pssa[(_local7 + 1)] = _local6; xconst.smi = (xconst.smi + ("," + _local6)); xconst.smia.push(_local6); xconst.smih[_local6] = true; xconst.pssh[_local6] = _local7; break; case "pawns": xconst.Pawns = _local3[_local5][1]; break; }; }; _local5++; }; if (_local4){ xconst.backsR = xconst.ReverseObj(xconst.backs); }; } function CookieStuff(){ var _local4:Date; var _local5:*; var _local6:*; if (todo.w_lang == undefined){ todo.w_lang = global.lg; }; if (todo.w_langv == undefined){ todo.w_langv = global.lv; }; var _local1:* = xatlib.getLocal(("chat" + String(todo.w_room)), "/"); _local1.objectEncoding = ObjectEncoding.AMF0; if (_local1 != null){ if (todo.pass != undefined){ _local1.data.pass = todo.pass; _local1.flush(); } else { todo.pass = _local1.data.pass; if (todo.pass != undefined){ todo.pass = xatlib.xInt(todo.pass); }; }; }; var _local2:* = xatlib.getLocal("chat", "/"); _local2.objectEncoding = ObjectEncoding.AMF0; var _local3:* = 1; if (((1) && (!((_local2 == null))))){ _local4 = new Date(); _local5 = _local4.getTime(); _local6 = 0; if (_local2.data.w_lastroom != undefined){ _local3 = _local2.data.w_lastroom; }; if (_local2.data.w_lastauto != undefined){ _local6 = _local2.data.w_lastauto; }; _local2.data.w_lastauto = _local5; if (todo.w_lang != undefined){ if (xatlib.xInt(todo.w_lang) < 10000){ _local2.data.w_lang = todo.w_lang; }; } else { if (_local2.data.w_lang != undefined){ todo.w_lang = _local2.data.w_lang; }; }; _local2.flush(); if (_local2.data.w_userno != undefined){ if (_local2.data.w_userno != undefined){ todo.w_userno = xatlib.xInt(_local2.data.w_userno); }; if (_local2.data.w_userrev != undefined){ todo.w_userrev = xatlib.xInt(_local2.data.w_userrev); }; if (_local2.data.w_k1b != undefined){ todo.w_k1 = xatlib.xInt(_local2.data.w_k1b); }; if (_local2.data.w_k2 != undefined){ todo.w_k2 = xatlib.xInt(_local2.data.w_k2); }; todo.w_cb = xatlib.xInt(_local2.data.w_cb); if (_local2.data.w_name != undefined){ todo.w_name = xatlib.CleanTextNoXat(_local2.data.w_name); }; if (_local2.data.w_avatar != undefined){ todo.w_avatar = xatlib.CleanAv(_local2.data.w_avatar); }; if (_local2.data.w_homepage != undefined){ todo.w_homepage = _local2.data.w_homepage; }; if (_local2.data.w_d0 != undefined){ todo.w_d0 = xatlib.xInt(_local2.data.w_d0); }; if (_local2.data.w_d1 != undefined){ todo.w_d1 = xatlib.xInt(_local2.data.w_d1); }; todo.w_d2 = xatlib.xInt(_local2.data.w_d2); todo.w_d3 = xatlib.xInt(_local2.data.w_d3); todo.w_dt = xatlib.xInt(_local2.data.w_dt); todo.w_Powers = _local2.data.w_Powers; todo.w_Mask = _local2.data.w_Mask; todo.w_bride = _local2.data.w_bride; todo.w_xats = _local2.data.w_xats; todo.w_PowerO = _local2.data.w_PowerO; todo.w_sn = _local2.data.w_sn; if (_local2.data.w_coins != undefined){ todo.w_coins = xatlib.xInt(_local2.data.w_coins); }; if (_local2.data.w_k3 != undefined){ todo.w_k3 = xatlib.xInt(_local2.data.w_k3); }; if (_local2.data.w_registered != undefined){ todo.w_registered = _local2.data.w_registered; }; todo.w_autologin = _local2.data.w_autologin; todo.w_news = xatlib.xInt(_local2.data.w_news); todo.w_Vol[1] = _local2.data.w_Vol1; todo.w_Vol[2] = _local2.data.w_Vol2; if ((((todo.w_autologin == undefined)) || ((todo.w_autologin == true)))){ todo.w_autologin = 0xFFFF; }; if (todo.w_autologin == false){ todo.w_autologin = 65534; }; todo.autologin = todo.w_autologin; if (!(global.xc & 32)){ if ((_local5 - _local6) < (((todo.w_room == _local3)) ? 10000 : 2000)){ todo.w_autologin = (todo.w_autologin & ~(1)); }; }; if ((((todo.w_useroom > 100)) && ((((todo.StageWidth < 220)) || ((todo.StageHeight < 140)))))){ todo.w_autologin = (todo.w_autologin & ~(1)); } else { if ((global.xc & 0x0200)){ todo.w_autologin = (todo.w_autologin & ~(1)); } else { if ((((todo.w_useroom > 100)) && (!((global.pw == undefined))))){ todo.w_autologin = (todo.w_autologin | 1); }; }; }; if (_local2.data.w_banlist != undefined){ todo.w_banlist = _local2.data.w_banlist; }; if (_local2.data.w_friendlist != undefined){ todo.w_friendlist = _local2.data.w_friendlist; }; if (_local2.data.w_friendlist2 != undefined){ todo.w_friendlist2 = _local2.data.w_friendlist2; }; if (_local2.data.w_ignorelist2 != undefined){ todo.w_ignorelist2 = _local2.data.w_ignorelist2; }; if (_local2.data.w_userrevlist != undefined){ todo.w_userrevlist = _local2.data.w_userrevlist; }; if (_local2.data.w_namelist != undefined){ todo.w_namelist = _local2.data.w_namelist; }; if (_local2.data.w_avatarlist != undefined){ todo.w_avatarlist = _local2.data.w_avatarlist; }; if (_local2.data.w_homepagelist != undefined){ todo.w_homepagelist = _local2.data.w_homepagelist; }; todo.w_Options = _local2.data.w_Options; todo.Macros = _local2.data.Macros; if (!todo.Macros){ todo.Macros = {}; }; }; }; if (todo.w_Vol[1] == undefined){ todo.w_Vol[1] = 35; }; if (todo.w_Vol[2] == undefined){ todo.w_Vol[2] = 35; }; if (((!((_local2 == null))) && (!((_local2.data.w_sound == undefined))))){ todo.w_sound = _local2.data.w_sound; }; network.TrimIgnoreList(); if (global.xn != undefined){ if ((((todo.w_name == "")) || (xatlib.IsDefaultName(todo.w_name)))){ todo.w_name = global.xn; }; }; if (global.xp != undefined){ if (todo.w_avatar == ""){ todo.w_avatar = global.xp; }; }; if (global.xh != undefined){ if (todo.w_homepage == ""){ todo.w_homepage = global.xh; }; }; if (global.xl != undefined){ todo.MainFlagBits = (todo.MainFlagBits | xconst.f_Lobby); }; if (network.OnFriendList(3)){ network.UpdateFriendList(3, false); }; todo.w_roomlang = global.rl; if (force_lang != undefined){ todo.w_lang = force_lang; }; } function onkeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.CONTROL){ ctrlTimer = 12; }; keybits[_arg1.keyCode] = true; } function onkeyUp(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.CONTROL){ ctrlTimer = undefined; }; keybits[_arg1.keyCode] = false; } function sending_lc_Status(_arg1:Event){ } function AppComms(){ onMsg2 = this.onMsg; if (force_xc != undefined){ global.xc = force_xc; }; if (global.cn != undefined){ toxat = (toxat + global.cn); fromxat = (fromxat + global.cn); }; if ((global.xc & 0x0800)){ sending_lc = new LocalConnection(); sending_lc.addEventListener(StatusEvent.STATUS, this.sending_lc_Status); receiving_lc = new LocalConnection(); receiving_lc.client = this; try { receiving_lc.connect(toxat); } catch(error:ArgumentError) { }; }; } public function onMsg(_arg1, _arg2, _arg3){ var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:*; var _local12:*; var _local13:*; var _local14:*; var _local15:*; if (_arg1 == 1){ connectchannel = _arg1; connectuser = _arg2; connectmessage = _arg3; if (todo.lb != "n"){ sending_lc.send(fromxat, "onMsg", _arg1, _arg2, _arg3); }; AppTimeout = 120; } else { if (_arg1 == 2){ _local4 = main.ctabsmc.TabUser(); sending_lc.send(fromxat, "onMsg", 2, (((_local4 == undefined)) ? 0 : _local4), ""); } else { if (_arg1 == 3){ if (_arg3 == 0){ _arg3 = todo.w_userno; }; _local5 = xatlib.FindUser(_arg3); if (_local5 != -1){ sending_lc.send(fromxat, "onMsg", _arg1, ((_arg3)==todo.w_userno) ? 0 : todo.Users[_local5].u, todo.Users[_local5].n); }; } else { if (_arg1 == 4){ if (_arg3 == "m"){ if (network.YC){ _local6 = (xatlib.xInt(todo.w_d1) - network.YC); if (_local6 < 0){ _local6 = 0; }; _local6 = xatlib.xInt(((_local6 / (24 * 3600)) + 0.3)); if (_local6 > 0){ todo.messageecho = _arg3; } else { todo.helpstr = "You need to be a subscriber to use translator"; todo.helpupdate = 0; }; }; } else { todo.messageecho = _arg3; if (todo.messageecho == "a"){ sending_lc.send(fromxat, "onMsg", 4, 0, "d"); _local7 = todo.Users.length; _local8 = 0; while (_local8 < _local7) { if (todo.Users[_local8].online == true){ sending_lc.send(fromxat, "onMsg", 4, todo.Users[_local8].u, ("u" + todo.Users[_local8].a)); }; _local8++; }; }; }; } else { if ((((_arg1 >= 10000)) || ((_arg1 == 0)))){ if ((((_arg1 >= 40000)) && ((_arg1 <= 50000)))){ if (_arg3 == "j"){ network.NetworkSendExtMessage(_arg3); } else { network.NetworkSendxmlExtMessage(_arg3); }; } else { network.NetworkSendExtMessage(_arg1, _arg2, _arg3); if ((((_arg1 == 10001)) && ((_arg3.substr(0, 1) == "b")))){ xatlib.UpdateDJ(todo.w_userno); }; }; } else { if (_arg1 == 5){ stage.focus = main.textfield2; main.textfield2.appendText(_arg3); main.textfield2.setSelection(main.textfield2.text.length, main.textfield2.text.length); } else { if (_arg1 == 6){ if (_arg3 == 0){ _arg3 = todo.w_userno; }; _local9 = xatlib.FindUser(_arg3); if (_local9 != -1){ sending_lc.send(fromxat, "onMsg", _arg1, todo.Users[_local9].u, todo.Users[_local9]); }; } else { if (_arg1 == 7){ if (_arg3 == "x"){ chat.mainDlg.GotoProfile(_arg2); } else { if (_arg3 == "p"){ main.openDialog(2, _arg2); } else { if (_arg3 == "b"){ xatlib.Register_onRelease(1); } else { _local10 = _arg3.split(","); if (_local10[0] == "ban"){ network.NetworkGagUser("g", _arg2, true, xatlib.xInt(_local10[1]), _local10[2]); }; }; }; }; } else { if (_arg1 == 8){ if (_arg3){ todo.w_avatar = _arg3; }; todo.w_cb++; _local11 = xatlib.getLocal("chat", "/"); _local11.objectEncoding = ObjectEncoding.AMF0; if (((1) && (!((_local11 == null))))){ _local11.data.w_cb = todo.w_cb; _local11.data.w_avatar = todo.w_avatar; _local11.flush(); }; todo.lb = "n"; todo.DoUpdate = true; network.NetworkClose(); main.logoutbutonPress(); } else { if (_arg1 == 9){ _local12 = "not set"; switch (_arg3){ case "sv": _local12 = global.sv; break; case "smi": _local12 = xconst.smi; break; case "w_xats": _local12 = todo.w_xats; break; case "YC": _local12 = network.YC; break; case "w_d1": _local12 = todo.w_d1; break; case "w_Powers": _local12 = todo.w_Powers; break; case "w_Mask": _local12 = (((((todo.w_Mask == undefined)) || ((todo.w_Mask == 0)))) ? "0,0,0" : todo.w_Mask); break; case "w_langv": _local12 = todo.w_langv; break; case "pssa": _local12 = xconst.pssa; break; case "w_PowerO": _local12 = todo.w_PowerO; break; case "w_lang": _local12 = todo.w_lang; break; case "config": _local12 = todo.config; break; case "gUserNo": _local12 = global.gUserNo; break; case "w_useroom": _local12 = todo.w_useroom; break; case "gconfig": _local12 = todo.gconfig; break; case "w_cb": _local12 = todo.w_cb; break; case "WY": _local12 = todo.WY; break; default: if (1){ }; }; sending_lc.send(fromxat, "onMsg", _arg1, _arg3, _local12); } else { if (_arg1 == 10){ _local13 = todo.Message.length; _local14 = 0; while (_local14 < _local13) { if (todo.Message[_local14].i == xatlib.xInt(_arg2)){ if (_arg3 != ""){ if (todo.Message[_local14].t.indexOf(" [") != -1){ todo.Message[_local14].t = (((todo.Message[_local14].t.substr(0, todo.Message[_local14].t.indexOf(" [")) + " [") + _arg3) + "]"); } else { todo.Message[_local14].t = (((todo.Message[_local14].t + " [") + _arg3) + "]"); }; }; xmessage.DeleteOneMessageMc(_local14); todo.DoUpdateMessages = true; if ((xatlib.xInt(_arg2) & 1)){ _local15 = todo.Message[_local14].t; todo.DoUpdateMessages = true; todo.ScrollDown = true; todo.LastScrollTime = undefined; if (todo.MessageCount > 0){ todo.MessageCount = 25; }; if (_local15 != todo.LastMessageToSend){ if (todo.MessageToSend.length == 0){ todo.MessageToSend = _local15; }; todo.MessageToSend = todo.MessageToSend.substr(0, 0x0100); } else { todo.MessageCount = 25; }; }; break; }; _local14++; }; } else { if (_arg1 == 12){ if (todo.systemMessages.indexOf(_arg3) == -1){ todo.systemMessages = (todo.systemMessages + _arg3); }; if (_arg3 == "v"){ sending_lc.send(fromxat, "onMsg", _arg1, _arg3, (((todo.w_sound & 1)) ? todo.w_Vol[1] : 0)); }; }; }; }; }; }; }; }; }; }; }; }; }; } } }//package package { import flash.display.*; public dynamic class bubble extends MovieClip { public var back:MovieClip; } }//package package { import flash.display.*; public dynamic class Home extends MovieClip { } }//package package { import flash.display.*; public dynamic class All extends MovieClip { } }//package package { import flash.xml.*; import flash.events.*; import flash.display.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.system.*; import flash.external.*; public class network { static var xips = 4; static var xservers = 4; static var xSock = new Array("174.36.242.24", "174.36.242.25", "174.36.242.26", "174.36.242.27", "174.36.242.32", "174.36.242.33", "174.36.242.34", "174.36.242.35", "174.36.242.40", "174.36.242.41", "174.36.242.42", "174.36.242.43", "69.4.231.248", "69.4.231.249", "69.4.231.250", "69.4.231.251"); static var xSock2 = new Array("208.43.218.80", "208.43.218.81", "208.43.218.82", "208.43.218.83", "174.36.56.200", "174.36.56.201", "174.36.56.202", "174.36.56.203", "174.36.4.144", "174.36.4.145", "174.36.4.146", "174.36.4.147", "174.36.56.184", "174.36.56.185", "174.36.56.186", "174.36.56.187"); public static var SockStatus = new Array(400, 401, 402, 403, 410, 411, 412, 413, 420, 421, 422, 423, 430, 431, 432, 433); public static var NetworkState; public static var NetworkTimeout; public static var MessageCount; public static var LurkerLimit; public static var LurkerTimeout; public static var socket; public static var UnfairFile:String = ""; public static var UnfairMessage:String = ""; public static var UnfairGroupName:String = ""; public static var GotDone:Boolean = false; public static var GotFirstDone:Boolean = false; public static var w_redirectdom = undefined; public static var w_redirectport = undefined; public static var QK = false; public static var YI = undefined; public static var YC:int = undefined; public static var YC2:int = undefined; public static var WV = false; public static var WC; public static var FI = undefined; public static var LastLocate = 0; public static var FailoverMode = false; public static var test_xml; public static var fs = 0; public static var sjt = 0; public static var jt1 = 0; public static var jt2 = 0; public static var UngagTimeout = undefined; public static var Fire = true; public static var Bootp = undefined; public static var UserId; public static var k1; public static var k2; public static var J2_Order; static var p_w = 100; static var p_h = 100; static var p_octaves = 6; static var p_seed = 12345; static var p_x = 50; static var p_y = 50; static var codeLoad; static var mcCode:MovieClip = null; public static function ipAlive(_arg1){ var _local2:* = 0; while (_local2 < (xips * xservers)) { if (((!((SockStatus[_local2] == 0))) && ((xSock[_local2] == _arg1)))){ return (true); }; _local2++; }; return (false); } public static function numAlive(_arg1){ var _local2:* = 0; var _local3:* = 0; while (_local3 < xips) { if (SockStatus[((_arg1 * xips) + _local3)] != 0){ _local2++; }; _local3++; }; return (_local2); } public static function setIps(){ var _local2:*; var _local3:*; var _local1:* = 0; while (_local1 < xservers) { _local2 = new Array(); _local3 = 0; while (_local3 < xips) { if (SockStatus[((_local1 * xips) + _local3)] != 0){ _local2.push(xSock[((_local1 * xips) + _local3)]); }; _local3++; }; if (_local2.length > 0){ global.Sock[_local1] = _local2[Math.floor((Math.random() * _local2.length))]; }; _local1++; }; } public static function GetDom(_arg1):Number{ if (xatlib.xInt(_arg1) == 8){ return (0); }; return (((xatlib.xInt(_arg1))<8) ? 3 : ((xatlib.xInt(_arg1) & 96) >> 5)); } public static function GetPort(_arg1):Number{ if (xatlib.xInt(_arg1) == 8){ return (10000); }; return (((xatlib.xInt(_arg1))<8) ? ((10000 - 1) + xatlib.xInt(_arg1)) : ((10000 + 7) + (xatlib.xInt(_arg1) % 32))); } public static function NetworkInit(){ setIps(); var _local1:* = 0; while (_local1 < xservers) { global.Sock2[_local1] = xSock2[((4 * _local1) + Math.floor((Math.random() * 4)))]; _local1++; }; NetworkState = 0; NetworkTimeout = -1; MessageCount = 0; LurkerLimit = ((12 * 60) * 5); LurkerTimeout = -1; } public static function NetworkStartChat(){ var request:* = null; var loader:* = null; xmessage.ClearLists(true); UngagTimeout = undefined; if (((!((todo.w_userrev == undefined))) && ((((todo.w_k1 == 0)) || ((todo.w_k2 == 0)))))){ UserId = undefined; request = new URLRequest(); request.url = (((((((todo.chatdomain + "auser3.php?") + "u=") + xatlib.xInt(todo.w_userno)) + "&k2=") + todo.w_k2) + "&t=") + Math.random()); request.method = URLRequestMethod.GET; loader = new URLLoader(); loader.load(request); loader.addEventListener(Event.COMPLETE, ausercompleteHandler); } else { if (todo.w_userrev == undefined){ UserId = 2; } else { UserId = todo.w_userno; k1 = todo.w_k1; k2 = todo.w_k2; }; }; SetNetworkState(1, 120); todo.DoBuildUserListScrollUp = true; try { main.mcLoad.IMdisplayContacts(); } catch(e:Error) { }; } private static function ausercompleteHandler(_arg1:Event):void{ var _local2:URLLoader = URLLoader(_arg1.target); var _local3:URLVariables = new URLVariables(_local2.data.substr(1)); UserId = _local3.UserId; k1 = _local3.k1; k2 = _local3.k2; } public static function NetworkSendMsg(_arg1, _arg2, _arg3=undefined, _arg4=undefined, _arg5=undefined, _arg6=undefined, _arg7=undefined){ var _local9:*; if (todo.lb == "n"){ return; }; if (_arg3 == undefined){ _arg3 = 0; }; if (_arg4 == undefined){ _arg4 = 0; }; if (_arg5 == undefined){ _arg5 = 0; }; var _local8:* = new XMLDocument(); var _local10:* = true; var _local11 = ""; if (_arg5 != 0){ _local9 = _local8.createElement("c"); if (_arg3 != 0){ _local9.attributes.d = todo.w_userno; _local9.attributes.s = 2; }; _local9.attributes.t = _arg2; _local9.attributes.u = _arg5; if (_arg6 != undefined){ _local9.attributes.p = _arg6; }; if (_arg7 != undefined){ _local9.attributes.w = _arg7; }; _local8.appendChild(_local9); _local11 = xatlib.XMLOrder(_local8, new Array("w", "p", "u", "t", "s", "d")); socket.send(_local11); } else { if (_arg4 != 0){ if (((((((OnUserList(_arg4)) && (!((_arg2.substr(0, 2) == "/a"))))) && (!((_arg2.substr(0, 2) == "/l"))))) && (!((_arg2.substr(0, 2) == "/t"))))){ _local9 = _local8.createElement("p"); if (_arg3 != 0){ _local9.attributes.d = todo.w_userno; _local9.attributes.s = 2; }; _local9.attributes.t = _arg2; _local9.attributes.u = _arg4; _local8.appendChild(_local9); _local11 = xatlib.XMLOrder(_local8, new Array("u", "t", "s", "d")); socket.send(_local11); } else { _local9 = _local8.createElement("z"); if (_arg3 != 0){ _local9.attributes.s = 2; }; _local9.attributes.t = _arg2; _local9.attributes.u = ((todo.w_userno + "_") + todo.w_userrev); _local9.attributes.d = _arg4; _local10 = false; _local8.appendChild(_local9); _local11 = xatlib.XMLOrder(_local8, new Array("d", "u", "t", "s")); socket.send(_local11); }; } else { if (_arg3 != 0){ if (OnUserList(_arg3)){ _local9 = _local8.createElement("p"); _local9.attributes.d = todo.w_userno; _local9.attributes.s = 2; _local9.attributes.t = _arg2; _local9.attributes.u = _arg3; _local8.appendChild(_local9); _local11 = xatlib.XMLOrder(_local8, new Array("u", "t", "s", "d")); socket.send(_local11); } else { _local9 = _local8.createElement("z"); _local9.attributes.s = 2; _local9.attributes.t = _arg2; _local9.attributes.u = ((todo.w_userno + "_") + todo.w_userrev); _local9.attributes.d = _arg3; _local10 = false; _local8.appendChild(_local9); _local11 = xatlib.XMLOrder(_local8, new Array("d", "u", "t", "s")); socket.send(_local11); }; } else { _local9 = _local8.createElement("m"); _local9.attributes.u = ((todo.w_userrev)<=0) ? _arg1 : ((_arg1 + "_") + todo.w_userrev); _local9.attributes.t = _arg2; if (xatlib.CountLinks(_arg2) > 0){ _local9.attributes.l = 1; }; _local8.appendChild(_local9); _local11 = xatlib.XMLOrder(_local8, new Array("t", "u", "l")); socket.send(_local11); }; }; }; if (_arg2.substr(0, 1) != "/"){ GlowUser(todo.w_userno); }; if (_arg2.substr(0, 3) == "/KD"){ _local10 = false; }; if (_local10){ LurkerTimeout = LurkerLimit; }; } public static function NetworkDeleteMessage(_arg1){ NetworkSendMsg(todo.w_userno, ("/d" + _arg1)); } public static function NetworkGagUser(_arg1, _arg2, _arg3, _arg4, _arg5=undefined, _arg6=undefined){ NetworkSendMsg(todo.w_userno, ((_arg3) ? (("/" + _arg1) + _arg4) : "/u"), 0, 0, _arg2, _arg5, _arg6); } public static function NetworkKickUser(_arg1, _arg2){ NetworkSendMsg(todo.w_userno, "/k", 0, 0, _arg1, _arg2); } public static function NetworkMakeUser(_arg1, _arg2){ NetworkSendMsg(todo.w_userno, ("/" + _arg2), 0, 0, _arg1); } public static function SysMsg(_arg1, _arg2, _arg3=undefined, _arg4=undefined, _arg5=undefined, _arg6:int=0):String{ var _local9:*; var _local10:*; var _local11:*; var _local7 = ""; var _local8:* = todo.Users[_arg3].n.substr(0, 128); if (_arg4 == undefined){ _arg4 = ""; }; if (xatlib.CountLinks(_local8) > 0){ _local8 = todo.Users[_arg3].registered; if (!_local8){ _local8 = todo.Users[_arg3].u; }; }; if (_arg1 == 0){ if (_arg2 == "M"){ _local7 = (_local7 + xconst.ST(137, _local8)); } else { if (_arg2.charAt(0) == "m"){ _local7 = (_local7 + xconst.ST(128, _local8)); } else { if (_arg2.charAt(0) == "e"){ _local7 = (_local7 + xconst.ST(132, _local8)); } else { if (_arg2.charAt(0) == "o"){ _local7 = (_local7 + xconst.ST(137, _local8)); } else { if (_arg2 == "r"){ _local7 = (_local7 + xconst.ST(138, _local8)); }; }; }; }; }; _local9 = (xatlib.xInt((_arg2.substr(1) / 36)) / 100); if (_local9 > 0){ _local7 = (_local7 + (((("(" + _local9) + " ") + xconst.ST(116)) + ")")); }; } else { if (_arg1 == 1){ _local10 = _arg4.split("#"); if (_local10.length == 2){ _local7 = (_local7 + xconst.ST(194, _local8, _local10[1], _local10[0])); } else { if (_local10.length == 3){ _local7 = (_local7 + ((("I have zapped " + _local8) + " Reason: ") + _local10[0])); } else { _local7 = (_local7 + xconst.ST(123, _local8, _local10[0])); }; }; } else { if (_arg1 == 2){ if (_arg4.length == 0){ if (_arg5 == 0){ _local7 = (_local7 + xconst.ST(119, _local8)); } else { _local7 = (_local7 + xconst.ST(120, _local8, String((_arg5 / 3600)))); }; } else { if (_arg5 == 0){ _local7 = (_local7 + xconst.ST(121, _local8, _arg4)); } else { _local7 = (_local7 + xconst.ST(122, _local8, String((_arg5 / 3600)), _arg4)); }; }; if (_arg6 == 158){ _local7 = xatlib.Replace(_local7, xconst.ST(258), xconst.ST(259)); } else { if (_arg6){ _local7 = xatlib.Replace(_local7, xconst.ST(258), (xconst.Puzzle[_arg6] + xconst.ST(258))); }; }; } else { if (_arg1 == 3){ if (_arg4.indexOf(",") >= 0){ _local11 = _arg4.split(","); _local7 = xconst.ST(250, _local11[2], xconst.Puzzle[_local11[0]], _local11[1]); } else { _local7 = (_local7 + (((xconst.ST(90) + " ") + _local8) + ".")); }; } else { if (_arg1 == 4){ if (_arg2.charAt(0) == "n"){ _local7 = (_local7 + xconst.ST(196, _local8)); _local9 = (xatlib.xInt((_arg2.substr(1) / 36)) / 100); if (_local9 > 0){ _local7 = (_local7 + (((("(" + _local9) + " ") + xconst.ST(116)) + ")")); }; }; } else { if ((((_arg1 == 5)) || ((_arg1 == 6)))){ if (_arg4.length == 0){ _local7 = (_local7 + xconst.ST(199, (((_arg1 == 5)) ? xconst.ST(188) : xconst.ST(201)), _local8, String((_arg5 / 3600)))); } else { _local7 = (_local7 + xconst.ST(200, (((_arg1 == 5)) ? xconst.ST(188) : xconst.ST(201)), _local8, String((_arg5 / 3600)), _arg4)); }; } else { return (""); }; }; }; }; }; }; return ((" " + _local7)); } public static function NetworkFriendUser(_arg1, _arg2){ var _local4:*; var _local3:* = xatlib.FindUser(_arg1); todo.Users[_local3].friend = _arg2; xmessage.DeleteOneUserMc(_local3); UpdateFriendList(_arg1, _arg2); if (todo.w_registered == undefined){ return; }; var _local5:* = ((("/b " + _arg1) + ",") + ((_arg2) ? "1" : "2")); if (_arg2){ _local4 = todo.Users[_local3].registered; if (_local4 == undefined){ _local4 = ""; }; _local5 = (_local5 + ((("," + _local4) + ",") + todo.Users[_local3].n.substr(0, 20))); }; NetworkSendMsg(todo.w_userno, _local5, 0, 0, 2); } public static function NetworkSetPool(_arg1){ var _local2:* = new XMLDocument(); var _local3:* = _local2.createElement(("w" + xatlib.xInt(_arg1))); _local2.appendChild(_local3); socket.send(_local2); } public static function NetworkLocateUser(_arg1){ if (_arg1 >= (0x77359400 - (100000 * 2))){ return; }; NetworkSendMsg(todo.w_userno, "/l", 0, _arg1, 0); } public static function NetworkClose(){ SetNetworkState(0, -1); if (socket.connected){ socket.close(); }; if (todo.messageecho == "s"){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, 0, "o"); }; }; } public static function UpdateChannel(_arg1, _arg2){ var _local3:Number = xatlib.FindUser(_arg2); if (_local3 < 0){ return; }; if (((((todo.Users[_local3].banned) && (todo.Users[_local3].w))) && (!((todo.Users[_local3].flag0 & 131072))))){ _arg1 = (50000 + todo.Users[_local3].w); }; if (_arg1 < 10000){ _arg1 = 0; }; if (todo.Users[_local3].xNum != _arg1){ todo.Users[_local3].xNum = _arg1; xmessage.DeleteOneUserMc(_local3); }; } public static function NetworkSendExtMessage(_arg1, _arg2=undefined, _arg3=undefined){ var _local5:*; LurkerTimeout = LurkerLimit; var _local4:* = new XMLDocument(); _local5 = _local4.createElement("x"); _local5.attributes.t = (((_arg3 == undefined)) ? "undefined" : _arg3); if (_arg2 != 0){ _local5.attributes.d = (((_arg2 == undefined)) ? "undefined" : _arg2); }; _local5.attributes.u = todo.w_userno; _local5.attributes.i = _arg1; UpdateChannel(_arg1, todo.w_userno); _local4.appendChild(_local5); var _local6:String = xatlib.XMLOrder(_local4, new Array("i", "u", "d", "t")); socket.send(_local6); } public static function NetworkSendxmlExtMessage(_arg1){ LurkerTimeout = LurkerLimit; var _local2:* = new XMLDocument(_arg1); UpdateChannel(_local2.firstChild.attributes.i, todo.w_userno); var _local3:* = ""; if (((!((_local2.toString().indexOf("t=\"/m") == -1))) || (!((_local2.toString().indexOf("t=\"/g") == -1))))){ _local3 = xatlib.XMLOrder(_local2, new Array("j", "i", "u", "t", "p")); } else { _local3 = xatlib.XMLOrder(_local2, new Array("H", "j", "i", "t", "u", "d0", "d2", "q", "N", "n", "a", "h", "v")); }; socket.send(_local3); } public static function NetworkLogin(_arg1, _arg2){ var _local3:* = new XMLDocument(); var _local4:* = _local3.createElement("v"); _local4.attributes.n = _arg1; _local4.attributes.p = _arg2; _local3.appendChild(_local4); socket.send(_local3); } public static function SetNetworkState(_arg1, _arg2){ var _local3:String; NetworkState = _arg1; NetworkTimeout = _arg2; if (main.ButtonLoginMc != undefined){ if (NetworkState == 0){ _local3 = xconst.ST(19); } else { if (NetworkState == 4){ _local3 = xconst.ST(31); } else { _local3 = xconst.ST(32); }; }; main.ButtonLoginMc.SetText(_local3); }; } public static function NetworkTick(){ var _local2:Date; var _local3:*; var _local4:Boolean; var _local5:Number; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:int; if (NetworkTimeout != -1){ NetworkTimeout = (NetworkTimeout - 1); if (NetworkTimeout < 0){ NetworkTimeout = 0; }; }; if (NetworkState == 1){ auserLoaded(); if (NetworkTimeout == 0){ SetNetworkState(0, -1); xatlib.xLog("AT"); xatlib.GeneralMessage(xconst.ST(100), (xconst.ST(98) + " (AT)")); }; } else { if (NetworkState == 3){ if (NetworkTimeout == 0){ if ((((w_redirectport == undefined)) && (!((todo.w_room == 29749227))))){ SetNetworkState(11, -1); } else { SetNetworkState(0, -1); xatlib.xLog("CT"); xatlib.GeneralMessage(xconst.ST(100), (xconst.ST(98) + " (CT)")); }; }; } else { if (NetworkState == 4){ if (w_redirectport != 80){ Fire = false; }; if (LurkerTimeout != -1){ if (todo.w_userno <= (0x77359400 - 100000)){ if (LurkerTimeout <= 0){ NetworkSendMsg(todo.w_userno, "/KEEPALIVE", 0, 0, 1); } else { LurkerTimeout = (LurkerTimeout - 1); }; }; }; if (((((FailoverMode) && ((todo.lb == "t")))) && (((todo.tick % (12 * 60)) == 0)))){ _local2 = new Date(); _local3 = ((("http://xat.com/web_gear/chat/fail2.htm?failover" + xatlib.xInt((_local2.getTime() / 150000))) + "_") + global.Sock[GetDom(todo.w_useroom)]); xatlib.LoadVariables(_local3, test_xml_onLoad); }; } else { if (NetworkState == 5){ if (NetworkTimeout != -1){ if (NetworkTimeout == 0){ main.logoutbutonPress(); }; } else { main.logoutbutonPress(); }; } else { if (NetworkState == 6){ if (YI != undefined){ if (todo.w_password != undefined){ NetworkLogin(todo.w_email, todo.w_password); WV = true; }; SetNetworkState(7, 120); }; if (NetworkTimeout == 0){ SetNetworkState(0, -1); xatlib.xLog("Y"); xatlib.GeneralMessage(xconst.ST(100), (xconst.ST(98) + " (Y)")); }; } else { if (NetworkState == 7){ if (WC !== 1){ if (((mcCode) && (mcCode.code))){ WC = mcCode.code; chat.mainDlg.removeChild(codeLoad); codeLoad.unloadAndStop(true); mcCode = null; }; }; if ((((WV == false)) && ((WC > 0)))){ myOnJoin(); }; } else { if (NetworkState == 8){ _local4 = (w_redirectport == undefined); SetNetworkState(0, -1); w_redirectport = todo.useport; todo.lb = "n"; todo.DoUpdate = true; NetworkClose(); if (_local4){ main.logoutbutonPress(); }; } else { if (NetworkState == 9){ FailoverMode = false; SetNetworkState(0, -1); w_redirectport = undefined; w_redirectdom = undefined; todo.lb = "n"; todo.DoUpdate = true; NetworkClose(); main.logoutbutonPress(); } else { if (NetworkState == 11){ if (Fire == true){ _local2 = new Date(); _local3 = ((("http://www.xat.com/web_gear/chat/fail2.htm?firewall" + xatlib.xInt((_local2.getTime() / 300000))) + "_") + global.Sock[GetDom(todo.w_useroom)]); xatlib.LoadVariables(_local3, test_xml_onLoad); SetNetworkState(12, (8 * 12)); } else { _local5 = 0; while (_local5 < SockStatus.length) { SockStatus[_local5] = 0; _local5++; }; FailoverMode = true; w_redirectdom = global.Sock2[GetDom(todo.w_useroom)]; SetNetworkState(8, -1); }; } else { if (NetworkState == 12){ if (NetworkTimeout != -1){ if (NetworkTimeout == 0){ _local5 = 0; while (_local5 < SockStatus.length) { SockStatus[_local5] = 0; _local5++; }; FailoverMode = true; w_redirectdom = global.Sock2[GetDom(todo.w_useroom)]; SetNetworkState(8, -1); }; }; } else { if (NetworkState == 13){ _local4 = (w_redirectport == undefined); SetNetworkState(0, -1); w_redirectport = 80; w_redirectdom = global.fwd; todo.lb = "n"; todo.DoUpdate = true; NetworkClose(); if (_local4){ main.logoutbutonPress(); }; }; }; }; }; }; }; }; }; }; }; }; MessageCount = (MessageCount - 1); if (MessageCount < 0){ MessageCount = 0; }; if (((((!((todo.MessageToProcess == ""))) && (!((todo.lb == "n"))))) && (GotDone))){ main.ProcessMessage(); }; if (((((((!((todo.MessageToSend == ""))) && ((MessageCount <= 0)))) && (!((todo.lb == "n"))))) && (GotDone))){ if (((todo.w_k1) && (!((todo.MessageToSend.indexOf(todo.w_k1.toString()) == -1))))){ todo.MessageToSend = xatlib.Replace(todo.MessageToSend, todo.w_k1.toString(), Math.floor((Math.random() * 0x80000000)).toString()); }; if (((todo.w_k3) && (!((todo.MessageToSend.indexOf(todo.w_k3.toString()) == -1))))){ todo.MessageToSend = xatlib.Replace(todo.MessageToSend, todo.w_k3.toString(), Math.floor((Math.random() * 0x80000000)).toString()); }; _local6 = xatlib.CountLinks(todo.MessageToSend); if (_local6 <= 2){ NetworkSendMsg(todo.w_userno, todo.MessageToSend, todo.PrivateChat, todo.PrivateMessage, 0); todo.PrivateChat = (todo.PrivateMessage = 0); main.lockmc._visible = false; if ((((todo.messageecho == "l")) && ((_local6 > 0)))){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, todo.w_userno, todo.MessageToSend); }; }; }; MessageCount = 25; todo.LastMessageToSend = todo.MessageToSend; todo.MessageToSend = ""; }; if (((((((((((!((todo.w_registered == undefined))) && (FI))) && (((todo.tick % 12) == 6)))) && ((todo.lb == "t")))) && (GotDone))) && ((((w_redirectport == undefined)) || ((w_redirectport == 80)))))){ _local7 = todo.w_friendlist.length; if (fs > 0){ xatlib.MainSolWrite("w_friendlist2", todo.w_friendlist2); }; fs = 0; _local5 = 0; while (_local5 < _local7) { _local8 = todo.w_friendlist[_local5].u; if ((((_local8 > 6)) && ((todo.w_friendlist2[_local8] == undefined)))){ _local9 = ""; if (todo.w_friendlist[_local5].u != todo.w_userno){ _local9 = ((((((("/b " + todo.w_friendlist[_local5].u) + ",") + "1") + ",") + "") + ",") + todo.w_friendlist[_local5].n.substr(0, 20)); } else { if (todo.w_Mask == undefined){ todo.w_Mask = todo.NO_POWERS.slice(); }; _local9 = ((((((((((((("/b " + todo.w_friendlist[_local5].u) + ",") + "1") + ",") + "") + ",") + todo.w_friendlist[_local5].n.substr(0, 128)) + ",") + todo.w_friendlist[_local5].a.toString().substr(0, 128)) + ",") + todo.w_friendlist[_local5].h.substr(0, 128)) + ",") + todo.w_friendlist[_local5].v.toString()); _local10 = 0; while (_local10 < todo.MAX_PWR_INDEX) { _local9 = (_local9 + ("," + xatlib.xInt(todo.w_Mask[_local10]))); _local10++; }; }; NetworkSendMsg(todo.w_userno, _local9, 0, 0, 2); todo.w_friendlist2[_local8] = {flags:1}; if (++fs >= 5){ break; }; }; _local5++; }; if (fs == 0){ FI = false; }; }; var _local1:* = getTimer(); if ((((todo.lb == "t")) && ((_local1 > UngagTimeout)))){ _local5 = xatlib.FindUser(todo.w_userno); todo.Users[_local5].gagged = false; todo.DoBuildUserList = true; UngagTimeout = undefined; }; } public static function test_xml_onLoad(_arg1:Event){ var _local2:URLLoader = URLLoader(_arg1.target); var _local3:* = new XML(_local2.data); var _local4:* = false; var _local5:String = _local3.attribute("d"); if (_local5){ _local4 = true; SockStatus = _local5.split(","); }; if (FailoverMode){ if (((_local4) && ((numAlive(GetDom(todo.w_useroom)) > 0)))){ setIps(); SetNetworkState(9, -1); }; } else { if (((_local4) && (ipAlive(global.Sock[GetDom(todo.w_useroom)])))){ SetNetworkState(13, -1); } else { if (numAlive(GetDom(todo.w_useroom)) == 0){ FailoverMode = true; w_redirectdom = global.Sock2[GetDom(todo.w_useroom)]; SetNetworkState(8, -1); } else { setIps(); w_redirectdom = global.Sock[GetDom(todo.w_useroom)]; SetNetworkState(8, -1); }; }; }; test_xml = undefined; } public static function auserLoaded(){ var Port:* = undefined; var IsBanned:* = false; var vx:* = undefined; var so4:* = undefined; var rn:* = undefined; if (UserId == undefined){ } else { if (UserId == 0){ SetNetworkState(0, -1); xatlib.xLog("A"); xatlib.GeneralMessage(xconst.ST(100), (xconst.ST(98) + " (A)")); todo.lb = "n"; todo.DoUpdate = true; } else { var catchIOError:* = function (_arg1:IOErrorEvent){ if (NetworkState == 3){ NetworkTimeout = 0; }; }; var catchSecurityError:* = function (_arg1:SecurityErrorEvent):void{ }; if (UserId != 2){ todo.w_userno = xatlib.xInt(UserId); todo.w_k1 = xatlib.xInt(k1); todo.w_k2 = xatlib.xInt(k2); so4 = xatlib.getLocal("chat", "/"); so4.objectEncoding = ObjectEncoding.AMF0; if (((1) && (!((so4 == null))))){ so4.data.w_userno = xatlib.xInt(todo.w_userno); so4.data.w_userrev = todo.w_userrev; so4.data.w_k1b = todo.w_k1; so4.data.w_k2 = todo.w_k2; so4.flush(); }; if (todo.w_name == ""){ todo.w_name = xatlib.GetDefaultName(todo.w_userno); }; if (todo.w_avatar == ""){ todo.w_avatar = xatlib.GetDefaultAvatar(todo.w_userno); }; if (todo.w_homepage == ""){ todo.w_homepage = ""; }; } else { rn = xatlib.xInt((Math.random() * 1000000)); if (todo.w_name == ""){ todo.w_name = xatlib.GetDefaultName(rn); }; if (todo.w_avatar == ""){ todo.w_avatar = xatlib.GetDefaultAvatar(rn); }; if (todo.w_homepage == ""){ todo.w_homepage = ""; }; }; IsBanned = OnGagList(todo.w_useroom); vx = todo.Macros; xmessage.ClearLists(true); todo.Users.push({ n:xatlib.NameNoXat(todo.w_name), s:((todo.Macros)!=undefined) ? todo.Macros["status"] : undefined, u:todo.w_userno, v:todo.w_userrev, a:todo.w_avatar, h:todo.w_homepage, online:true, banned:IsBanned, owner:false, OnXat:!(((xatlib.xInt(global.xc) & 32) == 0)), registered:todo.w_registered, VIP:todo.w_VIP, Bride:todo.w_d2, aFlags:todo.w_d0, Powers:todo.w_Powers, cb:todo.w_cb }); AddGiftPower(0); todo.DoBuildUserList = true; todo.DoUpdateMessages = true; todo.ScrollDown = true; todo.LastScrollTime = undefined; if (w_redirectport != undefined){ Port = w_redirectport; todo.sockdomain = w_redirectdom; } else { todo.sockdomain = global.Sock[GetDom(todo.w_useroom)]; Port = GetPort(todo.w_useroom); }; socket = new XMLSocket(); socket.addEventListener(Event.CONNECT, myOnConnect); socket.addEventListener(DataEvent.DATA, myOnXML); socket.addEventListener(Event.CLOSE, socketClose); socket.addEventListener(IOErrorEvent.IO_ERROR, catchIOError); socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, catchSecurityError); todo.useport = Port; sjt = getTimer(); Security.loadPolicyFile((("xmlsocket://" + todo.sockdomain) + ":10090")); socket.connect(todo.sockdomain, todo.useport); SetNetworkState(3, ((w_redirectport)==undefined) ? 120 : 180); }; }; } public static function socketClose(_arg1:Event){ if (w_redirectport == undefined){ SetNetworkState(5, Math.floor(((Math.random() * 12) * 4))); todo.lb = "n"; todo.DoUpdate = true; }; } public static function myOnConnect(_arg1:Event){ var _local3:*; var _local4:*; var _local5:String; var _local2:* = true; if (NetworkState == 3){ if (_local2){ YI = undefined; _local3 = new XMLDocument(); _local4 = _local3.createElement("y"); if (todo.useport == 80){ _local4.attributes.p = GetPort(todo.w_useroom); _local4.attributes.s = GetDom(todo.w_useroom); }; if (todo.pass != undefined){ _local4.attributes.m = 1; }; _local4.attributes.r = todo.w_useroom; _local3.appendChild(_local4); _local5 = xatlib.XMLOrder(_local3, new Array("w", "r", "m", "s", "p")); socket.send(_local5); SetNetworkState(6, 120); } else { if (w_redirectport == undefined){ SetNetworkState(11, -1); } else { SetNetworkState(0, -1); todo.lb = "n"; todo.DoUpdate = true; xatlib.GeneralMessage(xconst.ST(100), (xconst.ST(98) + " (F)")); }; }; //unresolved jump }; } public static function myOnJoin(){ var _local8:int; SetNetworkState(4, -1); todo.DoUserSnd = true; var _local1:String = xatlib.CleanTextNoXat(todo.w_name); var _local2:String = xatlib.CleanText(todo.w_avatar); var _local3:String = xatlib.CleanText(todo.w_homepage); if (_local1 == null){ _local1 = ""; }; if (_local2 == null){ _local2 = ""; }; if (_local3 == null){ _local3 = ""; }; GotDone = false; var _local4:* = new XMLDocument(); var _local5:* = _local4.createElement("j2"); _local5.attributes.v = ((todo.w_userrev)==undefined) ? 0 : todo.w_userrev; _local5.attributes.h = _local3.substr(0, 128); _local5.attributes.a = _local2.substr(0, 128); _local5.attributes.n = _local1.substr(0, 0x0100); if (todo.Macros != undefined){ if (todo.Macros["status"] != undefined){ _local5.attributes.n = (_local5.attributes.n + ("##" + todo.Macros["status"].substr(0, 128))); }; }; if (todo.w_registered != undefined){ _local5.attributes.N = todo.w_registered; }; if (todo.w_dt){ _local5.attributes.dt = todo.w_dt; }; if (todo.w_xats){ _local5.attributes.dx = todo.w_xats; }; if (todo.w_sn){ _local5.attributes.sn = todo.w_sn; }; if (todo.w_PowerO != undefined){ _local5.attributes.dO = todo.w_PowerO; }; if (todo.w_Powers != null){ _local8 = 0; while (_local8 < todo.MAX_PWR_INDEX) { if (todo.w_Powers[_local8]){ _local5.attributes[("d" + (_local8 + 4))] = todo.w_Powers[_local8]; }; _local8++; }; }; if (todo.w_d3){ _local5.attributes.d3 = todo.w_d3; }; if (todo.w_d2){ _local5.attributes.d2 = todo.w_d2; }; if (todo.w_d0 != undefined){ _local5.attributes.d0 = todo.w_d0; }; if (todo.w_Mask != null){ _local8 = 0; while (_local8 < todo.MAX_PWR_INDEX) { if (todo.w_Mask[_local8]){ _local5.attributes[("m" + _local8)] = todo.w_Mask[_local8]; }; _local8++; }; }; _local5.attributes.u = ((todo.w_userrev)==undefined) ? 2 : todo.w_userno; if (global.rf){ _local5.attributes.e = "1"; }; _local5.attributes.f = ((((global.um)!=undefined) ? 0 : (((todo.w_autologin & 1)) ? 0 : 1) | ((todo.LoginPressed) ? 2 : 0)) | ((global.pass)!=undefined) ? 4 : 0); todo.w_autologin = (todo.w_autologin | 1); if (((todo.pass) || (!((global.pass == undefined))))){ _local5.attributes.r = ((global.pass)!=undefined) ? global.pass : todo.pass; }; if (OnGagList(todo.w_useroom)){ _local5.attributes.b = GetGagTime(todo.w_useroom); }; _local5.attributes.c = todo.w_useroom; if (todo.w_pool != undefined){ _local5.attributes.p = todo.w_pool; }; if ((((w_redirectport == undefined)) && ((todo.forceport == undefined)))){ _local5.attributes.z = 12; }; if (todo.w_d1){ _local5.attributes.d1 = todo.w_d1; }; _local5.attributes.k3 = xatlib.xInt(todo.w_k3); _local5.attributes.k = todo.w_k1; _local5.attributes.y = YI; if ((global.xc & 32)){ _local5.attributes.q = 1; }; _local5.attributes.l2 = jt1; _local5.attributes.l3 = jt2; _local5.attributes.l4 = (getTimer() - sjt); var _local6:BitmapData = new BitmapData(p_w, p_h, false, 0xCCCCCC); _local6.perlinNoise(p_w, p_h, p_octaves, p_seed, false, true, (((BitmapDataChannel.ALPHA | BitmapDataChannel.RED) | BitmapDataChannel.GREEN) | BitmapDataChannel.BLUE), false, null); _local5.attributes.l5 = _local6.getPixel32(p_x, p_y); if (WC > 1){ _local5.attributes.Y = WC; }; _local5.attributes.cb = todo.w_cb; _local6.dispose(); _local4.appendChild(_local5); if (!J2_Order){ J2_Order = "cb,Y,l5,l4,l3,l2,q,y,k,k3,d1,z,p,c,b,r,f,e,u"; _local8 = 0; while (_local8 < todo.MAX_PWR_INDEX) { J2_Order = (J2_Order + (",m" + _local8)); _local8++; }; J2_Order = (J2_Order + ",d0"); _local8 = 2; while (_local8 < (todo.MAX_PWR_INDEX + 4)) { J2_Order = (J2_Order + (",d" + _local8)); _local8++; }; J2_Order = (J2_Order + ",dO,sn,dx,dt,N,n,a,h,v"); J2_Order = J2_Order.split(","); }; var _local7:String = xatlib.XMLOrder(_local4, J2_Order); socket.send(_local7); todo.lb = "t"; todo.OnSuper = true; todo.DoUpdate = true; todo.ResetSmilies = true; LurkerTimeout = LurkerLimit; if (todo.messageecho == "s"){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, 0, "i"); }; }; if (todo.messageecho == "a"){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, 0, "d"); }; }; xatlib.MainSolWrite("w_lastroom", todo.w_useroom); } public static function myOnXML(_arg1:DataEvent){ var u:* = undefined; var UserIndex:* = undefined; var n:* = undefined; var stra:* = undefined; var t:* = 0; var uid:* = 0; var s:* = undefined; var vx:* = undefined; var str:* = null; var pstr:* = undefined; var gpa:* = undefined; var ll:* = undefined; var j:* = undefined; var c:* = undefined; var temp_comm:* = undefined; var IsPrivateMessage:* = false; var IsPrivateChat:* = false; var IsNew:* = false; var IsDeleteMessage:* = undefined; var IsGagUser:* = undefined; var IsUnGagUser:* = undefined; var IsMakeUser:* = undefined; var IsUnMakeUser:* = undefined; var IsKickUser:* = undefined; var IsUnknown:* = undefined; var IsControlMessage:* = undefined; var IsLocateUser:* = undefined; var IsAtUser:* = undefined; var IsScroller:* = undefined; var FirstTwo:* = undefined; var IsSlash:* = undefined; var tgagged:* = undefined; var tbanned:* = undefined; var tfriend:* = undefined; var tmodplus:* = undefined; var IsIgnored:* = false; var strText:* = null; var lc:* = undefined; var Links:* = undefined; var Payload:* = undefined; var TypeOn:* = undefined; var TypeOff:* = undefined; var farray:* = null; var id:* = undefined; var so93:* = undefined; var friobj:* = null; var pci:* = undefined; var ptime:* = undefined; var i:* = NaN; var len:* = undefined; var tt:* = undefined; var TabsLength:* = undefined; var uuid:* = undefined; var arg:* = undefined; var selfid:* = NaN; var loctext:* = undefined; var pp:* = undefined; var ii:* = undefined; var d:* = undefined; var g:* = undefined; var msgno:* = undefined; var v:* = undefined; var NoBanMessage:* = undefined; var BanTime:* = undefined; var my_date:* = null; var UnfairTitle:* = null; var UnfairReport:* = null; var hh:* = undefined; var so47:* = undefined; var vt:* = undefined; var nopc:* = undefined; var nom:* = undefined; var maxpc:* = undefined; var maxm:* = undefined; var RemoveMessage:* = undefined; var HaveTab:* = undefined; var AllowPC:* = undefined; var TabNumber:* = NaN; var self:* = NaN; var IsMainOwner:* = false; var IsOwner:* = false; var IsModerator:* = false; var IsMember:* = false; var IsOnline:* = false; var IsBanned:* = false; var IsForever:* = false; var IsGagged:* = false; var OnXat:* = false; var IsVIP:* = false; var Powers:* = undefined; var IsStealth:* = false; var cc:* = undefined; var a:* = undefined; var ee:* = undefined; var StringIndex:* = 0; var type:* = undefined; var Text:* = undefined; var left:* = NaN; var RndOr:* = undefined; var Rnd2:* = undefined; var q:* = undefined; var sarray:* = null; var p:* = undefined; var doautoredirect:* = false; var reason:* = undefined; var bootr:* = undefined; var errnum:* = 0; var event:* = _arg1; var doc:* = new XMLDocument(event.data); var e:* = doc.firstChild; if (e.attributes.n != undefined){ e.attributes.n.replace(xatlib.r1, ""); e.attributes.n.replace(xatlib.r2, ""); }; if (e.attributes.t != undefined){ e.attributes.t.replace(xatlib.r1, ""); e.attributes.t.replace(xatlib.r2, ""); }; if (e != null){ u = xatlib.xInt(e.attributes.u); UserIndex = xatlib.FindUser(u); if (((e.attributes.t) && ((e.attributes.u > 0)))){ n = 0; while (n < e.attributes.t.length) { if (e.attributes.t.charCodeAt(n) < 32){ return; }; n = (n + 1); }; }; if (e.nodeName == "y"){ YI = xatlib.xInt(e.attributes.i); jt2 = (getTimer() - sjt); YC = xatlib.xInt(e.attributes.c); YC2 = getTimer(); if (e.attributes.cb){ global.sv = e.attributes.cb; }; todo.WY = { i:e.attributes.i, k:e.attributes.k, j:e.attributes.j, t:e.attributes.t, s:e.attributes.s }; if (e.attributes.j){ WC = todo.WY; doCode(); } else { WC = 1; }; if (e.attributes.p){ stra = e.attributes.p.split("_"); p_w = xatlib.xInt(stra[0]); p_h = xatlib.xInt(stra[1]); p_octaves = xatlib.xInt(stra[2]); p_seed = xatlib.xInt(stra[3]); t = (YI % (p_w * p_h)); p_x = (t % p_w); p_y = Math.floor((t / p_w)); }; } else { if (e.nodeName == "x"){ UpdateChannel(e.attributes.i, e.attributes.u); if (((((((((!((e.attributes.i == 10001))) || (!((e.attributes.t.substr(0, 1) == "b"))))) || (todo.Users[UserIndex].mainowner))) || (todo.Users[UserIndex].owner))) || (todo.Users[UserIndex].moderator))){ if ((((e.attributes.i >= 40000)) && ((e.attributes.i < 50000)))){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", e.attributes.i, e.attributes.u, e.toString()); }; } else { if ((((((e.attributes.i == 10000)) && ((e.attributes.t.substr(0, 1) == "B")))) && ((todo.HasPower(selfid, 44) == false)))){ } else { if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", e.attributes.i, e.attributes.u, e.attributes.t); }; if ((((e.attributes.i == 10001)) && ((e.attributes.t.substr(0, 1) == "b")))){ xatlib.UpdateDJ(e.attributes.u); }; }; }; }; } else { if (e.nodeName == "a"){ uid = xatlib.FindUser(e.attributes.u); if ((((((e.attributes.u == todo.w_userno)) || ((uid < 0)))) || (!((todo.Users[uid].ignored == true))))){ xkiss.Kiss({ t:e.attributes.t, u:e.attributes.u, k:e.attributes.k, b:e.attributes.b, f:e.attributes.f, x:e.attributes.x, s:e.attributes.s }); }; if (e.attributes.c != undefined){ todo.w_coins = xatlib.xInt(e.attributes.c); xatlib.MainSolWrite("w_coins", todo.w_coins); }; } else { if (e.nodeName == "bl"){ xkiss.LoadWink(e); } else { if (e.nodeName == "v"){ if (e.attributes.e != undefined){ t = xatlib.xInt(e.attributes.t); switch (_local3){ case 6: s = xconst.ST(164); break; case 8: s = xconst.ST(165); break; case 10: s = xconst.ST(166); break; case 11: s = xconst.ST(167); break; case 13: s = xconst.ST(25); break; case 14: s = xconst.ST(168); break; case 15: s = xconst.ST(169); break; case 16: s = xconst.ST(170); break; case 17: s = xconst.ST(171); break; case 18: s = xconst.ST(172); break; case 22: s = xconst.ST(173); break; case 24: s = xconst.ST(187, t.toString()); break; case 36: s = xconst.ST(215); break; case 38: s = xconst.ST(234); if (t){ s = (s + (" " + xconst.ST(235, t.toString()))); }; break; case 50: s = "Single power prevents this"; break; default: s = ((xconst.ST(174) + " ") + n); }; if (n != 39){ xatlib.GeneralMessage(xconst.ST(175), s); }; if (e.attributes.m == undefined){ todo.w_d0 = (todo.w_bride = (todo.w_registered = (todo.w_VIP = (todo.w_Powers = undefined)))); todo.w_k3 = 0; todo.w_PowerO = 0; todo.w_sn = 0; todo.w_xats = 0; todo.w_d2 = (todo.w_d3 = (todo.w_dt = (todo.w_coins = 0))); if ((((todo.w_email == 0)) && ((todo.w_password == "$0")))){ SaveRegData(); try { main.mcLoad.LoggedIn(1); } catch(e:Error) { }; } else { try { main.mcLoad.LoggedIn(0); } catch(e:Error) { }; }; }; } else { todo.w_userno = e.attributes.i; todo.w_userrev = 0; todo.w_k1 = e.attributes.k1; todo.w_d0 = e.attributes.d0; todo.w_d1 = e.attributes.d1; todo.w_d2 = xatlib.xInt(e.attributes.d2); todo.w_d3 = xatlib.xInt(e.attributes.d3); todo.w_dt = xatlib.xInt(e.attributes.dt); todo.w_Powers = []; t = 0; while (t < todo.MAX_PWR_INDEX) { todo.w_Powers.push(xatlib.xInt(e.attributes[("d" + (t + 4))])); t = (t + 1); }; todo.w_PowerO = e.attributes.dO; t = xatlib.FindUser(todo.w_d2); if (t >= 0){ todo.w_bride = todo.Users[t].registered; }; todo.w_coins = xatlib.xInt(e.attributes.c); todo.w_xats = e.attributes.dx; todo.w_sn = e.attributes.sn; if (todo.w_xats){ todo.w_coins = xatlib.xInt(todo.w_xats); }; todo.w_registered = e.attributes.n; todo.w_k2 = e.attributes.k2; todo.w_k3 = e.attributes.k3; todo.w_cb = YC; SaveRegData(); if (((todo.WV2) || (e.attributes.RL))){ todo.lb = "n"; todo.DoUpdate = true; NetworkClose(); main.logoutbutonPress(); todo.WV2 = false; }; vx = todo.Macros; xmessage.ClearLists(true); todo.Users.push({ n:xatlib.NameNoXat(todo.w_name), s:((todo.Macros)!=undefined) ? todo.Macros["status"] : undefined, u:todo.w_userno, v:todo.w_userrev, a:todo.w_avatar, h:todo.w_homepage, online:true, banned:IsBanned, owner:false, OnXat:!(((xatlib.xInt(global.xc) & 32) == 0)), registered:todo.w_registered, VIP:todo.w_VIP, Bride:todo.w_d2, aFlags:todo.w_d0, Powers:todo.w_Powers }); AddGiftPower(0); todo.DoBuildUserList = true; todo.DoUpdateMessages = true; todo.ScrollDown = true; todo.LastScrollTime = undefined; try { main.mcLoad.LoggedIn(1); } catch(e:Error) { }; if (todo.messageecho == "s"){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, 0, "l"); }; }; }; todo.w_password = undefined; WV = false; } else { if (e.nodeName == "ap"){ str = " "; pstr = xconst.pssa[(xatlib.xInt(e.attributes.p) + 1)]; switch (xatlib.xInt(e.attributes.r)){ case 0: str = xconst.ST(239, pstr); break; case 1: str = xconst.ST(240, pstr); break; case 2: str = xconst.ST(241, pstr); break; case 3: str = xconst.ST(242, pstr); break; case 4: str = (pstr + " already assigned"); break; case 9: str = (pstr + " system error (db down)"); break; default: str = (pstr + " unknown errorcode"); }; xatlib.GeneralMessage(xconst.ST(237), str); } else { if (e.nodeName == "gp"){ gpa = e.attributes.p.split("|"); ll = 0; while (ll < gpa.length) { todo.w_GroupPowers[ll] = xatlib.xInt(gpa[ll]); ll = (ll + 1); }; for (ll in e.attributes) { if (ll.charAt(0) == "g"){ if (todo.HasPowerA(todo.w_GroupPowers, xatlib.xInt(ll.substr(1)))){ todo.gconfig[ll] = e.attributes[ll]; if (todo.gconfig[ll].charAt(0) == "{"){ todo.gconfig[ll] = xatlib.xJSONdecode(todo.gconfig[ll]); }; }; }; }; if (todo.gconfig["g100"]){ ll = todo.gconfig["g100"].split(","); todo.gconfig["g100"] = {}; j = 0; while (j < ll.length) { todo.gconfig["g100"][ll[j]] = ll[(j + 1)]; j = (j + 2); }; }; if (todo.HasPowerA(todo.w_GroupPowers, 90)){ xconst.MakeBads(e.attributes.g90); }; if (((todo.HasPowerA(todo.w_GroupPowers, 106)) && (todo.gconfig["g106"]))){ c = todo.gconfig["g106"].split("#"); if (todo.HasPowerA(todo.w_GroupPowers, 130)){ todo.gconfig["g130"] = c.pop(); if (todo.Macros["gback"] === "off"){ delete todo.gconfig["g130"]; }; }; t = 0; while (t < c.length) { c[t] = xatlib.DecodeColor(c[t]); t = (t + 1); }; todo.gconfig["g106"] = c.join("#"); if (!todo.gconfig["g74"]){ todo.gconfig["g74"] = "smile,biggrin,wink,eek,tongue,cool,mad,confused,redface,frown,crying,sleepy,rolleyes,star,kiss,vampire,pirate"; todo.w_GroupPowers[2] = (todo.w_GroupPowers[2] | 0xFFFF); }; }; if (todo.HasPowerA(todo.w_GroupPowers, 206)){ temp_comm = ((("http://xat.com/json/lang/customlang2.php?t=" + todo.w_room_cb) + "&r=") + todo.w_useroom); xatlib.LoadVariables(temp_comm, chat.onLang); }; } else { if ((((((((e.nodeName == "m")) || ((e.nodeName == "p")))) || ((e.nodeName == "c")))) || ((e.nodeName == "z")))){ if (((!(GotDone)) && ((global.xc & 0x8000)))){ return; }; IsPrivateMessage = false; IsPrivateChat = false; IsNew = true; IsDeleteMessage = false; IsGagUser = false; IsUnGagUser = false; IsMakeUser = false; IsUnMakeUser = false; IsKickUser = false; IsUnknown = false; IsControlMessage = false; IsLocateUser = false; IsAtUser = false; IsScroller = false; if (!e.attributes.t){ e.attributes.t = ""; }; FirstTwo = e.attributes.t.substr(0, 2); IsSlash = (FirstTwo.substr(0, 1) == "/"); if (e.attributes.u == 0){ IsScroller = false; }; if ((((e.nodeName == "p")) || ((e.nodeName == "z")))){ IsPrivateMessage = true; }; if (e.nodeName == "c"){ IsControlMessage = true; }; if ((e.attributes.s & 1)){ IsNew = false; }; if (((IsPrivateMessage) && ((e.attributes.s & 2)))){ IsPrivateChat = true; }; if (((((!(IsSlash)) && ((e.nodeName == "m")))) && ((e.attributes.u == undefined)))){ return; }; if (e.attributes.t.indexOf("") != -1){ IsSlash = true; }; e.attributes.t = xatlib.Replace(e.attributes.t, ">", " "); if (((((IsPrivateMessage) && (!(IsPrivateChat)))) && (!(IsSlash)))){ e.attributes.t = (" " + e.attributes.t); }; if (IsSlash){ if (FirstTwo == "/d"){ IsDeleteMessage = true; }; if (FirstTwo == "/s"){ IsScroller = true; }; if ((((e.nodeName == "c")) && ((FirstTwo == "/g")))){ IsGagUser = true; }; if ((((e.nodeName == "c")) && ((FirstTwo == "/u")))){ IsUnGagUser = true; }; if ((((e.nodeName == "c")) || ((e.nodeName == "p")))){ if (FirstTwo == "/m"){ IsMakeUser = true; }; if (FirstTwo == "/r"){ IsUnMakeUser = true; }; if (FirstTwo == "/k"){ IsKickUser = true; }; }; if (e.nodeName == "z"){ if (FirstTwo == "/l"){ IsLocateUser = true; }; if (FirstTwo == "/a"){ IsAtUser = true; }; }; if (FirstTwo == "/R"){ Payload = e.attributes.t.substr(2); TypeOn = (Payload == "TypeOn"); TypeOff = (Payload == "TypeOff"); if (((TypeOn) || (TypeOff))){ if (((((TypeOff) || (IsPrivateMessage))) || (!(main.ctabsmc.TabIsPrivate())))){ main.SetTyping(u, TypeOn); }; }; return; }; if (FirstTwo == "/b"){ if (e.attributes.t == "/bd"){ todo.w_friendlist.length = 0; todo.w_friendlist2 = new Object(); } else { if (e.attributes.t == "/bf"){ xatlib.MainSolWrite("w_friendlist", todo.w_friendlist); xatlib.MainSolWrite("w_friendlist2", todo.w_friendlist2); } else { farray = e.attributes.t.substr(3).split(","); id = xatlib.xInt(farray[0]); if (id == todo.w_userno){ so93 = xatlib.getLocal("chat", "/"); so93.objectEncoding = ObjectEncoding.AMF0; if (((1) && (!((so93 == null))))){ todo.w_name = (so93.data.w_name = xatlib.CleanTextNoXat(farray[3])); todo.w_avatar = (so93.data.w_avatar = ((farray[4])!=undefined) ? xatlib.CleanAv(farray[4]) : ""); todo.w_homepage = (so93.data.w_homepage = ((farray[5])!=undefined) ? xatlib.UrlAv(farray[5]) : ""); todo.w_userrev = (so93.data.w_userrev = ((farray[6])!=undefined) ? farray[6] : 0); if (farray[7].indexOf("|") != -1){ todo.w_Mask = (so93.data.w_Mask = farray[7].split("|")); }; uid = xatlib.FindUser(todo.w_userno); if (uid != -1){ todo.Users[uid].n = todo.w_name; todo.DoBuildUserList = true; xmessage.DeleteOneUserMc(uid); }; so93.flush(); }; } else { if (todo.w_friendlist2[id] == undefined){ friobj = new Object(); friobj.u = id; friobj.v = 0; friobj.n = xatlib.CleanTextNoXat(farray[3]); friobj.a = ""; friobj.h = ""; todo.w_friendlist.push(friobj); if (todo.w_friendlist2[id] == undefined){ todo.w_friendlist2[id] = new Object(); }; todo.w_friendlist2[id].flags = (xatlib.xInt(todo.w_friendlist2[id].flags) | 1); }; }; }; }; }; if (FirstTwo == "/p"){ pci = xatlib.xInt(e.attributes.t.indexOf(",")); if (pci != -1){ i = xatlib.FindUser(todo.w_userno); todo.Users[i].gagged = true; todo.DoBuildUserList = true; UngagTimeout = (getTimer() + (xatlib.xInt(e.attributes.t.substr((pci + 1))) * 1000)); }; ptime = 0; if (pci == -1){ ptime = xatlib.xInt(e.attributes.t.substr(2)); } else { ptime = xatlib.xInt(e.attributes.t.substr(2, (pci - 1))); }; id = ((" (" + e.attributes.d) + ")"); if (ptime == 0){ } else { if (ptime == -1){ len = todo.Users.length; tt = 0; while (tt < len) { todo.Users[tt].gagged = undefined; tt = (tt + 1); }; todo.DoBuildUserList = true; todo.helpstr = (xconst.ST(192) + id); todo.HelpUpdate = 0; } else { if (((!(e.attributes.T)) || ((e.attributes.T == " ")))){ todo.helpstr = (xconst.ST(193, Math.ceil((ptime / 60)).toString(), "3") + id); } else { todo.helpstr = (((xconst.ST(261) + " /p") + e.attributes.T) + id); }; todo.HelpUpdate = 0; }; }; }; if (FirstTwo == "/t"){ TabsLength = main.ctabsmc.tabs.length; tt = 0; while (tt < TabsLength) { if ((((main.ctabsmc.tabs[tt].User == u)) && ((main.ctabsmc.tabs[tt].Flags & 16)))){ xkiss.Kiss({ t:e.attributes.t.substr(2), u:e.attributes.u, k:"Ttth" }); main.Private_onDelete(tt); break; }; tt = (tt + 1); }; }; if (e.nodeName == "m"){ if ((((((((((((FirstTwo == "/g")) || ((FirstTwo == "/u")))) || ((FirstTwo == "/m")))) || ((FirstTwo == "/r")))) || ((FirstTwo == "/k")))) || ((FirstTwo == "/n")))){ if (e.attributes.p != undefined){ e.attributes.p = xatlib.Replace(e.attributes.p, ">", " "); }; uid = xatlib.FindUser(e.attributes.d); if (uid != -1){ if (FirstTwo == "/g"){ if (e.attributes.t.substr(0, 3) == "/gg"){ e.attributes.t = SysMsg(5, undefined, uid, e.attributes.p, xatlib.xInt(e.attributes.t.substr(3))); } else { if (e.attributes.t.substr(0, 3) == "/gm"){ e.attributes.t = SysMsg(6, undefined, uid, e.attributes.p, xatlib.xInt(e.attributes.t.substr(3))); } else { e.attributes.t = SysMsg(2, undefined, uid, e.attributes.p, xatlib.xInt(e.attributes.t.substr(2)), e.attributes.w); }; }; } else { if (FirstTwo == "/u"){ e.attributes.t = SysMsg(3, undefined, uid, e.attributes.p, xatlib.xInt(e.attributes.t.substr(2))); } else { if (FirstTwo == "/m"){ e.attributes.t = SysMsg(0, e.attributes.p, uid); } else { if (FirstTwo == "/r"){ e.attributes.t = SysMsg(0, "r", uid); } else { if (FirstTwo == "/k"){ uuid = xatlib.FindUser(e.attributes.u); arg = e.attributes.p.split("#"); if ((((arg.length == 2)) && (!(todo.HasPower(uuid, 25))))){ e.attributes.p = arg[0]; }; if ((((arg.length == 3)) && (!(todo.HasPower(uuid, 121))))){ e.attributes.p = arg[0]; }; e.attributes.t = SysMsg(1, undefined, uid, e.attributes.p); } else { if (FirstTwo == "/n"){ e.attributes.t = SysMsg(4, e.attributes.p, uid); }; }; }; }; }; }; IsSlash = false; }; }; }; }; if (!IsSlash){ if (UserIndex >= 0){ }; if ((((UserIndex >= 0)) && ((todo.Users[UserIndex].w == 176)))){ e.attributes.t = xatlib.ReversePower(e.attributes.t); }; e.attributes.t = xatlib.PreProcSmilie(e.attributes.t, !((u == todo.w_userno))); }; if (todo.w_mainowner){ IsGagUser = false; }; MessageCount = 0; if ((((UserIndex == -1)) && (!(IsSlash)))){ if (u != 0){ if ((((todo.FlagBits & xconst.f_Live)) && ((e.nodeName == "m")))){ todo.Users.push({ n:"", u:u, v:0, a:"", h:"", online:((e.nodeName)=="z") ? undefined : false, onsuper:((e.nodeName)=="z") ? true : undefined, owner:false, friend:OnFriendList(u) }); UserIndex = xatlib.FindUser(u); todo.Users[UserIndex].n = xatlib.StripSmilies(xatlib.NameNoXat(e.attributes.n)); todo.Users[UserIndex].a = e.attributes.a; todo.Users[UserIndex].h = e.attributes.h; todo.Users[UserIndex].sn = xatlib.xJSONdecode(e.attributes.sn); todo.Users[UserIndex].v = e.attributes.v; if (todo.Users[UserIndex].n == ""){ todo.Users[UserIndex].n = xatlib.GetDefaultName(todo.Users[UserIndex].u); }; if (todo.Users[UserIndex].a == ""){ todo.Users[UserIndex].a = xatlib.GetDefaultAvatar(todo.Users[UserIndex].u); }; if (todo.Users[UserIndex].h == ""){ todo.Users[UserIndex].h = ""; }; todo.Users[UserIndex].registered = e.attributes.N; todo.Users[UserIndex].q = e.attributes.q; todo.Users[UserIndex].Bride = xatlib.xInt(e.attributes.d2); todo.Users[UserIndex].aFlags = xatlib.xInt(e.attributes.d0); } else { todo.Users.push({ n:"", u:u, v:0, a:"", h:"", online:((e.nodeName)=="z") ? undefined : false, onsuper:((e.nodeName)=="z") ? true : undefined, owner:false, friend:OnFriendList(u) }); UserIndex = xatlib.FindUser(u); }; }; }; tgagged = ((UserIndex)!=-1) ? todo.Users[UserIndex].gagged : false; tbanned = ((UserIndex)!=-1) ? ((todo.Users[UserIndex].banned) && (!((todo.Users[UserIndex].flag0 & 131072)))) : false; tfriend = ((UserIndex)!=-1) ? todo.Users[UserIndex].friend : false; if (((((((((IsPrivateMessage) && (((((tgagged) || (tbanned))) || ((e.attributes.b == 1)))))) && (!(tfriend)))) && (!(IsAtUser)))) && (!(IsLocateUser)))){ return; }; tmodplus = ((UserIndex)!=-1) ? (((((((todo.Users[UserIndex].u < 1000)) || (todo.Users[UserIndex].mainowner))) || (todo.Users[UserIndex].owner))) || (todo.Users[UserIndex].moderator)) : false; if (((((((((((((IsPrivateMessage) && (!(IsPrivateChat)))) && (todo.HasPowerA(todo.w_Powers, 69, todo.w_Mask)))) && (!(tfriend)))) && (!(tmodplus)))) && (!(IsAtUser)))) && (!(IsLocateUser)))){ return; }; if (((IsControlMessage) && (tbanned))){ return; }; if ((e.attributes.q & 2)){ todo.Users[UserIndex].VIP = true; }; if (e.nodeName == "z"){ if (UserIndex != -1){ if (todo.Users[UserIndex].onsuper != true){ xmessage.DeleteOneUserMc(UserIndex); }; todo.Users[UserIndex].onsuper = true; }; } else { if ((((e.nodeName == "m")) && (GotDone))){ if (((!((UserIndex == -1))) && (todo.Users[UserIndex].gagged))){ todo.Users[UserIndex].gagged = false; todo.DoBuildUserList = true; }; if (((!((UserIndex == -1))) && (!((todo.Users[UserIndex].online == true))))){ xmessage.DeleteOneUserMc(UserIndex); }; if (UserIndex != -1){ todo.Users[UserIndex].online = true; }; }; }; if (((!((UserIndex == -1))) && ((todo.Users[UserIndex].online == false)))){ if (e.attributes.n != undefined){ if (UserIndex != -1){ if (e.attributes.n.substr(0, 1) == "$"){ e.attributes.n = e.attributes.n.substr(1); }; todo.Users[UserIndex].n = xatlib.NameNoXat(e.attributes.n); todo.Users[UserIndex].a = e.attributes.a; todo.Users[UserIndex].h = e.attributes.h; todo.Users[UserIndex].v = e.attributes.v; if (todo.Users[UserIndex].n == ""){ todo.Users[UserIndex].n = xatlib.GetDefaultName(todo.Users[UserIndex].u); }; if (todo.Users[UserIndex].a == ""){ todo.Users[UserIndex].a = xatlib.GetDefaultAvatar(todo.Users[UserIndex].u); }; if (todo.Users[UserIndex].h == ""){ todo.Users[UserIndex].h = ""; }; todo.Users[UserIndex].registered = e.attributes.N; xmessage.DeleteOneUserMc(UserIndex); todo.DoUpdateMessages = true; }; }; }; if (((((((!((UserIndex == -1))) && (GotDone))) && ((((todo.Users[UserIndex].n == "")) || ((GetRev(e.attributes.u) > todo.Users[UserIndex].v)))))) && (!(IsSlash)))){ NetworkLocateUser(u); }; if (((!((UserIndex == -1))) && (OnFriendList(todo.Users[UserIndex].u)))){ len = todo.w_friendlist.length; g = 0; while (g < len) { if (todo.w_friendlist[g].u == todo.Users[UserIndex].u){ if (((((!((xatlib.StripSpace_(todo.Users[UserIndex].n) == xatlib.StripSpace_(todo.w_friendlist[g].n)))) || (!((todo.Users[UserIndex].a == todo.w_friendlist[g].a))))) || (!((todo.Users[UserIndex].h == todo.w_friendlist[g].h))))){ UpdateFriendList(todo.Users[UserIndex].u, true); }; break; }; g = (g + 1); }; }; IsIgnored = OnIgnoreList(u); if (((((((((((todo.w_mainowner) || (todo.w_owner))) || (todo.w_moderator))) || ((IgnoreTime(u) < 0)))) && (!(IsPrivateMessage)))) && (!(IsPrivateChat)))){ IsIgnored = false; }; if ((((((((((todo.FlagBits & xconst.f_Live)) && (IsPrivateMessage))) && (!(IsPrivateChat)))) && (!(IsSlash)))) && (!(((((((todo.Users[UserIndex].member) || (todo.Users[UserIndex].moderator))) || (todo.Users[UserIndex].owner))) || (todo.Users[UserIndex].mainowner)))))){ return; }; strText = e.attributes.t; strText = xatlib.CleanText(strText, 1).toLowerCase(); lc = strText.toLowerCase(); if (((((((((!((strText.indexOf("chat.php?") == -1))) || (!((lc.indexOf("freexat") == -1))))) || (!((lc.indexOf("freesub") == -1))))) || (!((lc.indexOf("listchats") == -1))))) || (!((lc.indexOf("llstchats") == -1))))){ if (FirstTwo.substr(0, 1) != "/"){ IsSlash = true; }; }; Links = xatlib.CountLinks(e.attributes.t); if (((((!((UserIndex == -1))) && ((e.nodeName == "m")))) && ((((((((((todo.Users[UserIndex].u > 101)) && (!(todo.Users[UserIndex].member)))) && (!(todo.Users[UserIndex].moderator)))) && (!(todo.Users[UserIndex].owner)))) && (!(todo.Users[UserIndex].mainowner)))))){ if (Links > 0){ IsSlash = true; }; }; if ((((((e.nodeName == "m")) && ((todo.messageecho == "l")))) && ((Links > 0)))){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, e.attributes.u, e.attributes.t); }; }; if (IsLocateUser){ selfid = xatlib.FindUser(todo.w_userno); uid = xatlib.FindUser(u); if ((((u > 101)) && (main.utabsmc.tabs[2]))){ if (uid < 0){ todo.Users.push({ n:"", u:u, v:0, a:"", h:"", TickCnt:todo.Tickled++ }); } else { todo.Users[uid].TickCnt = todo.Tickled++; if (!todo.Users[uid].ignored){ main.utabsmc.ColorTab(2, 0x9900); main.utabsmc.GlowTab(2); main.utabsmc.Notif = true; }; }; }; if ((((todo.Users[selfid].flag0 & 0x0400)) && ((u > 101)))){ } else { if (((((todo.HasPower(selfid, 5)) && ((u > 101)))) && ((((UserIndex == -1)) || (!((todo.Users[UserIndex].online == true))))))){ } else { if (((!(OnIgnoreList(u))) || ((u <= 101)))){ if (((OnFriendList(u)) || ((u <= 101)))){ str = xatlib.GroupUrl(); } else { str = ("_" + xconst.ST(126)); }; if ((getTimer() - LastLocate) > 1150){ if ((((todo.w_userno <= 101)) && ((todo.w_name.substr(0, 2) == "$$")))){ } else { NetworkSendMsg(todo.w_userno, ("/a" + str), 0, u, 0); LastLocate = getTimer(); }; }; }; }; }; } else { if (IsAtUser){ loctext = ""; if (e.attributes.t.substr(0, 3) == "/a_"){ loctext = xconst.ST(126); } else { if (e.attributes.t.substr(2, xconst.usedomain.length) == xconst.usedomain){ loctext = xconst.ST(129, e.attributes.t.substr(2)); } else { loctext = e.attributes.t.substr(2); }; }; UserIndex = xatlib.FindUser(xatlib.xInt(e.attributes.u)); if (todo.Users[UserIndex].UnmaskedPowers == undefined){ todo.Users[UserIndex].UnmaskedPowers = new Array(); }; if (todo.Users[UserIndex].Powers == undefined){ todo.Users[UserIndex].Powers = new Array(); }; pp = 0; while (pp < todo.MAX_PWR_INDEX) { ii = ("p" + pp); if (e.attributes[ii] != undefined){ todo.Users[UserIndex].UnmaskedPowers[pp] = e.attributes[ii]; if (todo.Users[UserIndex].Powers[pp] == undefined){ todo.Users[UserIndex].Powers[pp] = e.attributes[ii]; }; }; pp = (pp + 1); }; if (e.attributes.po != undefined){ todo.Users[UserIndex].PowerO = e.attributes.po; }; todo.Users[UserIndex].n = xatlib.NameNoXat(e.attributes.n); todo.Users[UserIndex].s = xatlib.GetStatus(e.attributes.n); todo.Users[UserIndex].coins = e.attributes.x; todo.Users[UserIndex].days = e.attributes.y; todo.Users[UserIndex].debug = e.attributes.g; i = 0; while (i < main.dialog_layer.numChildren) { d = main.dialog_layer.getChildAt(i); if ((d is DialogActions)){ d.WriteLocation(loctext, e.attributes.u, e.attributes.N); }; i = (i + 1); }; if (e.attributes.n != undefined){ UserIndex = xatlib.FindUser(xatlib.xInt(e.attributes.u)); if (UserIndex != -1){ if (e.attributes.n.substr(0, 1) == "$"){ e.attributes.n = e.attributes.n.substr(1); }; todo.Users[UserIndex].v = e.attributes.v; todo.Users[UserIndex].n = xatlib.NameNoXat(e.attributes.n); todo.Users[UserIndex].u = xatlib.xInt(e.attributes.u); todo.Users[UserIndex].a = e.attributes.a; todo.Users[UserIndex].h = e.attributes.h; todo.Users[UserIndex].sn = xatlib.xJSONdecode(e.attributes.sn); todo.Users[UserIndex].cb = e.attributes.cb; todo.Users[UserIndex].registered = e.attributes.N; if (todo.Users[UserIndex].n == ""){ todo.Users[UserIndex].n = xatlib.GetDefaultName(todo.Users[UserIndex].u); }; if (todo.Users[UserIndex].a == ""){ todo.Users[UserIndex].a = xatlib.GetDefaultAvatar(todo.Users[UserIndex].u); }; if (todo.Users[UserIndex].h == ""){ todo.Users[UserIndex].h = ""; }; xmessage.DeleteOneUserMc(UserIndex); xatlib.PurgeMessageFromUser(todo.Users[UserIndex].u); todo.DoUpdateMessages = true; todo.DoBuildUserList = true; if (todo.Users[UserIndex].tUpd != undefined){ main.ctabsmc.tabs[todo.Users[UserIndex].tUpd].t = (main.ctabsmc.tabs[todo.Users[UserIndex].tUpd].h = todo.Users[UserIndex].n); main.ctabsmc.UpdateTabs(); todo.Users[UserIndex].tUpd = undefined; }; if (OnFriendList(todo.Users[UserIndex].u)){ len = todo.w_friendlist.length; g = 0; while (g < len) { if (todo.w_friendlist[g].u == todo.Users[UserIndex].u){ if (((((!((xatlib.StripSpace_(todo.Users[UserIndex].n) == xatlib.StripSpace_(todo.w_friendlist[g].n)))) || (!((todo.Users[UserIndex].a == todo.w_friendlist[g].a))))) || (!((todo.Users[UserIndex].h == todo.w_friendlist[g].h))))){ UpdateFriendList(todo.Users[UserIndex].u, true); }; break; }; g = (g + 1); }; }; }; }; } else { if (IsKickUser){ uuid = xatlib.FindUser(e.attributes.u); arg = e.attributes.p.split("#"); if ((((arg.length == 3)) && (todo.HasPower(uuid, 121)))){ todo.BumpSound = (todo.CustomSound = arg[1]); todo.DoAudieSnd = true; }; NetworkClose(); SetNetworkState(0, -1); todo.lb = "n"; todo.DoUpdate = true; } else { if (IsDeleteMessage){ msgno = xatlib.xInt(e.attributes.t.substr(2)); if (msgno != 0){ len = todo.Message.length; v = 0; while (v < len) { if (todo.Message[v].n == msgno){ todo.Message[v].ignored = true; }; v = (v + 1); }; todo.DoUpdateMessages = true; }; } else { if (((IsGagUser) || (IsUnGagUser))){ UpdateGagList(todo.w_useroom, xatlib.xInt(e.attributes.t.substr(2)), IsGagUser); i = xatlib.FindUser(todo.w_userno); if (i > -1){ todo.Users[i].banned = ((IsGagUser) ? true : false); xmessage.DeleteOneUserMc(i); xkiss.ClosePuzzle(); }; if (((GotDone) && (IsGagUser))){ UnfairGroupName = ((todo.w_room)==todo.w_useroom) ? ((global.gn)!=undefined) ? xatlib.CleanCommas(global.gn) : xconst.ST(0) : ((todo.BackVars[1])!=undefined) ? xatlib.CleanCommas(todo.BackVars[1]) : xconst.ST(0); if ((((i >= 0)) && (todo.Users[i].w))){ BanTime = GetGagTime(todo.w_useroom); if (BanTime){ BanTime = (BanTime - xatlib.SockTime()); if (BanTime <= (10 * 3600)){ NoBanMessage = true; }; }; }; if (((!(NoBanMessage)) && (!((UnfairGroupName == xconst.ST(0)))))){ my_date = new Date(); t = Number(my_date.getTime()); UnfairFile = (String(xatlib.xInt((Math.random() * 999999))) + t); UnfairMessage = (((((((((((todo.w_useroom + ",") + UnfairGroupName) + ",") + todo.w_userno) + ",") + xatlib.CleanTextNoXat(todo.w_name).substr(0, 128)) + ",") + u) + ",") + xatlib.CleanCommas(xatlib.GetUsername(u))) + ",,"); UnfairTitle = xconst.ST(125); UnfairReport = UnfairTitle; len = todo.Message.length; hh = 0; while (hh < len) { if (((!((todo.Message[hh].s & 2))) && ((((todo.Message[hh].n == 0)) ? true : (todo.Message[hh].d == 0))))){ UnfairMessage = (UnfairMessage + (((((todo.Message[hh].u + ",") + xatlib.CleanCommas(xatlib.GetUsername(todo.Message[hh].u))) + ",") + xatlib.CleanCommas(todo.Message[hh].t)) + ",,")); }; if (todo.Message[hh].u == u){ if (todo.Message[hh].t.substr(0, 20) == (" " + xconst.ST(119))){ UnfairTitle = ((xatlib.GetUsername(todo.Message[hh].u) + " ") + xconst.ST(127)); UnfairReport = todo.Message[hh].t.substr(7); }; }; hh = (hh + 1); }; xatlib.UnfairPopup(UnfairTitle, UnfairReport); }; }; } else { if (((IsMakeUser) || (IsUnMakeUser))){ if (((IsMakeUser) && ((todo.FlagBits & xconst.f_Live)))){ w_redirectport = undefined; }; so47 = xatlib.getLocal(("chat" + String(todo.w_useroom)), "/"); so47.objectEncoding = ObjectEncoding.AMF0; if (IsMakeUser){ todo.w_userrev = xatlib.xInt(todo.w_userrev); so47.data.pass = xatlib.xInt(e.attributes.t.substr(2)); } else { delete so47.data.pass; }; so47.flush(); i = xatlib.FindUser(todo.w_userno); if (i > -1){ if (todo.Users[i].gagged == true){ todo.Users[i].gagged = false; todo.DoBuildUserList = true; }; }; } else { if (IsScroller){ main.SetScroller(e.attributes.t.substr(2, 510)); } else { if (((!(IsUnknown)) && (!(IsSlash)))){ todo.mi++; todo.Message.push({ i:(todo.mi * 2), n:e.attributes.i, t:e.attributes.t, u:u, ignored:IsIgnored, s:e.attributes.s, d:((IsPrivateChat) ? u : 0), p:IsPrivateMessage, pb:e.attributes.pb }); if (todo.messageecho == "m"){ if (network.YC){ vt = (xatlib.xInt(todo.w_d1) - network.YC); if (vt < 0){ vt = 0; }; vt = xatlib.xInt(((vt / (24 * 3600)) + 0.3)); if (vt > 0){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, (todo.mi * 2), e.attributes.t); }; }; }; }; if (((((!(todo.bMobile)) && (!((main.mscrollmc.Scrolling == true))))) || (((todo.bMobile) && (!((main.mbs.Scrolling == true))))))){ nopc = 0; nom = 0; len = todo.Message.length; tt = 0; while (tt < len) { if (todo.Message[tt].s == 2){ nopc = (nopc + 1); } else { nom = (nom + 1); }; tt = (tt + 1); }; maxpc = 100; maxm = 150; while ((((nopc > maxpc)) || ((nom > maxm)))) { len = todo.Message.length; RemoveMessage = undefined; tt = 0; while (tt < len) { if (nopc > maxpc){ if (todo.Message[tt].s == 2){ xmessage.DeleteOneMessageMc(tt); RemoveMessage = todo.Message.splice(tt, 1); nopc = (nopc - 1); break; }; } else { if (nom > maxm){ if (todo.Message[tt].s != 2){ xmessage.DeleteOneMessageMc(tt); RemoveMessage = todo.Message.splice(tt, 1); nom = (nom - 1); break; }; }; }; tt = (tt + 1); }; if (!UserGotMessage(RemoveMessage[0].u)){ len = todo.Users.length; tt = 0; while (tt < len) { if (todo.Users[tt].u == RemoveMessage[0].u){ if (todo.Users[tt].online){ break; }; if (todo.Users[tt].u != todo.w_userno){ if (todo.Users[tt].friend){ if (todo.Users[tt].online != undefined){ xmessage.DeleteOneUserMc(tt); }; todo.Users[tt].online = undefined; } else { xmessage.DeleteOneUserMc(tt); todo.Users.splice(tt, 1); }; todo.DoBuildUserList = true; }; break; }; tt = (tt + 1); }; }; }; }; if (((((!(IsUnknown)) && (IsNew))) && (!(IsIgnored)))){ if (((main.ctabsmc.TabIsPrivate()) && (!((main.ctabsmc.TabUser() == u))))){ } else { selfid = xatlib.FindUser(todo.w_userno); main.ProcessSounds(e.attributes.t, ((selfid)!=-1) ? !(todo.HasPower(selfid, 8)) : 0, selfid); }; }; if (((((!(IsUnknown)) && (IsNew))) && (!(IsPrivateChat)))){ GlowUser(u); if (main.ctabsmc.TabIsPrivate()){ if (todo.w_useroom == todo.w_room){ main.ctabsmc.ColorTab(0, 0x9900); main.ctabsmc.GlowTab(0); } else { if (todo.w_useroom == todo.group){ main.ctabsmc.ColorTab(1, 0x9900); main.ctabsmc.GlowTab(1); }; }; }; }; if (((((!(IsUnknown)) && (IsPrivateChat))) && (!(IsIgnored)))){ selfid = xatlib.FindUser(todo.w_userno); HaveTab = -1; AllowPC = true; if (e.attributes.u != undefined){ if (((((!(todo.Users[UserIndex].mainowner)) && (!(todo.Users[UserIndex].owner)))) && (!(todo.Users[UserIndex].moderator)))){ if (((todo.HasPowerA(todo.w_Powers, 10, todo.w_Mask)) || ((((todo.FlagBits & xconst.f_Live)) && (!(todo.HasPowerA(todo.w_Powers, 10))))))){ if (!OnFriendList(todo.Users[UserIndex].u)){ if (todo.Users[UserIndex].u > 101){ AllowPC = false; tt = 0; while (tt < main.ctabsmc.tabs.length) { if (main.ctabsmc.tabs[tt].User == todo.Users[UserIndex].u){ AllowPC = true; HaveTab = tt; break; }; tt = (tt + 1); }; }; }; }; }; if (AllowPC){ TabNumber = ((HaveTab)!=-1) ? HaveTab : main.ctabsmc.TabAdd(u, 0xFFFFFF, 1, main.Private_onRelease, main.Private_onDelete); main.ctabsmc.UpdateTabs(); if (main.ctabsmc.TabSelected() != TabNumber){ main.ctabsmc.GlowTab(TabNumber); main.ctabsmc.ColorTab(TabNumber, 0x9900); }; todo.DoBuildUserList = true; }; if (AllowPC){ if (todo.HasPower(UserIndex, 75)){ if (e.attributes.t.indexOf("(bump") != -1){ var Superior:* = function (_arg1, _arg2){ if (todo.Users[_arg1].mainowner){ return (false); }; if (todo.Users[_arg1].owner){ return (((todo.Users[_arg2].mainowner) ? true : false)); }; if (todo.Users[_arg1].moderator){ return (((((todo.Users[_arg2].mainowner) || (todo.Users[_arg2].owner))) ? true : false)); }; if (((((todo.Users[_arg2].mainowner) || (todo.Users[_arg2].owner))) || (todo.Users[_arg2].moderator))){ return (true); }; return (false); }; self = xatlib.FindUser(todo.w_userno); if (((((OnFriendList(todo.Users[UserIndex].u)) || ((todo.Users[UserIndex].u < 101)))) || (Superior(self, UserIndex)))){ main.ctabsmc.ColorTab(TabNumber, 0xFF0000); t = getTimer(); if ((((todo.LastBump == -1)) || (((t - todo.LastBump) > 20000)))){ todo.CustomSound = (todo.BumpSound = "laserfire3"); todo.DoAudieSnd = true; todo.LastBump = t; }; }; }; }; }; }; }; todo.DoUpdateMessages = true; todo.ScrollDown = true; }; }; }; }; }; }; }; }; } else { if (e.nodeName == "g"){ if (UserIndex >= 0){ todo.Users[UserIndex].xNum = e.attributes.x; xmessage.DeleteOneUserMc(UserIndex); }; } else { if ((((e.nodeName == "u")) || ((e.nodeName == "o")))){ if ((((e.attributes.n == null)) || ((e.attributes.n == undefined)))){ e.attributes.n = ""; }; if ((((e.attributes.a == null)) || ((e.attributes.a == undefined)))){ e.attributes.a = ""; }; if ((((e.attributes.h == null)) || ((e.attributes.h == undefined)))){ e.attributes.h = ""; }; IsMainOwner = false; IsOwner = false; IsModerator = false; IsMember = false; IsOnline = false; IsBanned = false; IsForever = false; IsGagged = false; IsNew = (e.nodeName == "u"); OnXat = !(((xatlib.xInt(e.attributes.q) & 1) == 0)); IsVIP = ((!(((xatlib.xInt(e.attributes.f) & 32) == 0))) || (!(((xatlib.xInt(e.attributes.q) & 2) == 0)))); Powers = []; if (IsVIP){ t = 0; while (t < todo.MAX_PWR_INDEX) { Powers.push(xatlib.xInt(e.attributes[("p" + t)])); t = (t + 1); }; }; if ((e.attributes.f & 7) == 1){ IsMainOwner = true; }; if ((e.attributes.f & 7) == 2){ IsModerator = true; }; if ((e.attributes.f & 7) == 3){ IsMember = true; }; if ((e.attributes.f & 7) == 4){ IsOwner = true; }; if (e.nodeName == "u"){ IsOnline = true; }; if ((((e.attributes.s & 1)) || ((e.attributes.f & 8)))){ IsNew = false; }; if ((e.attributes.f & 16)){ IsBanned = true; }; if ((e.attributes.f & 64)){ IsForever = true; }; if ((e.attributes.f & 0x0100)){ IsGagged = true; }; if (((((((IsNew) && ((todo.w_sound & 1)))) && (!(IsBanned)))) && ((u <= (0x77359400 - 100000))))){ if (((main.ctabsmc.TabIsPrivate()) && (!((main.ctabsmc.TabUser() == u))))){ } else { todo.DoUserSnd = true; }; }; if (u != todo.w_userno){ UserIndex = xatlib.FindUser(u); IsStealth = false; if (((!((e.attributes.n == undefined))) && ((e.attributes.n.substr(0, 1) == "$")))){ IsStealth = ((IsOwner) || (IsMainOwner)); e.attributes.n = e.attributes.n.substr(1); }; if (UserIndex == -1){ if (e.attributes.n == ""){ e.attributes.n = xatlib.GetDefaultName(u); }; if (e.attributes.a == ""){ e.attributes.a = xatlib.GetDefaultAvatar(u); }; if (e.attributes.h == ""){ e.attributes.h = ""; }; UserIndex = (todo.Users.push({}) - 1); } else { xmessage.DeleteOneUserMc(UserIndex); }; todo.Users[UserIndex].n = xatlib.NameNoXat(e.attributes.n); todo.Users[UserIndex].s = xatlib.GetStatus(e.attributes.n); todo.Users[UserIndex].v = xatlib.xInt(e.attributes.v); todo.Users[UserIndex].u = u; todo.Users[UserIndex].a = e.attributes.a; todo.Users[UserIndex].h = e.attributes.h; todo.Users[UserIndex].cb = e.attributes.cb; todo.Users[UserIndex].online = IsOnline; todo.Users[UserIndex].mainowner = IsMainOwner; todo.Users[UserIndex].owner = IsOwner; todo.Users[UserIndex].moderator = IsModerator; todo.Users[UserIndex].member = IsMember; todo.Users[UserIndex].onsuper = undefined; todo.Users[UserIndex].OnXat = OnXat; todo.Users[UserIndex].Stealth = IsStealth; todo.Users[UserIndex].friend = OnFriendList(u); todo.Users[UserIndex].registered = e.attributes.N; todo.Users[UserIndex].sn = xatlib.xJSONdecode(e.attributes.sn); todo.Users[UserIndex].VIP = IsVIP; todo.Users[UserIndex].Powers = Powers; todo.Users[UserIndex].Bride = xatlib.xInt(e.attributes.d2); todo.Users[UserIndex].aFlags = xatlib.xInt(e.attributes.d0); todo.Users[UserIndex].flag0 = xatlib.xInt(e.attributes.f); todo.Users[UserIndex].w = xatlib.xInt(e.attributes.w); AddGiftPower(UserIndex); todo.Users[UserIndex].xNum = e.attributes.x; if (todo.Users[UserIndex].u == 0xFFFFFFFF){ todo.Users[UserIndex].n = (todo.Users[UserIndex].n + " Spectators"); }; if (((IsNew) && (main.ctabsmc.TabIsPrivate()))){ if (todo.w_useroom == todo.w_room){ main.ctabsmc.ColorTab(0, 0x9900); } else { if (todo.w_useroom == todo.group){ main.ctabsmc.ColorTab(1, 0x9900); }; }; }; todo.DoBuildUserList = true; if (UserIndex > -1){ todo.Users[UserIndex].banned = IsBanned; todo.Users[UserIndex].forever = IsForever; todo.Users[UserIndex].gagged = IsGagged; len = todo.Message.length; cc = 0; while (cc < len) { if (xatlib.xInt(todo.Message[cc].u) == xatlib.xInt(todo.Users[UserIndex].u)){ if (IsBanned){ todo.Message[cc].ignored = true; }; }; cc = (cc + 1); }; todo.DoBuildUserList = true; todo.DoUpdateMessages = true; }; if (todo.Users[UserIndex].friend){ len = todo.w_friendlist.length; g = 0; while (g < len) { if (todo.w_friendlist[g].u == u){ if (((((!((xatlib.StripSpace_(todo.Users[UserIndex].n) == xatlib.StripSpace_(todo.w_friendlist[g].n)))) || (!((todo.Users[UserIndex].a == todo.w_friendlist[g].a))))) || (!((todo.Users[UserIndex].h == todo.w_friendlist[g].h))))){ UpdateFriendList(u, true); }; break; }; g = (g + 1); }; }; if (todo.messageecho == "a"){ if ((((todo.Users[UserIndex].banned == true)) || (OnIgnoreList(u)))){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, u, "l"); }; } else { if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, u, ("u" + e.attributes.a)); }; }; }; }; } else { if (e.nodeName == "l"){ UserIndex = xatlib.FindUser(u); xmessage.DeleteOneUserMc(UserIndex); if (((!((UserIndex == -1))) && (!((u == todo.w_userno))))){ if (((!((todo.Users[UserIndex].online == false))) || (!((todo.Users[UserIndex].onsuper == false))))){ xmessage.DeleteOneUserMc(UserIndex); }; todo.Users[UserIndex].onsuper = (todo.Users[UserIndex].online = false); todo.Users[UserIndex].xNum = undefined; todo.Users[UserIndex].DJ = undefined; }; if (((!((UserIndex == -1))) && (!(UserGotMessage(todo.Users[UserIndex].u))))){ len = todo.Users.length; tt = 0; while (tt < len) { if ((((todo.Users[tt].u == todo.Users[UserIndex].u)) && (!((todo.Users[tt].u == todo.w_userno))))){ todo.Users.splice(tt, 1); todo.DoBuildUserList = true; break; }; tt = (tt + 1); }; }; todo.DoBuildUserList = true; if (todo.messageecho == "a"){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, u, "l"); }; }; } else { if (e.nodeName == "i"){ todo.gconfig = new Object(); todo.w_room_cb = xatlib.xInt(e.attributes.cb); xconst.MakeBads(); if (todo.w_useroom == todo.w_room){ xatlib.SplitBackground(e.attributes.b); a = todo.BackVars; } else { a = e.attributes.b.split(";="); }; todo.usebackground = a[0]; todo.useRadio = a[4]; if (((!((todo.useRadio == undefined))) && ((((global.xc & 0x1000)) || ((todo.useRadio.length < 10)))))){ todo.useRadio = undefined; }; if (todo.config["noradio"]){ todo.useRadio = undefined; }; todo.ButCol = a[5]; if ((((todo.ButCol == undefined)) || ((todo.ButCol.length == 0)))){ todo.ButCol = 0xC8C8C8; } else { if (todo.ButCol.charAt(0) == "#"){ todo.ButCol = parseInt(todo.ButCol.substr(1), 16); }; }; todo.ButCol = (xatlib.xInt(todo.ButCol) & 0xFFFFFF); todo.ButColW2 = (((todo.ButCol & 0xFF) + ((todo.ButCol >> 8) & 0xFF)) + ((todo.ButCol >> 16) & 0xFF)); if (todo.ButColW2 > 384){ todo.ButColW = 0; } else { todo.ButColW = 0xFFFFFF; }; main.mcgetachat.RefreshColor(); main.ButtonLoginMc.RefreshColor(); main.retmc.RefreshColor(); if (todo.bThin){ main.retmcBut.Col = todo.ButColW; } else { xatlib.McSetRGB(main.retmcBut.xitem.back, todo.ButColW); }; if (!todo.bMobile){ main.mscrollmc.RefreshColor(); main.uscrollmc.RefreshColor(); }; todo.FlagBits = xatlib.xInt(e.attributes.f); if ((todo.FlagBits & xconst.f_Deleted)){ chat.mainDlg.visible = false; xatlib.getURL("http://alltop.com", "_self"); if (todo.lb != "n"){ main.logoutbutonPress(); }; return; }; main.logo.visible = true; chat.mainDlg.MkGpBut(); if (todo.MainFlagBits == undefined){ todo.MainFlagBits = todo.FlagBits; }; if (todo.w_sound == undefined){ if ((todo.FlagBits & xconst.f_DefNoSound)){ todo.w_sound = 4; } else { todo.w_sound = 253; }; }; if ((todo.w_sound & 4) == 0){ todo.w_sound = (todo.w_sound | 254); }; if ((global.xc & 0x2000)){ todo.w_sound = (todo.w_sound & ~(2)); }; if (global.xt == undefined){ main.ctabsmc.tabs[1].t = todo.BackVars[1]; main.ctabsmc.tabs[1].h = (main.ctabsmc.tabs[1].t + " "); }; if (global.xl == undefined){ todo.group = todo.BackVars[2]; }; if ((xconst.f_Lobby & todo.MainFlagBits)){ main.ctabsmc.tabs[0].Skip = undefined; main.ctabsmc.tabs[1].Skip = undefined; } else { main.ctabsmc.tabs[0].Skip = true; main.ctabsmc.tabs[1].Skip = true; }; main.ctabsmc.UpdateTabs(); if ((e.attributes.v & 1)){ } else { todo.w_registered = undefined; }; todo.w_VIP = ((e.attributes.v & 3) == 3); todo.w_ALLP = (e.attributes.v & 4); todo.w_mainowner = false; todo.w_owner = false; todo.w_moderator = false; todo.w_member = false; if (xatlib.xInt(e.attributes.r) == 1){ todo.w_mainowner = true; todo.w_owner = true; } else { if (xatlib.xInt(e.attributes.r) == 2){ todo.w_moderator = true; } else { if (xatlib.xInt(e.attributes.r) == 3){ todo.w_member = true; } else { if (xatlib.xInt(e.attributes.r) == 4){ todo.w_owner = true; } else { todo.pass = undefined; }; }; }; }; if (todo.w_mainowner){ if (OnGagList(todo.w_useroom)){ UpdateGagList(todo.w_useroom, 0, false); }; i = xatlib.FindUser(todo.w_userno); if (i > -1){ todo.Users[i].banned = false; xmessage.DeleteOneUserMc(i); }; }; len = todo.Users.length; ee = 0; while (ee < len) { if (todo.Users[ee].u == todo.w_userno){ todo.Users[ee].mainowner = (todo.Users[ee].owner = (todo.Users[ee].moderator = (todo.Users[ee].member = false))); IsBanned = OnGagList(todo.w_useroom); todo.Users[ee].banned = IsBanned; if (todo.w_mainowner){ todo.Users[ee].mainowner = true; }; if (todo.w_owner){ todo.Users[ee].owner = true; }; if (((((todo.w_owner) || (todo.w_mainowner))) && ((todo.w_name.substr(0, 1) == "$")))){ todo.Users[ee].Stealth = true; }; if (todo.w_moderator){ todo.Users[ee].moderator = true; }; if (todo.w_member){ todo.Users[ee].member = true; }; todo.Users[ee].VIP = todo.w_VIP; if (!todo.w_VIP){ todo.w_Powers = undefined; }; todo.Users[ee].Powers = ((todo.w_Powers)!=undefined) ? todo.w_Powers.slice() : todo.NO_POWERS.slice(); if (todo.w_ALLP){ todo.Users[ee].Powers[0] = (todo.Users[ee].Powers[0] | 1); }; AddGiftPower(ee); t = 0; while (t < todo.MAX_PWR_INDEX) { todo.Users[ee].Powers[t] = (todo.Users[ee].Powers[t] & ~(xatlib.xInt(((todo.w_Mask)!=undefined) ? todo.w_Mask[t] : 0))); t = (t + 1); }; todo.Users[ee].Bride = todo.w_d2; todo.Users[ee].aFlags = todo.w_d0; todo.Users[ee].flag0 = xatlib.xInt(e.attributes.f2); todo.Users[ee].w = xatlib.xInt(e.attributes.w); todo.Users[ee].sn = xatlib.xJSONdecode(todo.w_sn); xmessage.DeleteOneUserMc(ee); todo.DoBuildUserList = true; break; }; ee = (ee + 1); }; StringIndex = ((todo.config["uselogindialog"]) ? 0 : ((((todo.w_mainowner) && (!(global.xb)))) ? 34 : 5)); main.mcgetachat.SetText(((StringIndex) ? xconst.ST(StringIndex) : "Login")); main.mcgetachat.lc = StringIndex; if (main.mcgetachat.fb){ main.mcgetachat.removeChild(main.mcgetachat.fb); main.mcgetachat.fb = undefined; }; if ((((global.xc & 0x4000)) && (!(todo.w_registered)))){ main.mcgetachat.SetText("Login"); main.mcgetachat.fb = xatlib.AttachBut(main.mcgetachat, "fb", 0.65); main.mcgetachat.lc = 0; }; if (((((xconst.f_MembersOnly | xconst.f_MembersOnly2) & todo.FlagBits)) && (!(((((todo.w_owner) || (todo.w_moderator))) || (todo.w_member)))))){ type = undefined; switch (((xconst.f_MembersOnly | xconst.f_MembersOnly2) & todo.FlagBits)){ case (xconst.f_MembersOnly | xconst.f_MembersOnly2): if (!todo.w_VIP){ type = xconst.ST(176); }; break; case xconst.f_MembersOnly2: if (todo.w_registered == undefined){ type = xconst.ST(177); }; break; default: type = xconst.ST(178); }; if (type != undefined){ todo.helpstr = xconst.ST(37, type); todo.HelpUpdate = 0; }; }; if (todo.messageecho == "a"){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, 0, "d"); }; }; main.SetScroller((((todo.FlagBits & xconst.f_Live)) ? xconst.ST(217) : "")); UserIndex = xatlib.FindUser(todo.w_userno); if ((((((UserIndex >= 0)) && (todo.Users[UserIndex].banned))) && (todo.Users[UserIndex].w))){ xkiss.LoadPuzzle(todo.Users[UserIndex].w); } else { xkiss.ClosePuzzle(); }; } else { if (e.nodeName == "w"){ while (todo.Pools.length) { todo.Pools.shift(); }; Text = e.attributes.v; left = 0; RndOr = (todo.w_userno ^ 0xAAAAAAAA); Rnd2 = RndOr; len = Text.length; q = 0; while (q < len) { if ((((Text.substr(q, 1) == " ")) || ((q == (Text.length - 1))))){ todo.pool = xatlib.xInt(Text.substr(left, ((q)==(Text.length - 1)) ? ((q - left) + 1) : (q - left))); if (left == 0){ todo.newpool = todo.pool; } else { if ((Rnd2 & 1)){ todo.Pools.push(todo.pool); } else { todo.Pools.unshift(todo.pool); }; Rnd2 = (Rnd2 >>> 1); if (Rnd2 == 0){ Rnd2 = RndOr; }; }; left = (q + 1); }; q = (q + 1); }; if (todo.newpool != todo.w_pool){ main.ctabsmc.UpdateTabs(); todo.w_pool = todo.newpool; xmessage.ClearLists(false); todo.DoBuildUserListScrollUp = true; todo.DoUpdateMessages = true; } else { todo.DoBuildUserListScrollUp = true; }; if (todo.messageecho == "a"){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, 0, "d"); }; }; } else { if (e.nodeName == "f"){ str = e.attributes.v; sarray = str.split(","); len = sarray.length; p = 0; while (p < len) { UserIndex = xatlib.FindUser(sarray[p]); if (UserIndex != -1){ todo.Users[UserIndex].onsuper = true; xmessage.DeleteOneUserMc(UserIndex); }; p = (p + 1); }; todo.DoBuildUserListScrollUp = true; } else { if (e.nodeName == "k"){ todo.OnSuper = false; } else { if (e.nodeName == "dup"){ todo.helpstr = xconst.ST(36); todo.HelpUpdate = 0; SetNetworkState(0, -1); todo.lb = "n"; todo.DoUpdate = true; NetworkClose(); } else { if (e.nodeName == "q"){ if (e.attributes.k != undefined){ SetNetworkState(0, -1); todo.lb = "n"; todo.DoUpdate = true; NetworkClose(); if (QK != true){ QK = true; todo.w_userno = 0; todo.w_userrev = 0; todo.w_k1 = 0; todo.w_k2 = 0; main.logoutbutonPress(); }; } else { doautoredirect = (w_redirectport == undefined); SetNetworkState(0, -1); if (e.attributes.r != undefined){ todo.w_room = (todo.w_useroom = xatlib.xInt(e.attributes.r)); main.ctabsmc.UpdateTabs(0); } else { w_redirectport = xatlib.xInt(e.attributes.p); w_redirectdom = e.attributes.d; if (w_redirectdom.substr(0, 1) == "e"){ w_redirectdom = (w_redirectdom + ".xatech.com"); }; }; if (((!((e.attributes.p2 == undefined))) && (!((e.attributes.d2 == undefined))))){ uid = xatlib.FindUser(e.attributes.d2); if (((!((e.attributes.p2.indexOf("#") == -1))) && (!((uid == -1))))){ reason = e.attributes.p2.substr(0, e.attributes.p2.indexOf("#")); bootr = e.attributes.p2.substr((e.attributes.p2.indexOf("#") + 1)); Bootp = (((((todo.Users[uid].n + " (") + todo.Users[uid].u) + ") booted you to ") + bootr) + ((reason)!="") ? (". Reason:" + reason) : "."); }; }; todo.lb = "n"; todo.DoUpdate = true; NetworkClose(); if (doautoredirect){ main.logoutbutonPress(); }; }; } else { if (e.nodeName == "logout"){ todo.helpstr = xconst.ST(35); todo.HelpUpdate = 0; errnum = xatlib.xInt(e.attributes.e.substr(1)); switch (errnum){ case 36: case 37: case 38: todo.helpstr = xconst.ST(260); }; SetNetworkState(0, -1); todo.lb = "n"; todo.DoUpdate = true; NetworkClose(); uid = xatlib.FindUser(todo.w_userno); todo.Users[uid].online = false; xmessage.DeleteOneUserMc(uid); RemoveMessagesWithNoUser(); } else { if (e.nodeName == "idle"){ todo.helpstr = xconst.ST(33); todo.HelpUpdate = 0; SetNetworkState(0, -1); todo.lb = "n"; todo.DoUpdate = true; NetworkClose(); RemoveMessagesWithNoUser(); } else { if (e.nodeName == "abort"){ todo.lb = "n"; todo.DoUpdate = true; NetworkClose(); SetNetworkState(5, (12 * 6)); } else { if (e.nodeName == "BB"){ if (YI != xatlib.xInt(e.attributes.y)){ return; }; tickcode.BB = e.attributes.t.split(","); } else { if (e.nodeName == "done"){ chat.mainDlg.UpdateBackground(todo.usebackground); chat.mainDlg.UpdateEmotes(); xmessage.OpenGifts(todo.w_userno, 0); if (global.um != undefined){ xatlib.GeneralMessage("", ((xconst.ST(135) + ":\n\n") + global.um)); main.box_layer.GeneralMessageH.Dia.Ok.But.PressFunc = function (_arg1){ NetworkMakeUser(global.um, "r"); SetNetworkState(0, -1); todo.lb = "n"; todo.DoUpdate = true; NetworkClose(); main.box_layer.GeneralMessageH.Delete(); global.um = undefined; }; }; RemoveMessagesWithNoUser(); RemoveUsersWithNoMessages(); if (((xatlib.IsDefaultName(todo.w_name)) && ((todo.helpstr == "")))){ todo.helpstr = xconst.ST(12, (" " + todo.w_name)); todo.HelpUpdate = 0; }; todo.FV = xatlib.xInt(Capabilities.version.split(" ")[1]); if (todo.FV < 10){ todo.helpstr = "Please update your Flash player for best performance, click here: http://www.adobe.com/go/getflashplayer"; todo.helpupdate = 0; }; if (Bootp != undefined){ todo.helpstr = Bootp; todo.HelpUpdate = 0; Bootp = undefined; }; xmessage.UpdateMessages(true, false); if (((!(chat.IM.ImInit)) && ((global.xc & 0x0800)))){ try { main.mcLoad.ImSendInit(); } catch(e:Error) { }; }; todo.DoBuildUserList = true; GotDone = true; FI = true; if (todo.connectchannel != undefined){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", chat.connectchannel, chat.connectuser, chat.connectmsg); }; todo.connectchannel = undefined; }; if (todo.RefreshLogin){ NetworkLogin(todo.w_userno, 0); todo.WV2 = true; todo.RefreshLogin = false; }; if (todo.gconfig["g112"]){ todo.Message.push({ n:0, t:(" " + todo.gconfig["g112"]), u:0, s:0, d:0 }); todo.DoUpdateMessages = true; todo.ScrollDown = true; delete todo.gconfig["g112"]; }; uid = xatlib.FindUser(todo.w_userno); todo.Away = ((todo.HasPower(uid, 144)) ? 1 : 0); todo.Typing = ((todo.HasPower(uid, 172)) ? 1 : 0); }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; } public static function RemoveMessagesWithNoUser(){ var _local3:*; var _local1:* = todo.Message.length; var _local2:* = 0; while (_local2 < _local1) { _local3 = xatlib.FindUser(todo.Message[_local2].u); if (_local3 == -1){ } else { if (todo.Users[_local3].n == ""){ todo.Message[_local2].ignored = true; }; }; _local2++; }; todo.DoUpdateMessages = true; } public static function RemoveUsersWithNoMessages(){ var _local1:* = todo.Users.length; var _local2:* = 0; while (_local2 < _local1) { if (todo.Users[_local2] == undefined){ } else { if (todo.Users[_local2].u != todo.w_userno){ if (!UserGotUnignoredMessage(todo.Users[_local2].u)){ if (todo.Users[_local2].online == false){ if (todo.Users[_local2].friend){ if (todo.Users[_local2].online != undefined){ xmessage.DeleteOneUserMc(_local2); }; todo.Users[_local2].online = undefined; } else { xmessage.DeleteOneUserMc(_local2); todo.Users.splice(_local2, 1); _local2--; }; todo.DoBuildUserList = true; }; }; }; }; _local2++; }; } public static function GlowUser(_arg1:Number){ var _local2:* = xatlib.FindUser(_arg1); if (_local2 == -1){ return; }; var _local3:* = todo.Users[_local2]; if (_local3.mc){ tickcode.GlowFlag = true; _local3.glowc = 6; _local3 = _local3.mc.av1; _local3.filters = [todo.TextGlow]; }; } public static function UserGotMessage(_arg1:Number):Boolean{ var _local2:* = todo.Message.length; var _local3:* = 0; while (_local3 < _local2) { if (todo.Message[_local3].u == _arg1){ return (true); }; _local3++; }; return (false); } public static function UserGotUnignoredMessage(_arg1:Number):Boolean{ var _local2:* = todo.Message.length; var _local3:* = 0; while (_local3 < _local2) { if ((((todo.Message[_local3].u == _arg1)) && (!((todo.Message[_local3].ignored == true))))){ return (true); }; _local3++; }; return (false); } public static function OnGagList(_arg1:Number):Boolean{ var _local2:* = todo.w_banlist.length; var _local3:* = 0; while (_local3 < _local2) { if (todo.w_banlist[_local3].r == _arg1){ return (true); }; _local3++; }; return (false); } public static function GetGagTime(_arg1:Number){ var _local2:* = todo.w_banlist.length; var _local3:* = 0; while (_local3 < _local2) { if (todo.w_banlist[_local3].r == _arg1){ return (todo.w_banlist[_local3].t); }; _local3++; }; return (0); } public static function UpdateGagList(_arg1:Number, _arg2:Number, _arg3:Boolean){ var _local4:*; var _local5:*; var _local6:Object; if (_arg3 == true){ if (OnGagList(_arg1)){ _local4 = todo.w_banlist.length; _local5 = 0; while (_local5 < _local4) { if (todo.w_banlist[_local5].r == _arg1){ todo.w_banlist[_local5].t = _arg2; break; }; _local5++; }; } else { _local6 = new Object(); _local6.r = _arg1; _local6.t = _arg2; todo.w_banlist.push(_local6); }; } else { _local4 = todo.w_banlist.length; _local5 = 0; while (_local5 < _local4) { if (todo.w_banlist[_local5].r == _arg1){ todo.w_banlist.splice(_local5); break; }; _local5++; }; }; xatlib.MainSolWrite("w_banlist", todo.w_banlist); } public static function OnUserList(_arg1:Number, _arg2:Boolean=false):Boolean{ var _local3:* = xatlib.FindUser(_arg1); if (_local3 == -1){ return (false); }; if ((((_arg2 == true)) || (todo.Users[_local3].online))){ return (true); }; return (false); } public static function OnFriendList(_arg1:Number):Boolean{ var _local2:*; var _local3:*; _local2 = todo.w_friendlist.length; _local3 = 0; while (_local3 < _local2) { if (todo.w_friendlist[_local3].u == _arg1){ return (true); }; _local3++; }; return (false); } public static function UpdateFriendList(_arg1:Number, _arg2:Boolean, _arg3:String=undefined){ var _local4:*; var _local5:Object; var _local6:*; var _local7:*; _local4 = xatlib.FindUser(_arg1); if (_arg2 == true){ if (!OnFriendList(_arg1)){ _local5 = new Object(); _local5.u = _arg1; if (_local4 != -1){ _local5.v = todo.Users[_local4].v; _local5.n = xatlib.CleanTextNoXat(todo.Users[_local4].n); _local5.a = todo.Users[_local4].a; _local5.h = todo.Users[_local4].h; } else { _local5.v = 0; _local5.n = _arg3; }; todo.w_friendlist.push(_local5); FI = true; } else { _local6 = todo.w_friendlist.length; _local7 = 0; while (_local7 < _local6) { if (todo.w_friendlist[_local7].u == _arg1){ todo.w_friendlist[_local7].v = todo.Users[_local4].v; todo.w_friendlist[_local7].n = xatlib.CleanTextNoXat(todo.Users[_local4].n); todo.w_friendlist[_local7].a = todo.Users[_local4].a; todo.w_friendlist[_local7].h = todo.Users[_local4].h; break; }; _local7++; }; }; } else { _local6 = todo.w_friendlist.length; _local7 = 0; while (_local7 < _local6) { if (todo.w_friendlist[_local7].u == _arg1){ todo.w_friendlist.splice(_local7, 1); if (todo.w_friendlist2 != undefined){ if (todo.w_friendlist[_local7] != undefined){ if (todo.w_friendlist2[todo.w_friendlist[_local7].u] != undefined){ todo.w_friendlist2[todo.w_friendlist[_local7].u] = undefined; }; }; }; break; }; _local7++; }; }; xatlib.MainSolWrite("w_friendlist", todo.w_friendlist); xatlib.MainSolWrite("w_friendlist2", todo.w_friendlist2); } public static function NetworkIgnore(_arg1, _arg2=undefined){ var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; _local3 = OnIgnoreList(_arg1); UpdateIgnoreList(_arg1, !(_local3), _arg2); if (_arg2 == undefined){ _local4 = todo.Message.length; _local5 = 0; while (_local5 < _local4) { if (xatlib.xInt(todo.Message[_local5].u) == _arg1){ todo.Message[_local5].ignored = !(_local3); }; _local5++; }; }; if (!_local3){ _local6 = main.ctabsmc.tabs.length; _local7 = 0; while (_local7 < _local6) { if (main.ctabsmc.tabs[_local7].User == _arg1){ main.Private_onDelete(_local7); break; }; _local7++; }; }; todo.DoBuildUserList = true; todo.DoUpdateMessages = true; } public static function TrimIgnoreList(){ var _local1:Date; var _local2:*; var _local3:*; var _local4:*; _local1 = new Date(); _local2 = (xatlib.xInt((Number(_local1.getTime()) / 1000)) - ((7 * 24) * 3600)); for (_local3 in todo.w_ignorelist2) { _local4 = todo.w_ignorelist2[_local3]; if (_local4 < 0){ _local4 = (_local4 * -1); }; if (_local4 < _local2){ delete todo.w_ignorelist2[_local3]; }; }; } public static function OnIgnoreList(_arg1:Number):Boolean{ return (!((todo.w_ignorelist2[_arg1] == undefined))); } public static function IgnoreTime(_arg1:Number){ return (todo.w_ignorelist2[_arg1]); } public static function UpdateIgnoreList(_arg1:Number, _arg2:Boolean, _arg3){ var _local4:*; var _local5:*; var _local6:Date; var _local7:*; _local4 = xatlib.FindUser(_arg1); _local5 = xatlib.FindUser(todo.w_userno); if (todo.Users[_local5].xNum == 30004){ if (_arg2 == true){ if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, _arg1, "l"); }; } else { if (chat.sending_lc){ chat.sending_lc.send(chat.fromxat, "onMsg", 4, _arg1, ("u" + todo.Users[_local4].a)); }; }; }; xmessage.DeleteOneUserMc(_local4); if (_arg2 == true){ _local6 = new Date(); _local7 = xatlib.xInt((Number(_local6.getTime()) / 1000)); todo.w_ignorelist2[_arg1] = (((_arg3 == undefined)) ? _local7 : -(_local7)); } else { delete todo.w_ignorelist2[_arg1]; }; xatlib.MainSolWrite("w_ignorelist2", todo.w_ignorelist2); todo.DoBuildUserList = true; } public static function GetFriendStatus(){ var _local1:*; var _local3:*; var _local4:String; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; _local1 = todo.w_friendlist.length; var _local2:* = getTimer(); _local3 = 0; while (_local3 < _local1) { _local6 = xatlib.FindUser(todo.w_friendlist[_local3].u); if (_local6 == -1){ if (todo.w_friendlist[_local3].n != undefined){ todo.Users.push({ n:xatlib.NameNoXat(todo.w_friendlist[_local3].n), u:todo.w_friendlist[_local3].u, v:todo.w_friendlist[_local3].v, a:todo.w_friendlist[_local3].a, h:todo.w_friendlist[_local3].h, online:undefined, banned:false, owner:false, friend:true, onsuper:false }); }; } else { if (((!((todo.Users[_local6].friend == true))) || (!((todo.Users[_local6].onsuper == false))))){ xmessage.DeleteOneUserMc(_local6); }; todo.Users[_local6].friend = true; todo.Users[_local6].onsuper = false; }; _local3++; }; if (todo.lb == "n"){ return; }; _local4 = ""; _local5 = 0; _local4 = "f"; if (todo.w_friendlist.length > 0){ if (todo.w_friendlist[0].u != undefined){ _local1 = todo.w_friendlist.length; _local7 = 0; while (_local7 < _local1) { _local5++; _local4 = (_local4 + (" " + todo.w_friendlist[_local7].u)); if ((((_local5 == 80)) || ((_local7 >= (_local1 - 1))))){ _local8 = new XMLDocument(); _local9 = _local8.createElement(_local4); _local8.appendChild(_local9); socket.send(_local8); _local5 = 0; _local4 = "f"; }; _local7++; }; }; }; } public static function GetRev(_arg1):Number{ return (((_arg1.indexOf("_"))!=-1) ? xatlib.xInt(_arg1.substr((_arg1.indexOf("_") + 1))) : 0); } public static function SaveRegData(){ var _local1:*; _local1 = xatlib.getLocal("chat", "/"); _local1.objectEncoding = ObjectEncoding.AMF0; if (((1) && (!((_local1 == null))))){ _local1.data.w_userno = xatlib.xInt(todo.w_userno); _local1.data.w_userrev = xatlib.xInt(todo.w_userrev); _local1.data.w_k1b = todo.w_k1; _local1.data.w_d0 = todo.w_d0; _local1.data.w_d1 = todo.w_d1; _local1.data.w_d2 = todo.w_d2; _local1.data.w_d3 = todo.w_d3; _local1.data.w_dt = todo.w_dt; _local1.data.w_Powers = todo.w_Powers; _local1.data.w_PowerO = todo.w_PowerO; _local1.data.w_bride = todo.w_bride; _local1.data.w_coins = todo.w_coins; _local1.data.w_xats = todo.w_xats; _local1.data.w_sn = todo.w_sn; _local1.data.w_registered = todo.w_registered; _local1.data.w_k2 = todo.w_k2; _local1.data.w_k3 = todo.w_k3; _local1.data.w_cb = todo.w_cb; _local1.flush(); }; } public static function AddGiftPower(_arg1){ var _local2:*; if (_arg1 < 0){ return; }; _local2 = todo.Users[_arg1]; if (!(_local2.aFlags & (1 << 24))){ return; }; if (!_local2.Powers){ _local2.Powers = [0]; }; if (!_local2.Powers[-1]){ _local2.Powers[-1] = 0; }; _local2.Powers[-1] = (_local2.Powers[-1] | 4); } public static function doCode(){ codeLoad = xatlib.LoadMovie(chat.mainDlg, ((xconst.chatdomain + "auth.php") + xatlib.MakeQuery(WC)), onCodeLoaded); } public static function onCodeLoaded(_arg1:Event){ mcCode = MovieClip(codeLoad.contentLoaderInfo.content); } global.Sock = new Array("0", "0", "0", "0"); global.Sock2 = new Array("0", "0", "0", "0"); if (!global.fwd){ global.fwd = "174.36.56.188"; }; } }//package package { import flash.events.*; import flash.display.*; import flash.utils.*; public class cachedSprite extends Sprite { public static const cs_RollOver = 1; private static const TTL:int = 60; public static var dic:Dictionary = new Dictionary(); var bd:BitmapData; var Frames:int; var Pending:Boolean = true; var Timeout:int = 0; public var Flags:int = 0; public static function Tidy(){ var _local1:*; var _local2:*; for (_local1 in dic) { _local2 = dic[_local1]; _local2.Timeout++; if (_local2.Timeout > TTL){ if (_local2.bd){ _local2.bd.dispose(); }; delete dic[_local1]; }; }; } } }//package package { import flash.xml.*; import flash.events.*; import flash.display.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.filters.*; import flash.geom.*; import flash.ui.*; public class xmessage extends Sprite { static var mspos = undefined; static var SkipSmilies; static var yc2; public static var xPos; public static var ImInit; public static var SmB; static var Ronce; static var useryc:Number = 0; static var DeleteNumber:Number; public static var useryc2 = 0; public static var useryc3 = 0; public static var poin = new Array(); public static var McCnt = 0; public static var McTot = 0; public static var p; public static var NoOfM:int; private static var LastUserTab:int; public static var Social = {tc:0}; private static var keywords = { wiki:"wiki", twitter:"twitter", search:"search", power:"power", powers:"power", myspace:"mys", doodle:1, trade:2, smilie:3, smilies:3, smiley:3, msn:4, aim:4, messenger:4, register:5, login:6, buy:7, coin:7, coins:7, xats:7, subscriber:7, gift:8 }; private static var FirstC; public static function AddGames(){ var _local1:*; for (_local1 in xconst.Game) { keywords[xconst.Game[_local1]] = (60001 + _local1); }; } public static function UpdateMessages(_arg1:Boolean, _arg2:Boolean){ var Avatar:* = undefined; var UserName:* = null; var DeleteOk:* = NaN; var MessageLength:* = undefined; var TabIsPrivate:* = undefined; var TabUser:* = undefined; var MaxInView:* = undefined; var t:* = undefined; var Bot:* = undefined; var BotMargF:* = undefined; var Bot2:* = undefined; var v:* = undefined; var Cnt:* = undefined; var HitTop:* = undefined; var n:* = undefined; var M:* = undefined; var V:* = undefined; var v2:* = undefined; var userid:* = undefined; var yinc:* = undefined; var s:* = undefined; var yc3:* = undefined; var All:* = _arg1; var Scrolling:* = _arg2; try { if (Scrolling == undefined){ Scrolling = false; }; MessageLength = todo.Message.length; TabIsPrivate = main.ctabsmc.TabIsPrivate(); TabUser = main.ctabsmc.TabUser(); if (((!(Scrolling)) || (!(p)))){ p = new Array(); NoOfM = 0; v = 0; while (v < MessageLength) { M = todo.Message[v]; if (Scrolling == false){ M.New = false; }; if ((((M.New == false)) && (!((M.ignored == true))))){ if (TabIsPrivate){ if ((((((TabUser == M.u)) || ((todo.w_userno == M.u)))) && ((M.d == TabUser)))){ NoOfM++; p.push(v); }; } else { if ((M.s & 2) == 0){ NoOfM++; p.push(v); }; }; }; if (M.mc){ M.mc.visible = false; }; v = (v + 1); }; } else { t = p.length; v = 0; while (v < t) { if (todo.Message[p[v]].mc){ todo.Message[p[v]].mc.visible = false; }; v = (v + 1); }; }; MaxInView = (Math.round((todo.tph / 35)) - 2); if (MaxInView < 0){ MaxInView = 0; }; t = ((NoOfM - MaxInView) * 100); if (t <= 0){ t = 100; }; main.mscrollmc.Scr_size = t; if (((todo.ScrollDown) && ((Scrolling == false)))){ main.mscrollmc.position = main.mscrollmc.Scr_size; todo.ScrollDown = false; }; if ((((mspos == undefined)) || (!(Scrolling)))){ mspos = main.mscrollmc.Scr_position; todo.DoUpdateMessages = false; } else { mspos = ((mspos + main.mscrollmc.Scr_position) / 2); V = Math.abs((mspos - main.mscrollmc.Scr_position)); if (V < 10){ mspos = main.mscrollmc.Scr_position; todo.DoUpdateMessages = false; }; SkipSmilies = Scrolling; }; Bot = ((MaxInView - 0.001) + ((NoOfM - MaxInView) * (mspos / main.mscrollmc.Scr_size))); if (Bot < 0){ Bot = 0; }; if (Bot >= (NoOfM - 0.001)){ Bot = (NoOfM - 0.001); }; BotMargF = (Bot - int(Bot)); Bot2 = int(Bot); v = Bot2; yc2 = 0; Cnt = NoOfM; HitTop = 99; while (Cnt > 0) { Cnt = (Cnt - 1); v2 = v; v = (v - 1); if (v2 < 0){ v2 = (int(Bot) - v2); }; if (p[v2] == undefined){ } else { M = todo.Message[p[v2]]; if (!M){ } else { userid = xatlib.FindUser(M.u); if ((((userid == -1)) && (!((M.u == 0))))){ DeleteOneMessageMc(p[v2]); p[v2] = undefined; } else { DeleteNumber = xatlib.xInt(M.n); if (v < -1){ Bot2 = (Bot2 + 1); }; if (M.mc != undefined){ yinc = M.mc.mch; yc2 = (yc2 + yinc); } else { if (M.u == 0){ Avatar = -1; UserName = xconst.ST(14); DeleteOk = 0; } else { Avatar = xatlib.CleanAv(todo.Users[userid].a); UserName = todo.Users[userid].n; if (UserName.substr(0, 1) == "$"){ UserName = UserName.substr(1); }; s = ""; if (todo.Users[userid].u != 0){ s = ""; }; UserName = (((s + " ") + s) + UserName); if (((todo.Users[userid].sn) && (todo.Users[userid].sn["fb"]))){ UserName = (UserName + " "); }; if (((todo.Users[userid].h) && ((todo.Users[userid].h.length > 6)))){ UserName = (UserName + " "); }; if (((((((((todo.w_owner) || (todo.w_moderator))) && (!((M.n == 0))))) && (!((M.n == 1))))) && (!(M.p)))){ UserName = (UserName + " "); }; DeleteOk = 0; }; AddMessageToList(Avatar, UserName, DeleteOk, p[v2], userid); M.mc.visible = false; }; if (((todo.Message[p[Bot2]].mc) && (((yc2 - (todo.Message[p[Bot2]].mc.mch * (1 - BotMargF))) > todo.tph)))){ HitTop = 0; break; }; }; }; }; }; if (yc2 >= todo.tph){ yc3 = (todo.tph - ((BotMargF - 1) * todo.Message[p[int(Bot)]].mc.mch)); yc3 = (yc3 - 4); n = int(Bot); while (n >= 0) { if (p[n] == undefined){ } else { M = todo.Message[p[n]]; if (M.mc){ if (M.mc.mch != undefined){ yc3 = (yc3 - M.mc.mch); }; if ((((M.mc.mch == undefined)) || ((yc3 < -(M.mc.mch))))){ break; }; M.mc.y = yc3; M.mc.visible = true; }; }; n = (n - 1); }; } else { yc3 = 0; n = 0; while (n < NoOfM) { if (p[n] == undefined){ } else { M = todo.Message[p[n]].mc; if ((((((yc3 > todo.tph)) || ((yc3 == undefined)))) || (!(M)))){ break; }; M.y = yc3; M.visible = true; yc3 = (yc3 + M.mch); }; n = (n + 1); }; }; n = 0; while (n < MessageLength) { if (((!((todo.Message[n].mc == undefined))) && ((todo.Message[n].mc.visible == false)))){ DeleteOneMessageMc(n); }; n = (n + 1); }; SkipSmilies = false; } catch(e:Error) { }; } public static function DeleteOneMessageMc(_arg1){ var _local2:* = todo.Message[_arg1].mc; if (!_local2){ return; }; McCnt--; if (((_local2.avc) && (_local2.avc.parent))){ _local2.avc.parent.removeChild(_local2.avc); _local2.avc = undefined; }; if (_local2.parent){ _local2.parent.removeChild(_local2); }; todo.Message[_arg1].mc = undefined; } public static function NameCol(_arg1:int){ var _local5:int; if (_arg1 == -1){ return ([undefined, undefined]); }; var _local2:* = todo.Users[_arg1].n.split("(glow"); var _local3:* = undefined; var _local4:* = undefined; if (_local2[1]){ _local5 = ((todo.Users[_arg1].Powers) ? todo.Users[_arg1].Powers[0] : 0); _local2 = _local2[1].split(")"); _local2 = _local2[0].split("#"); if (_local2[1] !== "0"){ if (_local2[1]){ _local4 = xatlib.DecodeColor(_local2[1], (((_local5 & (1 << 13))) ? true : false), (((_local5 & (1 << 14))) ? true : false), (((_local5 & (1 << 15))) ? true : false), (((_local5 & (1 << 16))) ? true : false)); } else { _local4 = 0xFF00; }; }; if (todo.HasPower(_arg1, 103)){ if (_local2[2]){ _local3 = xatlib.DecodeColor(_local2[2], (((_local5 & (1 << 13))) ? true : false), (((_local5 & (1 << 14))) ? true : false), (((_local5 & (1 << 15))) ? true : false), (((_local5 & (1 << 16))) ? true : false)); } else { _local3 = 128; }; }; }; return ([_local3, _local4]); } public static function AddMessageToList(_arg1, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number){ var u:* = undefined; var h:* = null; var Press:* = undefined; var t:* = undefined; var w:* = undefined; var m:* = undefined; var WordsLength:* = undefined; var Avatar:* = _arg1; var UserName:* = _arg2; var DeleteOk:* = _arg3; var v:* = _arg4; var userid:* = _arg5; var M:* = todo.Message[v].t; u =