Frame 1
flashirc = SharedObject.getLocal("flashircdata");
ident = flashirc.data.ident;
if (ident != undefined) {
return(undefined);
}
ident = "";
userchars = new Array();
i = 65;
while (i < 91) {
userchars.push(chr(i));
i++;
}
i = 97;
while (i < 123) {
userchars.push(chr(i));
i++;
}
userchars.push("-", "_", "~", ".");
userchars.push("1", "2", "3", "4", "5", "6", "7", "8", "9", "0");
i = 0;
while (i < 10) {
ident = ident + userchars[Math.round(Math.random() * (userchars.length - 1))];
i++;
}
flashirc.data.ident = ident;
stop();
login.enabled = false;
if (flashirc.data.nickname != undefined) {
myNick_txt.text = flashirc.data.nickname;
thisNick = flashirc.data.nickname;
myNick_text = flashirc.data.nickname;
} else {
thisNick = "";
myNick_text = "";
myNick_txt.text = "";
}
myNick_selected = true;
onEnterFrame = function () {
if (_root.getBytesLoaded() != _root.getBytesTotal()) {
return(undefined);
}
if (Key.isDown(13)) {
if (myNick_text != "") {
_root.myNick = _root.myNick_text;
flashirc.data.nickname = _root.myNick_text;
flashirc.data.password = _root.myPass_txt.text;
play();
} else {
NickHelp.play();
}
}
};
onMouseDown = function () {
if (_root.getBytesLoaded() != _root.getBytesTotal()) {
return(undefined);
}
if ((((_xmouse > myNick_txt._x) && (_xmouse < (myNick_txt._x + myNick_txt._width))) && (_ymouse > myNick_txt._y)) && (_ymouse < (myNick_txt._y + myNick_txt._height))) {
if (myNick_selected != true) {
myNick_txt.text = thisNick;
myNick_text = thisNick;
myNick_selected = true;
}
} else if (myNick_selected == true) {
myNick_selected = false;
if (myNick_txt.text != "") {
thisNick = myNick_txt.text;
} else {
myNick_txt.htmlText = "<font color='#555555'>Enter a nickname here</font>";
}
myNick_text = thisNick;
}
};
login.onRelease = function () {
if (myNick_text != "") {
_root.myNick = _root.myNick_text;
flashirc.data.nickname = _root.myNick_text;
flashirc.data.password = _root.myPass_txt.text;
play();
} else {
NickHelp.play();
}
};
Frame 2
Stage.showMenu = false;
_root.MaxNoPing = 120;
_root.Error_Nick = false;
_root.MaxHistory = 20;
_root.history = 0;
_root.user = _root.ident;
_root.ircServ = "irc.neonDragon.net";
_root.ircPort = 5001;
_root.myName = "Flash user";
_root.myHost = "flashirc";
_root.myText = "#0077FF";
_root.FirstChannel = "#flash";
_root.LastMessage = "";
_root["UserColors[\"~\"]"] = "#7744FF";
_root["UserColors[\"&\"]"] = "#DD00AA";
_root["UserColors[\"@\"]"] = "#FF0000";
_root["UserColors[\"%\"]"] = "#FF00FF";
_root["UserColors[\"+\"]"] = "#00AA00";
_root["UserColors[\"-\"]"] = "#000000";
_root["UserDescriptions[\"~\"]"] = "Channel Owner";
_root["UserDescriptions[\"&\"]"] = "Super Op";
_root["UserDescriptions[\"@\"]"] = "Channel Op";
_root["UserDescriptions[\"%\"]"] = "Half Op";
_root["UserDescriptions[\"+\"]"] = "Voiced";
_root["UserDescriptions[\"-\"]"] = "Normal User";
CTCPVersionReply = "FlashIRC (A work in progress) - Being developed by James Perlman, for Neon Dragon Industries ( http://www.neonDragon.net/ : irc://irc.neonDragon.net:6667 )";
var ColorCodes = new Array("#FFFFFF", "#000000", "#00007F", "#009300", "#FF0000", "#7F0000", "#9C009C", "#FC7F00", "#FFFF00", "#00FC00", "#009393", "#00FFFF", "#0000FC", "#FF00F2", "#7F7F7F", "#D2D2D2");
MovieClip.prototype.tabEnabled = false;
Button.prototype.tabEnabled = false;
toSend_txt.tabEnabled = false;
toSend_selected = true;
unsel_msg = "<font color='#555555'>You must click this text field before you can send messages</font>";
Selection.setFocus("toSend");
onMouseDown = function () {
if ((((_xmouse > toSend_txt._x) && (_xmouse < (toSend_txt._x + toSend_txt._width))) && (_ymouse > toSend_txt._y)) && (_ymouse < (toSend_txt._y + toSend_txt._height))) {
if (toSend_selected != true) {
Selection.setFocus("_level0.toSend_txt");
toSend_selected = true;
toSend = LastMessage;
}
} else if (toSend != unsel_msg) {
toSend_selected = false;
LastMessage = toSend;
toSend = unsel_msg;
}
};
banlist_x = -95;
banlist_y = -11.7;
function RefreshTime() {
var _local1 = new Date();
(((time_hours = _local1.getHours())) > 9) || ((time_hours = "0" + _local1.getHours()));
(((time_mins = _local1.getMinutes())) > 9) || ((time_mins = "0" + _local1.getMinutes()));
(((time_secs = _local1.getSeconds())) > 9) || ((time_secs = "0" + _local1.getSeconds()));
now = (((time_hours + ":") + time_mins) + ":") + time_secs;
}
function remove(array, value) {
var _local2 = new Array();
num = 0;
while (array[num]) {
if (array[num] != value) {
_local2.push(array[num]);
}
num++;
}
return(_local2);
}
function AddChannel(channel, type) {
if (type == undefined) {
type = "channel";
}
ChannelDepth++;
_root.attachMovie("window", "window" + ChannelDepth, ChannelDepth);
if (type == "query") {
_root["window" + ChannelDepth].topic = "Query with " + channel;
}
_root["window" + ChannelDepth].data = "";
_root["window" + ChannelDepth]._y = ChannelY + _root["window" + ChannelDepth]._height;
_root["window" + ChannelDepth]._x = ChannelX + (_root["window" + ChannelDepth]._width * _root.myChannels.length);
_root["window" + ChannelDepth].onEnterFrame = function () {
if (Math.round(this._y) != 100) {
this._y = this._y + (0.2 * (ChannelY - this._y));
}
if ((this.RejoinChannel == true) && (this.ChannelTimer < (getTimer() - 5000))) {
this.RejoinChannel = undefined;
this.ChannelTimer = undefined;
_root.ircSock.send(("JOIN " + this.label) + newline);
}
};
_root["window" + ChannelDepth].label = channel;
_root["window" + ChannelDepth].name = channel;
_root["window" + ChannelDepth].type = type;
_root["window" + ChannelDepth].topic = "";
_root["window" + ChannelDepth].onMouseDown = function () {
if (this.hitTest(_xmouse, _ymouse)) {
this.clicked = true;
if (_root.toSend_selected == true) {
_root.LastMessage = _root.toSend_txt.text;
}
_root.WindowMouseDown.apply(this);
}
};
_root["window" + ChannelDepth].onMouseUp = function () {
if (this.clicked == true) {
this.clicked = false;
_root.toSend = _root.LastMessage;
_root.toSend_selected = true;
Selection.setFocus("_root.toSend_txt");
}
};
_root.UlistScroller.drag_btn._y = _root.UlistScroller.drag_btn._height / 2;
_root.scroller.drag_btn._y = _root.scroller.MaxDrag;
_root.myChannels.push(channel);
_root.CurrentChannel = channel;
n = 100;
while (myChannels[n - 100]) {
_root["window" + n].gotoAndStop(1);
n++;
}
_root.RefreshUlistLayout(0);
_root["window" + ChannelDepth].gotoAndStop(2);
}
function CheckLines() {
ii = 100;
while (_root["window" + ii]) {
linesplits = _root["window" + ii].data.split("<br/>");
if (linesplits.length >= MaxDataLines) {
_root["window" + ii].data = _root["window" + ii].data.substr(linesplits[0].length + 5);
}
ii++;
}
_root.scrollbar.drag_btn._x = _root.scrollbar.MaxDrag;
}
function RefreshChannelLayout() {
ChannelFound = false;
i = 0;
while (myChannels[i]) {
d = (d_num = i + 100);
if (_root["window" + d].name != myChannels[i]) {
ChannelFound = true;
}
if (ChannelFound == true) {
d_num = d + 1;
}
temp_type = _root["window" + d_num].type;
temp_name = _root["window" + d_num].name;
temp_users = _root["window" + d_num].users;
temp_data = _root["window" + d_num].data;
temp_topic = _root["window" + d_num].topic;
temp_topicsetby = _root["window" + d_num].topicsetby;
temp_topicdate = _root["window" + d_num].topicsetdate;
_root["window" + d].removeMovieClip();
_root.attachMovie("window", "window" + d, d);
_root["window" + d].gotoAndStop(1);
_root["window" + d]._y = ChannelY;
_root["window" + d]._x = ChannelX + (_root["window" + d]._width * i);
_root["window" + d].type = temp_type;
_root["window" + d].topic = temp_topic;
_root["window" + d].users = temp_users;
_root["window" + d].topicsetby = temp_topcisetby;
_root["window" + d].topicsetdate = temp_topicdate;
_root["window" + d].label = myChannels[i];
_root["window" + d].name = myChannels[i];
_root["window" + d].data = temp_data;
_root["window" + d].onEnterFrame = function () {
if ((this.RejoinChannel == true) && (this.ChannelTimer < (getTimer() - 5000))) {
this.RejoinChannel = undefined;
this.ChannelTimer = undefined;
_root.ircSock.send(("JOIN " + this.label) + newline);
}
};
_root["window" + d].onMouseDown = function () {
if (this.hitTest(_xmouse, _ymouse)) {
this.clicked = true;
if (_root.toSend_selected == true) {
_root.LastMessage = _root.toSend_txt.text;
}
_root.WindowMouseDown.apply(this);
}
};
_root["window" + d].onMouseUp = function () {
if (this.clicked == true) {
this.clicked = false;
_root.toSend = _root.LastMessage;
_root.toSend_selected = true;
Selection.setFocus("_root.toSend_txt");
}
};
_root.UlistScroller.drag_btn._y = _root.UlistScroller.drag_btn._height / 2;
_root.scroller.drag_btn._y = _root.scroller.MaxDrag;
_root.topicbar.topic = temp_topic;
_root.UserCount = temp_users.length;
i++;
}
removeMovieClip(_root["window" + (d + 1)]);
ChannelDepth = _root.myChannels.length + 99;
_root["window" + GetWindow(_root.CurrentChannel)].gotoAndStop(2);
}
function RefreshUlistLayout(ScrollPosition) {
i = 0;
while (UserArray[i]) {
removeMovieClip(_root["user" + i]);
i++;
}
removeMovieClip(_root["user" + (i + 1)]);
UserArray = _root["window" + _root.GetWindow(_root.CurrentChannel)].users.sort();
i = 0;
while (UserArray[i + ScrollPosition] && (i < _root.MaxUsers)) {
_root.attachMovie("user", "user" + i, i + 200);
_root["user" + i]._y = UserY + (16.4 * i);
_root["user" + i]._x = UserX;
_root["user" + i].onMouseDown = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
ii = 0;
while (_root["user" + ii] != undefined) {
_root["user" + ii].gotoAndStop(1);
ii++;
}
this.gotoAndStop(2);
_root.SelectedUser = this.nickname;
}
};
ThisUser = UserArray[i + ScrollPosition];
UserOnly = _root.replace(_root.replace(_root.replace(_root.replace(_root.replace(ThisUser, "~", ""), "&", ""), "@", ""), "%", ""), "+", "");
_root["user" + i].nickname = UserOnly;
HighStat = false;
if (ThisUser.indexOf("~") != -1) {
ThisUser = ((("<font color=\"" + _root["UserColors[\"~\"]"]) + "\">") + UserOnly) + "</font>";
_root["user" + i].info = ((ThisUser + "\n<BR/><b><font color=\"#FFAA00\">(</font></b><u>") + _root["UserDescriptions[\"~\"]"]) + "</u><b><font color=\"#FFAA00\">)</font</b>";
HighStat = true;
} else if ((ThisUser.indexOf("&") != -1) && (HighStat != true)) {
ThisUser = ((("<font color=\"" + _root["UserColors[\"&\"]"]) + "\">") + UserOnly) + "</font>";
_root["user" + i].info = ((ThisUser + "\n<BR/><b><font color=\"#FFAA00\">(</font></b><u>") + _root["UserDescriptions[\"&\"]"]) + "</u><b><font color=\"#FFAA00\">)</font</b>";
HighStat = true;
} else if ((ThisUser.indexOf("@") != -1) && (HighStat != true)) {
ThisUser = ((("<font color=\"" + _root["UserColors[\"@\"]"]) + "\">") + UserOnly) + "</font>";
_root["user" + i].info = ((ThisUser + "\n<BR/><b><font color=\"#FFAA00\">(</font></b><u>") + _root["UserDescriptions[\"@\"]"]) + "</u><b><font color=\"#FFAA00\">)</font</b>";
HighStat = true;
} else if ((ThisUser.indexOf("%") != -1) && (HighStat != true)) {
ThisUser = ((("<font color=\"" + _root["UserColors[\"%\"]"]) + "\">") + UserOnly) + "</font>";
_root["user" + i].info = ((ThisUser + "\n<BR/><b><font color=\"#FFAA00\">(</font></b><u>") + _root["UserDescriptions[\"%\"]"]) + "</u><b><font color=\"#FFAA00\">)</font</b>";
HighStat = true;
} else if ((ThisUser.indexOf("+") != -1) && (HighStat != true)) {
ThisUser = ((("<font color=\"" + _root["UserColors[\"+\"]"]) + "\">") + UserOnly) + "</font>";
_root["user" + i].info = ((ThisUser + "\n<BR/><b><font color=\"#FFAA00\">(</font></b><u>") + _root["UserDescriptions[\"+\"]"]) + "</u><b><font color=\"#FFAA00\">)</font</b>";
} else if (HighStat != true) {
_root["user" + i].info = ((ThisUser + "\n<b><font color=\"#FFAA00\">(</font></b><u>") + _root["UserDescriptions[\"-\"]"]) + "</u><b><font color=\"#FFAA00\">)</font></b>";
_root["user" + i].nickname = ThisUser;
_root["user" + i].prefix = "-";
}
_root["user" + i].username = ThisUser;
i++;
}
}
function GetPrefix(username) {
prefix = "";
if (username.indexOf("~") != -1) {
prefix = prefix + "~";
}
if (username.indexOf("&") != -1) {
prefix = prefix + "&";
}
if (username.indexOf("@") != -1) {
prefix = prefix + "@";
}
if (username.indexOf("%") != -1) {
prefix = prefix + "%";
}
if (username.indexOf("+") != -1) {
prefix = prefix + "+";
}
return(prefix);
}
function RemoveUser(thiswindow, username) {
var _local2 = _root.GetWindow(thiswindow);
_root["window" + _local2][("hosts[" + username.toLowerCase()) + "]"] = undefined;
num = 0;
while (_root["window" + _local2].users[num] != undefined) {
UserOnly = _root.replace(_root.replace(_root.replace(_root.replace(_root.replace(_root["window" + _local2].users[num], "~", ""), "&", ""), "@", ""), "%", ""), "+", "");
if (UserOnly.toLowerCase() == username.toLowerCase()) {
_root["window" + _local2].users = _root.remove(_root["window" + _local2].users, _root["window" + _local2].users[num]);
}
num++;
}
}
function GetUser(thiswindow, username) {
var _local2 = _root.GetWindow(thiswindow);
num = 0;
while (_root["window" + _local2].users[num] != undefined) {
UserOnly = _root.replace(_root.replace(_root.replace(_root.replace(_root.replace(_root["window" + _local2].users[num], "~", ""), "&", ""), "@", ""), "%", ""), "+", "");
if (UserOnly.toLowerCase() == username.toLowerCase()) {
return(num);
}
num++;
}
return(false);
}
function GetWindow(window) {
num = 100;
while (num <= _root.ChannelDepth) {
if (_root["window" + num].name.toLowerCase() == window.toLowerCase()) {
return(num);
}
num++;
}
return(undefined);
}
function WindowMouseDown() {
n = 100;
while (myChannels[n - 100]) {
_root["window" + n].gotoAndStop(1);
n++;
}
_root.SelectedUser = undefined;
this.gotoAndStop(2);
this.label = this.name;
_root.topicbar.topic = this.topic;
_root.topicbar.topicsetby = this.topicsetby;
_root.topicbar.topicsetdate = this.topicsetdate;
_root.ircData = this.data;
_root.ircData.scroll = this.data.split(newline) + 1;
_root.CurrentChannel = this.name;
_root.RefreshUlistLayout(0);
_root.UserCount = this.users.length;
_root.UlistScroller.drag_btn._y = _root.UlistScroller.drag_btn._height / 2;
_root.scroller.drag_btn._y = _root.scroller.MaxDrag;
}
function isOn(user, chan) {
ThisWindow = _root["window" + GetWindow(chan)];
nn = 0;
while (ThisWindow.users[nn]) {
if (ThisWindow.users[nn] == user) {
return(true);
}
nn++;
}
return(false);
}
function SetActive(winnam, color) {
if (winnam != _root.CurrentChannel) {
_root["window" + GetWindow(winnam)].label = ((("<font color='" + color) + "'>") + _root["window" + GetWindow(winnam)].name) + "</font>";
}
}
function FormatControlCodes(thistext) {
tag_c = 0;
tag_u = 0;
tag_b = 0;
tag_i = 0;
lastindex = 0;
newtext = "";
if (((((((thistext.toLowerCase().indexOf("http://") != -1) || (thistext.toLowerCase().indexOf("www.") != -1)) || (thistext.indexOf(chr_u) != -1)) || (thistext.indexOf(chr_b) != -1)) || (thistext.indexOf(chr_i) != -1)) || (thistext.indexOf(chr_s) != -1)) || (thistext.indexOf(chr_c) != -1)) {
num = 0;
while (thistext.charAt(num)) {
thischar = thistext.charAt(num);
if ((thistext.substr(num, 7).toLowerCase() == "http://") || ((thistext.substr(num, 4).toLowerCase() == "www.") && (thistext.substr(num - 7, 7).toLowerCase() != "http://"))) {
chr_indx = thistext.indexOf(" ", num);
(chr_indx != -1) || ((chr_indx = thistext.length));
link = (this_url = thistext.substr(num, chr_indx - num));
if (thistext.toLowerCase.substr(num, 7) != "http://") {
this_url = "http://" + this_url;
}
newtext = (((((newtext + thistext.substr(lastindex, num - lastindex)) + "<font color='#0000AA'><u><a href='") + this_url) + "' target='_blank'>") + link) + "</a></u></font>";
lastindex = chr_indx;
}
if (thischar == chr_c) {
thiscolor = new Array();
colindex = 0;
if (_root.ColorCodes[thistext.charAt(num + 1)]) {
thiscolor[0] = thistext.charAt(num + 1);
if ((thistext.charAt(num + 1) == "0") && (_root.ColorCodes[thistext.charAt(num + 2)])) {
thiscolor[0] = "";
}
colindex = 1;
if (_root.ColorCodes[(thiscolor[0] + "") + thistext.charAt(num + 2)]) {
thiscolor[0] = (thiscolor[0] + "") + thistext.charAt(num + 2);
colindex = 2;
}
if (thistext.charAt((num + colindex) + 1) == ",") {
thisindex = colindex + 1;
if (_root.ColorCodes[thistext.charAt((num + thisindex) + 1)]) {
colindex = thisindex + 1;
thiscolor[1] = thistext.charAt((num + thisindex) + 1);
if ((thistext.charAt((num + thisindex) + 1) == "0") && (_root.ColorCodes[thistext.charAt((num + thisindex) + 2)])) {
thiscolor[1] = "";
}
if (_root.ColorCodes[Number((thiscolor[1] + "") + thistext.charAt((num + thisindex) + 2))]) {
colindex = thisindex + 2;
thiscolor[1] = (thiscolor[1] + "") + thistext.charAt((num + thisindex) + 2);
}
}
}
} else {
newtext = (newtext + thistext.substr(lastindex, num - lastindex)) + "</font>";
tag_c = 0;
}
if (thiscolor[0]) {
newtext = newtext + thistext.substr(lastindex, num - lastindex);
if (tag_c == 1) {
newtext = newtext + "</font>";
}
tag_c = 1;
newtext = newtext + (("<font color='" + _root.ColorCodes[thiscolor[0]]) + "'");
if (thiscolor[1]) {
newtext = newtext + ((" bgcolor='" + _root.ColorCodes[thiscolor[1]]) + "'");
}
newtext = newtext + ">";
}
lastindex = (num + colindex) + 1;
}
if (thischar == chr_u) {
if (tag_u == 0) {
newtext = (newtext + thistext.substr(lastindex, num - lastindex)) + "<u>";
tag_u = 1;
} else {
newtext = (newtext + thistext.substr(lastindex, num - lastindex)) + "</u>";
tag_u = 0;
}
lastindex = num + 1;
}
if (thischar == chr_b) {
if (tag_b == 0) {
newtext = (newtext + thistext.substr(lastindex, num - lastindex)) + "<b>";
tag_b = 1;
} else {
newtext = (newtext + thistext.substr(lastindex, num - lastindex)) + "</b>";
tag_b = 0;
}
lastindex = num + 1;
}
if (thischar == chr_i) {
if (tag_i == 0) {
newtext = (newtext + thistext.substr(lastindex, num - lastindex)) + "<i>";
tag_i = 1;
} else {
newtext = (newtext + thistext.substr(lastindex, num - lastindex)) + "</i>";
tag_i = 0;
}
lastindex = num + 1;
}
if (thischar == chr_s) {
if (tag_u == 1) {
newtext = (newtext + thistext.substr(lastindex, num - lastindex)) + "</u>";
tag_u = 0;
}
if (tag_b == 1) {
newtext = (newtext + thistext.substr(lastindex, num - lastindex)) + "</b>";
tag_b = 0;
}
if (tag_i == 1) {
newtext = (newtext + thistext.substr(lastindex, num - lastindex)) + "</i>";
tag_i = 0;
}
lastindex = num + 1;
}
num++;
}
(tag_c == 0) || ((newtext = (newtext + thistext.substr(lastindex)) + "</font>")(lastindex = num));
(tag_u == 0) || ((newtext = (newtext + thistext.substr(lastindex)) + "</u>")(lastindex = num));
(tag_b == 0) || ((newtext = (newtext + thistext.substr(lastindex)) + "</b>")(lastindex = num));
(tag_i == 0) || ((newtext = (newtext + thistext.substr(lastindex)) + "</i>")(lastindex = num));
newtext = newtext + thistext.substr(lastindex, num - lastindex);
return(newtext);
}
return(thistext);
}
function FormatText(text_txt, type, beg_indx, end_indx) {
pos = new Array();
b = 0;
c = -1;
a = 0;
while (text_txt.htmlText.charAt(a)) {
char = text_txt.htmlText.charAt(a - 1);
if (char == "<") {
b = text_txt.htmlText.indexOf(">", a) + 1;
a = b;
} else {
pos[c] = a - 1;
c++;
}
a++;
}
pos[c] = text_txt.htmlText.length + 1;
if (beg_indx == end_indx) {
return((_root.myText + ">") + text_txt.htmlText);
}
start_format = ("<" + type) + ">";
end_format = ("</" + type) + ">";
if (type.split(":")[0] == "color") {
start_format = ("<font color=\"" + type.split(":")[1]) + "\">";
end_format = "</font>";
}
formatted_txt = (((text_txt.htmlText.substr(0, pos[beg_indx]) + start_format) + text_txt.htmlText.substr(pos[beg_indx], pos[end_indx] - pos[beg_indx])) + end_format) + text_txt.htmlText.substr(pos[end_indx]);
if (type.split(":")[0] == "color") {
a = 0;
while (_root.ColorCodes[a]) {
formatted_txt = replace(formatted_txt, ("<font color=\"" + _root.ColorCodes[a]) + "\"></font>", ("</font><font color=\"" + _root.ColorCodes[a]) + "\">");
a++;
}
}
return(formatted_txt);
}
function html2irc(text_txt) {
new_txt = text_txt;
new_txt = replace(replace(new_txt, "<u>", chr_u), "</u>", chr_u);
new_txt = replace(replace(new_txt, "<b>", chr_b), "</b>", chr_b);
new_txt = replace(replace(new_txt, "<i>", chr_i), "</i>", chr_i);
a = 0;
while (_root.ColorCodes[a]) {
col = a;
if (a < 10) {
col = "0" + a;
}
new_txt = replace(new_txt, (" color=\"" + ColorCodes[a]) + "\">", ((">" + chr_c) + "") + col);
new_txt = replace(new_txt, "</font>", chr_c + "01", 0);
a++;
}
return(new_txt);
}
function replace(the_string, search_string, replace_string, occurrences) {
if (search_string == replace_string) {
return(the_string);
}
var _local6 = 0;
var _local1 = the_string.toLowerCase().indexOf(search_string.toLowerCase());
while (_local1 >= 0) {
var _local3 = the_string.substr(0, _local1);
var _local4 = the_string.substr(_local1 + search_string.length);
the_string = (_local3 + replace_string) + _local4;
_local1 = the_string.toLowerCase().indexOf(search_string.toLowerCase(), _local1 + replace_string.length);
if (_local6 == occurrences) {
_local1 = -1;
}
_local6++;
}
return(the_string);
}
function iAmOp(channel) {
channel = _root.GetWindow(channel);
a = 0;
while (_root["window" + channel].users[a]) {
UserPrefix = _root["window" + channel].users[a].charAt(0);
if ((_root["window" + channel].users[a].toLowerCase().substr(1) == _root.myNick.toLowerCase()) && ((((UserPrefix == "%") || (UserPrefix == "@")) || (UserPrefix == "&")) || (UserPrefix == "~"))) {
return(true);
}
a++;
}
return(false);
}
chr_c = "\x03";
chr_u = "\x1F";
chr_b = "\x02";
chr_i = "\x16";
chr_s = "\x0F";
toSend = "";
ChannelDepth = 99;
ChannelY = 24;
ChannelX = 36;
ColorBox_x = 6;
ColorBox_y = 480.5;
MaxUsers = 20;
UserX = 592.5;
UserY = 60;
MaxDataLines = 100;
_root.topicbar.swapDepths(1000);
a = 0;
while (ColorCodes[a]) {
_root.createEmptyMovieClip("ColorBox" + a, -1000 - a);
_root["ColorBox" + a].color = ColorCodes[a];
_root["ColorBox" + a].lineStyle(0.25, 0, 100);
_root["ColorBox" + a].moveTo(ColorBox_x + (20 * a), ColorBox_y);
_root["ColorBox" + a].beginFill(Number("0x" + ColorCodes[a].substr(1)), 100);
_root["ColorBox" + a].lineTo((ColorBox_x + (20 * a)) + 16, ColorBox_y);
_root["ColorBox" + a].lineTo((ColorBox_x + (20 * a)) + 16, ColorBox_y + 16);
_root["ColorBox" + a].lineTo(ColorBox_x + (20 * a), ColorBox_y + 16);
_root["ColorBox" + a].lineTo(ColorBox_x + (20 * a), ColorBox_y);
_root["ColorBox" + a].onMouseDown = function () {
if (this.hitTest(_xmouse, _ymouse) == true) {
this.clicked = true;
this.frstindx = _root.toSend_frstindx;
this.lastindx = _root.toSend_lastindx;
}
};
_root["ColorBox" + a].onMouseUp = function () {
if (this.clicked) {
this.clicked = false;
_root.toSend_selected = true;
_root.toSend = _root.LastMessage;
Selection.setFocus("_root.toSend");
if (this.frstindx == this.lastindx) {
_root.fcc_help.play();
} else {
_root.toSend = _root.FormatText(_root.toSend_txt, "color:" + this.color, this.frstindx, this.lastindx);
}
Selection.setSelection(this.frstindx, this.lastindx);
}
};
a++;
}
function CheckCommands() {
command = false;
i = 0;
while (toSend_txt.text.substr(i, 1) == "/") {
datasplit = toSend_txt.text.substr(i + 1).split(" ");
i++;
}
arguements = datasplit.join(" ").substr(datasplit[0].length).split(" ");
if (datasplit[0].toLowerCase() == "clear") {
_root["window" + _root.GetWindow(_root.CurrentChannel)].data = "";
command = true;
}
if (datasplit[0].toLowerCase() == "umode") {
if (!datasplit[1]) {
_root["window" + GetWindow(_root.CurrentChannel)].data = _root["window" + GetWindow(_root.CurrentChannel)].data + (("<font color='#0000FF'>[" + now) + "] *** /umode Error: You must enter modes to set for yourself!</font><br/>");
return(undefined);
}
_root.ircSock.send(((("MODE " + _root.myNick) + " ") + arguements.join(" ")) + newline);
command = true;
}
if (datasplit[0].toLowerCase() == "whois") {
if (!datasplit[1]) {
_root["window" + GetWindow(_root.CurrentChannel)] = _root["window" + GetWindow(_root.CurrentChannel)] + (("<font color='#0000FF'>[" + npw) + "] *** /whois Error: No nickname given!</font><br/>\n");
return(undefined);
}
_root.ircSock.send(("WHOIS " + datasplit[1]) + newline);
_root.DataWindow = GetWindow(_root.CurrentChannel);
command = true;
}
if (datasplit[0].toLowerCase() == "query") {
if (!datasplit[1]) {
_root["window" + GetWindow(_root.CurrentChannel)] = _root["window" + GetWindow(_root.CurrentChannel)] + (("<font color='#0000FF'>[" + now) + "] *** /query Error: Please enter the name of a user to query!</font><br/>\n");
return(undefined);
}
_root.CurrentChannel = datasplit[1];
AddChannel(datasplit[1], "query");
if (datasplit[2]) {
message = datasplit.join(" ").substr((datasplit[0].length + datasplit[1].length) + 2);
_root["window" + GetWindow(datasplit[1])].data = _root["window" + GetWindow(datasplit[1])].data + (((((("[" + now) + "] <") + _root.myNick) + "> ") + _root.FormatControlCodes(message)) + newline);
}
command = true;
}
if ((datasplit[0].toLowerCase() == "part") || (datasplit[0].toLowerCase == "leave")) {
if (datasplit[1]) {
PartCommand = ("PART " + datasplit[1]) + " ";
if (datasplit[2]) {
partmsg = datasplit.join(" ").substr(datasplit[0].length + datasplit[1].length);
PartCommand = PartCommand + (":" + partmsg);
}
ircSock.send(PartCommand + newline);
} else {
ircSock.send(("PART " + _root.CurrentChannel) + newline);
}
command = true;
}
if ((datasplit[0].toLowerCase() == "raw") || (datasplit[0].toLowerCase() == "quote")) {
socket.send(arguements.join(" ") + newline);
command = true;
}
if ((datasplit[0].toLowerCase() == "msg") || (datasplit[0].toLowerCase() == "privmsg")) {
ircSock.send(((("PRIVMSG " + datasplit[1]) + " :") + datasplit.join(" ").substr((datasplit[0].length + datasplit[1].length) + 1)) + newline);
command = true;
}
if (datasplit[0].toLowerCase() == "ctcp") {
ircSock.send(((((("PRIVMSG " + datasplit[1]) + " :") + "\x01") + datasplit.join(" ").substr(datasplit[0].length + datasplit[1].length)) + "\x01") + newline);
command = true;
}
if (datasplit[0].toLowerCase() == "hop") {
chan = datasplit[1];
if (!datasplit[1]) {
chan = _root.CurrentChannel;
}
_root[("hop[" + chan) + "]"] = true;
ircSock.send(((("PART " + chan) + " :Be right back!\nJOIN ") + chan) + newline);
}
if ((datasplit[0].toLowerCase() == "me") || (datasplit[0].toLowerCase() == "action")) {
ircSock.send((((((("PRIVMSG " + _root.CurrentChannel) + " :") + "\x01") + "ACTION ") + arguements.join(" ")) + "\x01") + newline);
_root["window" + GetWindow(_root.CurrentChannel)].data = _root["window" + GetWindow(_root.CurrentChannel)].data + ((((((("<font color='" + _root.myText) + "'>[") + now) + "] * ") + _root.myNick) + _root.FormatControlCodes(arguements.join(" "))) + "</font><BR/>");
_root.ircData = _root["window" + GetWindow(_root.CurrentChannel)].data;
command = true;
}
if (datasplit[0].toLowerCase() == "describe") {
ircSock.send((((((("PRIVMSG " + datasplit[1]) + " :") + "\x01") + "ACTION ") + datasplit.join(" ").substr(datasplit[0].length + datasplit[1].length)) + "\x01") + newline);
command = true;
}
if ((datasplit[0].toLowerCase() == "kick") || (datasplit[0].toLowerCase() == "k")) {
message = datasplit.join(" ").substr((datasplit[0].length + datasplit[1].length) + 2);
_root.ircSock.send(((((("KICK " + _root.CurrentChannel) + " ") + datasplit[1]) + " :") + _root.FormatControlCodes(message)) + newline);
command = true;
}
if ((datasplit[0].toLowerCase() == "kick") || (datasplit[0].toLowerCase() == "k")) {
message = datasplit.join(" ").substr((datasplit[0].length + datasplit[1].length) + 2);
_root.ircSock.send(((((("KICK " + _root.CurrentChannel) + " ") + datasplit[1]) + " :") + _root.FormatControlCodes(message)) + newline);
command = true;
}
if ((datasplit[0].toLowerCase() == "ban") || (datasplit[0].toLowerCase() == "b")) {
_root[("ban[" + datasplit[1].toLowerCase()) + "]"] = _root.CurrentChannel;
_root.ircSock.send(((("MODE " + _root.CurrentChannel) + " +b ") + _root["window" + GetWindow(_root.CurrentChannel)][("hosts[" + datasplit[1].toLowerCase()) + "]"]) + newline);
command = true;
}
if ((datasplit[0].toLowerCase() == "kb") || (datasplit[0].toLowerCase() == "kban")) {
message = datasplit.join(" ").substr((datasplit[0].length + datasplit[1].length) + 2);
_root.ircSock.send(((("MODE " + _root.CurrentChannel) + " +b *!") + _root["window" + GetWindow(_root.CurrentChannel)][("hosts[" + datasplit[1].toLowerCase()) + "]"]) + newline);
_root.ircSock.send(((("KICK " + _root.CurrentChannel) + " ") + datasplit[1]) + newline);
command = true;
}
if (details[1].toLowerCase() == "op") {
_root.ircSock.send(((("MODE " + _root.CurrentChannel) + " +o ") + details[2]) + newline);
command = true;
}
if (details[1].toLowerCase() == "deop") {
_root.ircSock.send(((("MODE " + _root.CurrentChannel) + " -o ") + details[2]) + newline);
command = true;
}
if (((details[1].toLowerCase() == "h") || (details[1].toLowerCase() == "ho")) || (details[1].toLowerCase() == "halfop")) {
_root.ircSock.send(((("MODE " + _root.CurrentChannel) + " +h ") + details[2]) + newline);
command = true;
}
if (((details[1].toLowerCase() == "dh") || (details[1].toLowerCase() == "dehop")) || (details[1].toLowerCase() == "dehalfop")) {
_root.ircSock.send(((("MODE " + _root.CurrentChannel) + " -h ") + details[2]) + newline);
command = true;
}
if ((details[1].toLowerCase() == "v") || (details[1].toLowerCase() == "voice")) {
_root.ircSock.send(((("MODE " + _root.CurrentChannel) + " +v ") + details[2]) + newline);
command = true;
}
if ((details[1].toLowerCase() == "dv") || (details[1].toLowerCase() == "devoice")) {
_root.ircSock.send(((("MODE " + _root.CurrentChannel) + " +v ") + details[2]) + newline);
command = true;
}
if (!command) {
ircSock.send(datasplit.join(" ") + newline);
}
}
function SendMsg() {
if ((toSend != undefined) && (toSend != "")) {
LastActive = getTimer();
history = 0;
_root.MessageHistory.reverse();
_root.MessageHistory.push(toSend_txt.text);
_root.MessageHistory.reverse();
if (_root.MessageHistory.length > MaxHistory) {
var _local2 = new Array();
xx = 1;
while (xx < MaxHistory) {
_local2.push(_root.MessageHistory[xx]);
xx++;
}
var _local3 = new Array(_local2);
}
if (Error_Nick == true) {
_root.ircSock.send(("NICK " + toSend_txt.text) + newline);
_root.myNick = toSend_txt.text;
flashirc.data.nickname = _root.myNick;
toSend = "";
LastMessage = "";
_root.scroller.drag_btn._y = _root.scroller.MaxDrag;
Error_Nick = false;
return(undefined);
}
toSend_txt.htmlText = _root.html2irc(toSend_txt.htmlText);
toSend_txt.text = _root.replace(_root.replace(toSend_txt.text, "<", "<"), ">", ">");
(toSend_txt.text.substr(0, 3) != (chr_c + "01")) || ((toSend_txt.text = toSend_txt.text.substr(3)));
(toSend_txt.text.substr(toSend_txt.length - 3) != (chr_c + "01")) || ((toSend_txt.text = toSend_txt.text.substr(0, toSend_txt.length - 3)));
if (toSend_txt.text.indexOf("/") == 0) {
CheckCommands();
} else if (_root.CurrentChannel != _root.ircServ) {
ircSock.send((("PRIVMSG " + _root.CurrentChannel) + " :") + _root.replace(_root.replace(toSend_txt.text, "<", "<"), ">", ">"));
_root["window" + GetWindow(_root.CurrentChannel)].data = _root["window" + GetWindow(_root.CurrentChannel)].data + (((((((("<font color='" + _root.myText) + "'>[") + now) + "] <") + _root.myNick) + "> ") + _root.FormatControlCodes(toSend_txt.text)) + "</font><BR/>");
_root.ircData = _root["window" + GetWindow(_root.CurrentChannel)].data;
} else {
ircSock.send(html2irc(toSend_txt.htmlText));
}
toSend = "";
LastMessage = "";
_root.scroller.drag_btn._y = _root.scroller.MaxDrag;
_root.ircData.scroll = _root.ircData.maxscroll;
} else {
MsgHelp.play();
}
}
stop();
ReconnFrames = 0;
Button.prototype.tabEnabled = false;
ircSock = new XMLSocket();
ircSock.connect(_root.ircServ, _root.ircPort);
var myChannels = new Array();
var MessageHistory = new Array("");
RefreshTime();
AddChannel(_root.ircServ);
_root.window100.users = [];
_root.window100.topic = ("Connecting to <font color='#FF0000'>" + _root.ircServ) + "</font>";
_root.UserCount = 0;
_root.topicbar.topic = _root.window100.topic;
_root.window100.data = _root.window100.data + (((("<font color='#0000FF'>[" + now) + "] Connecting to server ") + _root.ircServ) + "</font><br/>");
sendConnect = ((((((((("USER " + _root.user) + " ") + _root.myHost) + " ") + _root.ircServ) + " :") + _root.myName) + " \nNICK ") + _root.myNick) + newline;
_root.ircData = _root.window100.data;
ircSock.onConnect = function (success) {
if (success) {
_root.connected = true;
_root.LastPing = getTimer();
("Connected to <font color='#FF0000'>" + _root.ircServ) + "</font>";
_root.topicbar.topic = _root.window100.topic;
_root.window100.data = _root.window100.data + (("<font color='#0000FF'>[" + now) + "] Connection established</font><br/>");
ircSock.send(sendConnect);
} else {
_root.connected = false;
_root.window100.topic = "Not connected";
_root.topicbar.topic = _root.window100.topic;
_root.window100.data = _root.window100.data + (((("<font color='#0000FF'>[" + now) + "] Unable to connect to server ") + _root.ircServ) + ", connection closed.</font><br/>");
_root.window100.topic = ("Connecting to " + _root.ircServ) + "<br/>";
_root.window100.data = _root.window100.data + (("<font color='#0000FF'>[" + now) + "] *** Reconnecting...</font><br/>");
TimeReconnect = true;
ReconnFrames = 0;
}
_root.ircData = _root.window100.data;
};
_root.ircData = _root.window100.data;
ircSock.onClose = function () {
_root.connected = false;
i = 100;
while (_root["window" + i]) {
_root["window" + i].users = [];
_root["window" + i].data = _root["window" + i].data + (((((("<font color='#555555'>[" + now) + "] *** Connection closed by server<br/>[") + now) + "] *** Reconnecting to server ") + _root.ircServ) + "<br/></font>");
i++;
}
_root.WindowMouseDown.apply(_root.window100);
_root.RefreshUlistLayout(0);
_root.window100.topic = ("Connecting to " + _root.ircServ) + "<br/>";
TimeReconnect = true;
ReconnFrames = 0;
};
ircSock.onData = function (src) {
parse(src.toString());
};
onEnterFrame = function () {
if (Selection.getFocus() == "_level0.toSend_txt") {
toSend_frstindx = Selection.getBeginIndex();
toSend_lastindx = Selection.getEndIndex();
}
if ((ScrollDownBTN_MouseDown == true) && (_root.ircData.scroll < _root.ircData.maxscroll)) {
_root.scroller.drag_btn._y = _root.scroller.drag_btn._y + (_root.scroller.LineValue / 2);
}
if ((ScrollUpBTN_MouseDown == true) && (_root.ircData.scroll > 1)) {
_root.scroller.drag_btn._y = _root.scroller.drag_btn._y - (_root.scroller.LineValue / 2);
}
if ((ReconnFrames < 900) && (TimeReconnect == true)) {
ReconnFrames++;
} else {
if (TimeReconnect == true) {
ircSock.connect(_root.ircServ, _root.ircPort);
_root.topicbar.topic = _root.window100.topic;
_root.window100.data = _root.window100.data + (((("<font color='#0000FF'>[" + now) + "] Connecting to server ") + _root.ircServ) + "</font><br/>");
sendConnect = ((((((((("USER " + _root.user) + " ") + _root.myHost) + " ") + _root.ircServ) + " :") + _root.myName) + " \nNICK ") + _root.myNick) + newline;
ircData.scroll++;
}
TimeReconnect = false;
}
RefreshTime();
if (toSend_selected == true) {
if (Key.isDown(9)) {
if (TabDown == false) {
nickStart = toSend_txt.text.lastIndexOf(" ", Selection.getCaretIndex()) + 1;
fillNick = toSend_txt.text.substr(nickStart, Selection.getCaretIndex());
a = 0;
while (UserArray[a]) {
ThisUser = UserArray[a];
UserOnly = _root.replace(_root.replace(_root.replace(_root.replace(_root.replace(ThisUser, "~", ""), "&", ""), "@", ""), "%", ""), "+", "");
if (UserOnly.toLowerCase().substr(0, fillNick.length) == fillNick.toLowerCase()) {
toSend_txt.replaceText(nickStart, Selection.getCaretIndex(), UserOnly);
Selection.setSelection(nickStart + UserOnly.length, nickStart + UserOnly.length);
break;
}
a++;
}
TabDown = true;
}
} else {
TabDown = false;
}
if (Key.isDown(13)) {
if (EnterKeyIsDown == false) {
SendMsg();
_root.EnterKeyIsDown = true;
}
} else {
_root.EnterKeyIsDown = false;
}
if (Key.isDown(38)) {
if (keyupdown == true) {
return(undefined);
}
if ((history < MaxHistory) && (history < _root.MessageHistory.length)) {
toSend = _root.MessageHistory[history];
history++;
}
keyupdown = true;
} else {
keyupdown = false;
}
if (Key.isDown(40)) {
if (keydowndown == true) {
return(undefined);
}
if (history == 0) {
toSend = LastMessage;
} else {
history--;
toSend = _root.MessageHistory[history];
}
keydowndown = true;
} else {
keydowndown = false;
}
}
};
function parse(data) {
data = replace(data, "<", "<");
var _local5 = data.split(newline);
n = 0;
while (n < _local5.length) {
parsed = false;
if (_local5[n] == "") {
parsed = true;
}
_local5[n] = _root.FormatControlCodes(_local5[n]);
var _local3 = _local5[n].split(" ");
var _local6 = _local5[n].split(":");
var _local4 = _local6[1].split("!");
if (_local3[0].toUpperCase() == "PING") {
_root.LastPing = getTimer();
ircSock.send(("PONG :" + _local6[1]) + newline);
parsed = true;
}
if (_local3[1] == "004") {
registered = true;
if (_root.myPass) {
_root.ircSock.send(("PRIVMSG NickServ IDENTIFY " + _root.myPass) + newline);
}
if (_root.myChannels.length > 1) {
a = 1;
while (_root.myChannels[a]) {
ircSock.send("JOIN " + _root.myChannels[a]);
a++;
}
} else {
ircSock.send(("JOIN " + _root.FirstChannel) + newline);
}
}
if (_local3[1] == "307") {
WhoisData(_local5[n]);
}
if (_local3[1] == "310") {
WhoisData(_local5[n]);
}
if (_local3[1] == "311") {
_root["window" + _root.DataWindow].data = _root["window" + _root.DataWindow].data + (((((((((("<font color='#0000FF'>[" + now) + "] *** ") + _local3[3]) + " is ") + _local3[4]) + "@") + _local3[5]) + " (") + _local5[n].substr(_local5[n].indexOf(":", 1) + 1)) + ")</font><br/>");
SetActive(_root.DataWindow, "#0000FF");
parsed = true;
}
if (_local3[1] == "312") {
ServerInfo = _local5[n].substr(_local5[n].indexOf(":", 1) + 1);
_root["window" + _root.DataWindow].data = _root["window" + _root.DataWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** is connected to ") + _local3[4]) + " (") + ServerInfo) + ")</font><br/>");
SetActive(_root.DataWindow, "#0000FF");
parsed = true;
}
if (_local3[1] == "313") {
WhoisData(_local5[n]);
}
if (_local3[1] == "314") {
whowas_name = _local5[n].substr(_local5[n].indexOf(":", 1) + 1);
_root["window" + _root.DataWindow].data = _root["window" + _root.DataWindow].data + (((((((((("<font color='#0000FF'>[" + now) + "] *** ") + _local3[3]) + " was ") + _local3[4]) + "@") + _local3[5]) + " (") + whowas_name) + ")</font><br/>");
SetActive(_root.DataWindow, "#0000FF");
parsed = true;
}
if (_local3[1] == "315") {
if (_root[("GetHosts[" + _local3[3].toLowerCase()) + "]"] == true) {
_root[("GetHosts[" + _local3[3].toLowerCase()) + "]"] = undefined;
_root.RefreshUlistLayout(0);
parsed = true;
}
}
if (_local3[1] == "317") {
if (_local3[4] > 120) {
idletime = Math.round(_local3[4] / 60) + " minutes";
} else {
idletime = _local3[4] + " second";
(_local3[4].length == 1) || ((idletime = idletime + "s"));
}
_root["window" + _root.DataWindow].data = _root["window" + _root.DataWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** has been idle for ") + idletime) + "</font><br/>");
SetActive(_root.DataWindow, "#0000FF");
parsed = true;
}
if (_local3[1] == "318") {
WhoisData(_local5[n]);
}
if (_local3[1] == "319") {
_root["window" + _root.DataWindow].data = _root["window" + _root.DataWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** on channels: ") + _local5[n].substr(_local5[n].indexOf(":", 1) + 1)) + "</font><br/>");
SetActive(_root.DataWindow, "#0000FF");
parsed = true;
}
if (_local3[1] == "321") {
if (_root.GetWindow("~Channels~") != undefined) {
_root.WindowMouseDown.apply(_root["window" + GetWindow("~Channels~")]);
} else {
_root.topicbar.chan_list._visible = true;
_root.topicbar.chan_list.ChannelArray = new Array();
_root.topicbar.chan_list.UserCount = new Array();
_root.topicbar.chan_list.ChanTopic = new Array();
}
parsed = true;
}
if (_local3[1] == "322") {
_root.topicbar.chan_list.ChannelArray.push(_local3[3]);
_root.topicbar.chan_list.UserCount.push(_local3[4]);
_root.topicbar.chan_list.ChanTopic.push(_local5[n].substr(_local5[n].indexOf(":", 1) + 1));
parsed = true;
}
if (_local3[1] == "323") {
_root.topicbar.chan_list.RefreshChannelView(0);
parsed = true;
}
if ((_local3[1] == "332") && (_local3[2] == _root.myNick)) {
topic = _local5[n].substr(_local5[n].indexOf(":", 1) + 1);
if (topic == undefined) {
topic = "";
}
_root.topicbar.topic = topic;
_root["window" + GetWindow(_local3[3])].topicsetby = "";
_root["window" + GetWindow(_local3[3])].topic = topic;
parsed = true;
_root["window" + GetWindow(_local3[3])].data = _root["window" + GetWindow(_local3[3])].data + (((("<font color='#0000FF'>[" + now) + "] *** Topic is \"") + topic) + "\"</font><br/>");
SetActive(_local3[3], "#0000FF");
}
if (_local3[1] == "333") {
_root["window" + GetWindow(_local3[3])].topicsetby = _local3[4];
_root.topicbar.topicsetby = _root["window" + GetWindow(_local3[3])].topicsetby;
_root.topicbar.topicsetdate = _root["window" + GetWindow(_local3[3])].topicsetdate;
_root["window" + GetWindow(_local3[3])].data = _root["window" + GetWindow(_local3[3])].data + (((("<font color='#0000FF'>[" + now) + "] *** Topic set by ") + _local3[4]) + "</font><br/>");
SetActive(_local3[3], "#0000FF");
parsed = true;
}
if (_local3[1] == "335") {
WhoisData(_local5[n]);
}
if (_local3[1] == "352") {
if (_root[("GetHosts[" + _local3[3].toLowerCase()) + "]"] == true) {
ThisWindow = _root.GetWindow(_local3[3]);
_root["window" + ThisWindow][("hosts[" + _local3[7].toLowerCase()) + "]"] = (_local3[4] + "@") + _local3[5];
parsed = true;
}
}
if ((_local3[1] == "353") && (_local3[2] == _root.myNick)) {
i = 0;
while (_root.UserArray[i]) {
removeMovieClip(_root["user" + i]);
i++;
}
message = _local5[n].substr(_local5[n].indexOf(":", 1) + 1);
ThisChannel = GetWindow(_local3[4]);
_root.UserArray = message.split(" ", message.split(" ").length - 1).sort();
_root["window" + ThisChannel].users = UserArray;
_root.UserCount = _root["window" + ThisChannel].users.length;
if (_local3[4].toLowerCase() == _root.CurrentChannel.toLowerCase()) {
_root.RefreshUlistLayout(0);
}
parsed = true;
}
if (_local3[1] == "366") {
ThisWindow = GetWindow(_local3[3]);
_root.window100.data = _root.window100.data + (((("<font color='#0000FF'>[" + now) + "] *** Ban list for ") + _local3[3]) + ":</font><br/>");
_root["window" + ThisWindow].banlist = new Array();
_root["Window" + ThisWindow].bansetters = new Array();
SetActive(_root.ircServ, "#0000FF");
parsed = true;
}
if (_local3[1] == "367") {
ThisWindow = GetWindow(_local3[3]);
_root.window100.data = _root.window100.data + (((((((("<font color='#0000FF'>[" + now) + "] *** ") + _local3[3]) + " Ban: ") + _local3[4]) + ", set by ") + _local3[5]) + "</font><br/>");
_root["window" + ThisWindow].banlist.push(_local3[4]);
_root["window" + ThisWindow].bansetters.push(_local3[5]);
SetActive(_root.ircServ, "#0000FF");
parsed = true;
}
if (_local3[1] == "372") {
_root.window100.data = _root.window100.data + (((("<font color=\"#0000FF\">[" + now) + "]</font><font color=\"#555555\"> ") + _local5[n].substr(_local5[n].indexOf(":", 1) + 1)) + "</font><br/>");
SetActive(_root.ircServ, "#0000FF");
parsed = true;
}
if (_local3[1] == "378") {
WhoisData(_local5[n]);
}
if (_local3[1] == "401") {
WhoisData(_local5[n]);
}
if (_local3[1] == "403") {
if (_root[("hop[" + _local3[3]) + "]"] == true) {
_root[("hop[" + _local3[3]) + "]"] = undefined;
}
}
if ((_local3[1] == "432") || (_local3[1] == "433")) {
_root["window" + _root.GetWindow(_root.CurrentChannel)].data = _root["window" + _root.GetWindow(_root.CurrentChannel)].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local3[2]) + ": ") + _local5[n].substr(_local5[n].indexOf(":", 1) + 1)) + "</font><br/>");
_root["window" + _root.GetWindow(_root.CurrentChannel)].data = _root["window" + _root.GetWindow(_root.CurrentChannel)].data + (("<font color='#0000FF'>[" + now) + "] *** Please type in another nickname, then hit \"Send\" or Enter</font><br/>");
SetActive(_root.DataWindow, "#0000FF");
Error_Nick = true;
parsed = true;
}
if (_local3[1].toUpperCase() == "TOPIC") {
TopicChannel = _root.GetWindow(_local3[2]);
new_topic = _local5[n].substr(_local5[n].indexOf(":", 1) + 1);
_root["window" + TopicChannel].topic = new_topic;
_root["window" + TopicChannel].topicsetby = _local4[0];
_root["window" + TopicChannel].data = _root["window" + TopicChannel].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has changed the topic to \"") + new_topic) + "\"</font><br/>");
_root.topicbar.topic = new_topic;
_root.topicbar.setby = _local4[0];
parsed = true;
}
if (_local3[1].toUpperCase() == "NICK") {
OldNick = _local4[0];
NewNick = _local6[2];
x = 100;
while (_root["window" + x]) {
i = 0;
while (_root["window" + x].users[i]) {
ThisUser = _root["window" + x].users[i];
UserPrefix = GetPrefix(ThisUser);
UserOnly = _root.replace(_root.replace(_root.replace(_root.replace(_root.replace(ThisUser, "~", ""), "&", ""), "@", ""), "%", ""), "+", "");
if (UserOnly == OldNick) {
_root["window" + x].users[i] = UserPrefix + NewNick;
_root["window" + x].users.sort();
_root.RefreshUlistLayout(0);
SetActive(_root["window" + x].name, "#0000FF");
if (OldNick == _root.myNick) {
_root["window" + x].data = _root["window" + x].data + (((("<font color='#0000FF'>[" + now) + "] *** You are now known as ") + NewNick) + "</font><BR/>");
} else {
_root["window" + x].data = _root["window" + x].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + OldNick) + " is now known as ") + NewNick) + "</font><BR/>");
}
_root["window" + x][("hosts[" + NewNick.toLowerCase()) + "]"] = _root["window" + x][("hosts[" + OldNick) + "]"];
_root["window" + x][("hosts[" + OldNick.toLowerCase()) + "]"] = undefined;
}
i++;
}
x++;
}
if (OldNick == _root.myNick) {
_root.myNick = NewNick;
flashirc.data.nickname = _root.myNick;
}
parsed = true;
}
if (_local3[1].toUpperCase() == "JOIN") {
JoinChannel = _local6[2].split(" ")[0];
if (_local4[0].toUpperCase() == _root.myNick.toUpperCase()) {
_root.CurrentChannel = JoinChannel;
if (GetWindow(JoinChannel) == undefined) {
_root.AddChannel(JoinChannel);
_root.topicbar.topic = this.topic;
}
_root["window" + GetWindow(JoinChannel)].data = _root["window" + GetWindow(JoinChannel)].data + (("<font color='#0000FF'>[" + now) + "] *** You have joined the channel</font><BR/>");
DataWindow = GetWindow(JoinChannel);
_root.ircSock.send(("MODE " + JoinChannel) + " b\n");
_root[("GetHosts[" + JoinChannel.toLowerCase()) + "]"] = true;
_root.ircSock.send(("WHO " + JoinChannel) + newline);
} else {
_root["window" + GetWindow(JoinChannel)].data = _root["window" + GetWindow(JoinChannel)].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has joined the channel</font><BR/>");
_root["window" + GetWindow(JoinChannel)].users.push(_local4[0]);
_root.RefreshUlistLayout(0);
}
_root["window" + ThisWindow][("hosts[" + _local4[0].toLowerCase()) + "]"] = _local4[1];
_root.UserCount = _root["window" + GetWindow(_root.CurrentChannel)].users.length;
parsed = true;
}
if (_local3[1].toUpperCase() == "KICK") {
kickmsg = _local5[n].substr(_local5[n].indexOf(":", 1) + 1);
SetActive(_local3[2], "#0000FF");
ThisWindow = GetWindow(_local3[2]);
if (_local3[3] == _root.myNick) {
a = 0;
while (_root["window" + ThisWindow].users[a]) {
This_User = _root["window" + ThisWindow].users[a];
User_Only = _root.replace(_root.replace(_root.replace(_root.replace(_root.replace(This_User, "~", ""), "&", ""), "@", ""), "%", ""), "+", "");
_root["window" + ThisWindow][("hosts[" + User_Only.toLowerCase()) + "]"] = undefined;
a++;
}
_root["window" + ThisWindow].users = [];
_root.RefreshUlistLayout(0);
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** You have been kicked off the channel by ") + _local4[0]) + " (") + kickmsg) + ")</font><br/>");
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** Attempting to rejoin ") + _local3[2]) + "...<br/></font>");
_root["window" + ThisWindow].RejoinChannel = true;
_root["window" + ThisWindow].ChannelTimer = getTimer();
} else {
_root["window" + ThisWindow][("hosts[" + _local3[3].toLowerCase()) + "]"] = undefined;
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((((("<font color='#0000FF'>[" + now) + "] *** ") + _local3[3]) + " has been kicked off the channel by ") + _local4[0]) + " (") + kickmsg) + ")</font><br/>");
usernum = _root.GetUser(_local3[2], _local3[3]);
This_User = _root["window" + ThisWindow].users[usernum];
User_Prefix = GetPrefix(This_User);
User_Only = _root.replace(_root.replace(_root.replace(_root.replace(_root.replace(This_User, "~", ""), "&", ""), "@", ""), "%", ""), "+", "");
(This_User.substr(1) == User_Only) || ((User_Prefix = ""));
if (User_Only.toLowerCase() == _local3[3].toLowerCase()) {
_root["window" + ThisWindow].users = _root.remove(_root["window" + ThisWindow].users, User_Prefix + User_Only);
_root.RefreshUlistLayout(0);
}
}
_root.UserCount = _root["window" + GetWindow(_root.CurrentChannel)].users.length;
parsed = true;
}
if (_local3[1].toUpperCase() == "MODE") {
modes = _local3[3];
places = 4;
moderesult = "";
ThisWindow = GetWindow(_local3[2]);
if (_local3[2] == _root.myNick) {
_root["window" + GetWindow(_root.CurrentChannel)].data = _root["window" + GetWindow(_root.CurrentChannel)].data + (((((((("<font color='#0000FF'>[" + now) + "] *** Mode change \"") + _local3[3].substr(1)) + "\" for ") + _local3[2]) + " by ") + _local3[0].substr(1)) + "</font><BR/>");
} else {
x = 0;
while (modes.substr(x, 1)) {
ThisUser = GetUser(_local3[2], _local3[places]);
username = _root["window" + ThisWindow].users[ThisUser];
thismode = modes.substr(x, 1);
nextmode = modes.substr(x + 1, 1);
if (thismode == "+") {
modetype = "+";
}
if (thismode == "-") {
modetype = "-";
}
if (((((modetype != lastmodetype) && (nextmode != "b")) && (nextmode != "o")) && (nextmode != "h")) && (nextmode != "v")) {
moderesult = moderesult + modetype;
}
if (modetype == "+") {
if (thismode == "b") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has banned \"") + _local3[places]) + "\" from the channel</font><BR/>");
places++;
} else if (thismode == "i") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has set the channel mode to \"invite only\"</font><br/>");
} else if (thismode == "k") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has set the channel key to \"") + _local3[places]) + "\"</font><BR/>");
places++;
} else if (thismode == "l") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has set the channel limit to \"") + _local3[places]) + "\"</font><br/>");
places++;
} else if (thismode == "m") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has set the channel mode to \"moderated\"</font><br/>");
} else if (thismode == "n") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has set the channel mode to \"No external messages\"</font><br/>");
} else if (thismode == "p") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has set the channel mode to \"private\"</font><br/>");
} else if (thismode == "s") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has set the channel mode to \"secret\"</font><br/>");
} else if (thismode == "t") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has set the channel mode to \"Only ops can change the topic\"</font><br/>");
} else if (thismode == "q") {
_root["window" + ThisWindow].users[ThisUser] = "~" + username;
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has given ") + _local3[places]) + " founder status</font><br/>");
places++;
} else if (thismode == "a") {
_root["window" + ThisWindow].users[ThisUser] = "&" + username;
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has given ") + _local3[places]) + " SuperOp status</font><br/>");
places++;
} else if (thismode == "o") {
if (_local3[places].toLowerCase() == _root.myNick.toLowerCase()) {
_root[("iAmOp[\"" + _local3[2].toLowerCase()) + "\"]"] = true;
}
_root["window" + ThisWindow].users[ThisUser] = "@" + username;
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has opped ") + _local3[places]) + "</font><BR/>");
places++;
} else if (thismode == "h") {
if (_local3[places].toLowerCase() == _root.myNick.toLowerCase()) {
_root[("iAmOp[\"" + _local3[2].toLowerCase()) + "\"]"] = true;
}
_root["window" + ThisWindow].users[ThisUser] = "%" + username;
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has half-opped ") + _local3[places]) + "</font><BR/>");
places++;
} else if (thismode == "v") {
_root["window" + ThisWindow].users[ThisUser] = "+" + username;
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has voiced ") + _local3[places]) + "</font><BR/>");
places++;
} else if (thismode != "+") {
moderesult = moderesult + thismode;
}
} else if (modetype == "-") {
if (thismode == "b") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has unbanned \"") + _local3[places]) + "\" from the channel</font><BR/>");
places++;
} else if (thismode == "i") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has removed the \"invite only\" channel mode</font><br/>");
} else if (thismode == "k") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has removed the channel key</font><br/>");
places++;
} else if (thismode == "l") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has removed the channel limit</font><br/>");
} else if (thismode == "m") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has removed the \"moderated\" channel mode</font><br/>");
} else if (thismode == "n") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has removed the \"no external messages\" channel mode</font><br/>");
} else if (thismode == "p") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has removed the \"private\" channel mode</font><br/>");
} else if (thismode == "s") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has removed the \"secret\" channel mode</font><br/>");
} else if (thismode == "t") {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has removed the \"Only ops can change the topic\" channel mode</font><br/>");
} else if (thismode == "q") {
_root["window" + ThisWindow].users[ThisUser] = _root.replace(username, "~", "");
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has removed ") + _local3[places]) + "'s founder status</font><br/>");
places++;
} else if (thismode == "a") {
_root["window" + ThisWindow].users[ThisUser] = _root.replace(username, "&", "");
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has removed ") + _local3[places]) + "'s SuperOp status</font><br/>");
places++;
} else if (thismode == "o") {
if (_local3[places].toLowerCase() == _root.myNick.toLowerCase()) {
_root[("iAmOp[\"" + _local3[2].toLowerCase()) + "\"]"] = undefined;
}
_root["window" + ThisWindow].users[ThisUser] = _root.replace(username, "@", "");
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has deopped ") + _local3[places]) + "</font><BR/>");
places++;
} else if (thismode == "h") {
if (_local3[places].toLowerCase() == _root.myNick.toLowerCase()) {
_root[("iAmOp[\"" + _local3[2].toLowerCase()) + "\"]"] = undefined;
}
_root["window" + ThisWindow].users[ThisUser] = _root.replace(username, "%", "");
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has DeHalf-Opped ") + _local3[places]) + "</font><BR/>");
places++;
} else if (thismode == "v") {
_root["window" + ThisWindow].users[ThisUser] = _root.replace(username, "+", "");
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has unvoiced ") + _local3[places]) + "</font><BR/>");
places++;
} else if (thismode != "-") {
moderesult = moderesult + thismode;
}
}
lastmodetype = modetype;
_root["window" + ThisWindow].users[ThisUser] = GetPrefix(_root["window" + ThisWindow].users[ThisUser]) + _root.replace(_root.replace(_root.replace(_root.replace(_root.replace(_root["window" + ThisWindow].users[ThisUser], "~", ""), "&", ""), "@", ""), "%", ""), "+", "");
x++;
}
if (((moderesult != "") && (moderesult != "+")) && (moderesult != "-")) {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((((("<font color='#0000FF'>[" + now) + "] *** Mode change \"") + moderesult) + "\" by ") + _local4[0]) + "</font><BR/>");
}
_root.RefreshUlistLayout(0);
}
parsed = true;
}
if (_local3[1].toUpperCase() == "QUIT") {
quitmsg = _local5[n].substr(_local5[n].indexOf(":", 1) + 1);
i = 100;
while (_root["window" + i]) {
if (_root.GetUser(_root["window" + i].name, _local4[0]) != false) {
_root.RemoveUser(_root["window" + i].name, _root.GetPrefix(_local4[0]) + _local4[0]);
_root["window" + i][("hosts[" + _local4[0].toLowerCase()) + "]"] = undefined;
_root["window" + i].data = _root["window" + i].data + (((((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has quit IRC (") + quitmsg) + ")</font><br/>");
_root.UserCount = _root["window" + GetWindow(_root.CurrentChannel)].users.length;
}
i++;
}
_root.RefreshUlistLayout(0);
parsed = true;
}
if (_local3[1].toUpperCase() == "PART") {
ThisWindow = GetWindow(_local3[2]);
_root["window" + ThisWindow][("hosts[" + _local4[0].toLowerCase()) + "]"] = undefined;
partmsg = _local5[n].substr(_local5[n].indexOf(":", 1) + 1);
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local4[0]) + " has left the channel");
if (_local6[0]) {
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + ((" (" + partmsg) + ")");
}
_root["window" + ThisWindow].data = _root["window" + ThisWindow].data + "</font><BR/>";
if (_local4[0].toLowerCase() == _root.myNick.toLowerCase()) {
if (_root[("hop[" + _local3[2]) + "]"] == undefined) {
_root.myChannels = _root.remove(_root.myChannels, _local3[2]);
_root.WindowMouseDown.apply(_root["window" + (ThisWindow - 1)]);
ChannelDepth = ChannelDepth - 1;
_root.RefreshChannelLayout();
}
_root["window" + ThisWindow].users = [];
a = 0;
while (_root["window" + ThisWindow].users[a]) {
This_User = _root["window" + ThisWindow].users[a];
User_Only = _root.replace(_root.replace(_root.replace(_root.replace(_root.replace(This_User, "~", ""), "&", ""), "@", ""), "%", ""), "+", "");
_root["window" + ThisWindow][("hosts[" + User_Only.toLowerCase()) + "]"] = undefined;
a++;
}
_root.RefreshUlistLayout();
} else {
_root["window" + ThisWindow].users = _root.remove(_root["window" + ThisWindow].users, User_Prefix + User_Only);
_root.refreshUlistLayout(0);
}
_root.UserCount = _root["window" + GetWindow(_root.CurrentChannel)].users.length;
parsed = true;
}
if (_local3[1].toUpperCase() == "PRIVMSG") {
MsgType = "message";
message = _local5[n].substr(_local5[n].indexOf(":", 1) + 1);
if (message.indexOf("\x01") == 0) {
SetActive(_local3[2], "#555555");
ctcpmessage = message.split("\x01")[1];
request = ctcpmessage.split(" ");
if (request[0].toLowerCase() == "action") {
MsgType = "action";
message = ctcpmessage.substr(request[0].length);
}
if (request[0].toLowerCase() == "time") {
_root.ircSock.send((((((("NOTICE " + _local4[0]) + " :") + "\x01") + "TIME ") + now) + "\x01") + newline);
}
if (request[0].toLowerCase() == "version") {
_root.ircSock.send((((((("NOTICE " + _local4[0]) + " :") + "\x01") + "VERSION ") + CTCPVersionReply) + "\x01") + newline);
}
if (request[0].toLowerCase() == "finger") {
_root.ircSock.send(((((((("NOTICE " + _local4[0]) + " ") + "\x01") + "FINGER I have been idle for ") + Math.round((getTimer() / 1000) - (LastActive / 1000))) + " seconds") + "\x01") + newline);
}
if (request[0].toLowerCase() != "action") {
UserFound = false;
i = 0;
while (_root["window" + (i + 100)]) {
if (_root.GetUser(_root["window" + (i + 100)].name, _local4[0]) != false) {
UserFound = true;
_root["window" + (i + 100)].data = _root["window" + (i + 100)].data + (((((("<font color='#555555'>[" + now) + "] <b>(</b><u>") + _local4[0]) + "</u><b>)</b> CTCP ") + request[0]) + " Request</font><br/>");
SetActive(_root["window" + (i + 100)].name, "#555555");
}
i++;
}
if (UserFound != true) {
_root.window100.data = _root.window100.data + (((((("<font color='#555555'>[" + now) + "] <b>(</b><u>") + _local4[0]) + "</u><b>)</b> CTCP ") + request[0]) + " Request</font><br/>");
SetActive(_root.ircServ, "#555555");
}
}
}
if (_local3[2].toUpperCase() == _root.myNick.toUpperCase()) {
if (message.indexOf("\x01") == 0) {
request = message.substr(1).split(" ");
} else {
if (GetWindow(_local4[0]) == undefined) {
AddChannel(_local4[0], "query");
_root["window" + _root.GetWindow(_local4[0])].users = [_local4[0]];
_root.RefreshUlistLayout(0);
_root.topicbar.topic = "Query with " + _local4[0];
_root.topicbar.UserCount = 0;
}
_root["window" + GetWindow(_local4[0])].data = _root["window" + GetWindow(_local4[0])].data + (((((("[" + now) + "] <") + _local4[0]) + "> ") + message) + "<br/>");
}
} else {
SetActive(_local3[2], "#FF0000");
ThisUser = _root["window" + GetWindow(_local3[2])].users[_root.GetUser(_local3[2], _local4[0])];
UserPrefix = GetPrefix(ThisUser).charAt(0);
UserOnly = _root.replace(_root.replace(_root.replace(_root.replace(_root.replace(ThisUser, "~", ""), "&", ""), "@", ""), "%", ""), "+", "");
if (MsgType == "action") {
_root["window" + GetWindow(_local3[2])].data = _root["window" + GetWindow(_local3[2])].data + (((((((("[" + now) + "] * <font color=\"") + _root[("UserColors[\"" + UserPrefix) + "\"]"]) + "\">") + UserOnly) + "</font>") + message) + "<br/>");
} else {
_root["window" + GetWindow(_local3[2])].data = _root["window" + GetWindow(_local3[2])].data + (((((((("[" + now) + "] <<font color=\"") + _root[("UserColors[\"" + UserPrefix) + "\"]"]) + "\">") + UserOnly) + "</font>> ") + message) + "<br/>");
}
}
parsed = true;
}
if (_local3[1].toUpperCase() == "NOTICE") {
message = _local5[n].substr(_local5[n].indexOf(":", 1) + 1);
if ((_local3[2].toLowerCase() != _root.myNick.toLowerCase()) && (registered == true)) {
x = 0;
while (_root["window" + GetWindow(_local3[2])].users[x]) {
UserPrefix = _root["window" + GetWindow(_local3[2])].users[x].substr(0, 1);
UserOnly = _root["window" + GetWindow(_local3[2])].users[x].substr(1);
if (((((UserPrefix != "~") && (UserPrefix != "&")) && (UserPrefix != "@")) && (UserPrefix != "%")) && (UserPrefix != "+")) {
UserOnly = _root["window" + GetWindow(_local3[2])].users[x];
UserPrefix = "-";
}
if (UserOnly == _local4[0]) {
_root["window" + GetWindow(_local3[2])].data = _root["window" + GetWindow(_local3[2])].data + (((((((("<font color='#555555'>[" + now) + "] <</font><font color=\"") + _root[("UserColors[\"" + UserPrefix) + "\"]"]) + "\">") + UserOnly) + "</font><font color='#555555'>> Notice: ") + message) + "</font><br/>");
SetActive(_local3[2], "#555555");
}
x++;
}
}
if ((registered != true) || (_local3[0].substr(1) == _root.ircServ)) {
if (registered != true) {
_root.ircServ = _local3[0].substr(1);
_root.window100.topic = ("Connected to <font color='#FF0000'>" + _root.ircServ) + "</font>";
_root.topicbar.topic = _root.window100.topic;
_root.window100.label = _root.ircServ;
_root.window100.name = _root.ircServ;
_root.window100.data = _root.window100.data + (((("<font color='#0000FF'>[" + now) + "] ") + _local5[n].substr(_local5[n].indexOf(":", 1) + 1)) + "</font><br/>");
} else {
_root.window100.data = _root.window100.data + (((("<font color='#0000FF'>[" + now) + "] *** ") + _local5[n].substr(_local5[n].indexOf(":", 1) + 1)) + "</font><br/>");
}
SetActive(_root.ircServ, "#0000FF");
}
if ((_local3[2].toLowerCase() == _root.myNick.toLowerCase()) && (_local3[0].substr(1) != _root.ircServ)) {
message = _local5[n].substr(_local5[n].indexOf(":", 1) + 1);
UserFound = false;
i = 0;
while (_root["window" + (i + 100)]) {
if (_root.GetUser(_root["window" + (i + 100)].name, _local4[0]) != false) {
UserFound = true;
if (message.substr(0, 1) == "\x01") {
_root["window" + (i + 100)].data = _root["window" + (i + 100)].data + (((((((("<font color='#555555'>[" + now) + "] <b>(</b><u>") + _local4[0]) + "</u><b>)</b> CTCP ") + message.split("\x01")[1].split(" ")[0]) + " Reply: ") + message.split("\x01")[1].substr(length(message.split("\x01")[1].split(" ")[0]))) + "<br/>");
} else {
_root["window" + (i + 100)].data = _root["window" + (i + 100)].data + (((((("<font color='#555555'>[" + now) + "] <") + _local4[0]) + "> Notice: ") + message) + "<br/>");
}
SetActive(_root["window" + (i + 100)].name, "#555555");
}
i++;
}
if (UserFound != true) {
_root.window100.data = _root.window100.data + (((((("<font color='#555555'>[" + now) + "] <") + _local4[0]) + "> Notice: ") + message) + "<br/>");
SetActive(_root.ircServ, "#555555");
}
}
parsed = true;
}
if (parsed == false) {
ServerOutput(_local5[n]);
}
_root.ircData = _root["window" + GetWindow(_root.CurrentChannel)].data;
n++;
}
CheckLines();
}
function ServerOutput(message) {
splits = message.split(" ");
_root.SetActive(_root.ircServ, "#0000FF");
startindex = ((splits[0].length + splits[1].length) + splits[2].length) + 3;
if ((splits[3].substr(0, 1) != ":") && (message.indexOf(":", 1) != -1)) {
This_Window = _root.GetWindow(splits[3]);
if (This_Window == undefined) {
This_Window = _root.GetWindow(_root.CurrentChannel);
}
_root["window" + This_Window].data = _root["window" + This_Window].data + ((((("<font color='#0000FF'>[" + now) + "] *** ") + message.substr(startindex, message.indexOf(":", 1) - startindex)) + message.substr(message.indexOf(":", 1) + 1)) + "</font><br/>");
} else if (message.indexOf(":", 1) != -1) {
_root.window100.data = _root.window100.data + (((("<font color='#0000FF'>[" + now) + "] *** ") + message.substr(message.indexOf(":", 1) + 1)) + "</font><br/>");
} else {
_root.window100.data = _root.window100.data + (((("<font color='#0000FF'>[" + now) + "] *** ") + message.substr(startindex)) + "</font><br/>");
}
}
function WhoisData(data) {
_root["window" + _root.DataWindow].data = _root["window" + _root.DataWindow].data + (((("<font color='#0000FF'>[" + now) + "] *** ") + data.substr(data.indexOf(":", 1) + 1)) + "</font><br/>");
SetActive(_root.DataWindow, "#0000FF");
parsed = true;
}
Instance of Symbol 58 MovieClip "bold_mc" in Frame 2
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse) == true) {
this.clicked = true;
this.frstindx = _root.toSend_frstindx;
this.lastindx = _root.toSend_lastindx;
}
}
onClipEvent (mouseUp) {
if (this.clicked) {
this.clicked = false;
_root.toSend_selected = true;
_root.toSend = _root.LastMessage;
Selection.setFocus("_root.toSend");
if (this.frstindx == this.lastindx) {
_root.fcc_help.play();
} else {
_root.toSend = _root.FormatText(_root.toSend_txt, "b", this.frstindx, this.lastindx);
}
Selection.setSelection(this.frstindx, this.lastindx);
}
}
Instance of Symbol 60 MovieClip "italic_mc" in Frame 2
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse) == true) {
this.clicked = true;
this.frstindx = _root.toSend_frstindx;
this.lastindx = _root.toSend_lastindx;
}
}
onClipEvent (mouseUp) {
if (this.clicked) {
this.clicked = false;
_root.toSend_selected = true;
_root.toSend = _root.LastMessage;
Selection.setFocus("_root.toSend");
if (this.frstindx == this.lastindx) {
_root.fcc_help.play();
} else {
_root.toSend = _root.FormatText(_root.toSend_txt, "i", this.frstindx, this.lastindx);
}
Selection.setSelection(this.frstindx, this.lastindx);
}
}
Instance of Symbol 62 MovieClip "uline_mc" in Frame 2
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse) == true) {
this.clicked = true;
this.frstindx = _root.toSend_frstindx;
this.lastindx = _root.toSend_lastindx;
}
}
onClipEvent (mouseUp) {
if (this.clicked) {
this.clicked = false;
_root.toSend_selected = true;
_root.toSend = _root.LastMessage;
Selection.setFocus("_root.toSend");
if (this.frstindx == this.lastindx) {
_root.fcc_help.play();
} else {
_root.toSend = _root.FormatText(_root.toSend_txt, "u", this.frstindx, this.lastindx);
}
Selection.setSelection(this.frstindx, this.lastindx);
}
}
Instance of Symbol 82 MovieClip "whois_btn" in Frame 2
onClipEvent (load) {
this.action = "WHOIS";
}
onClipEvent (mouseDown) {
if (!disabled) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.gotoAndStop(2);
}
}
}
onClipEvent (mouseUp) {
if (!this.disabled) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.DataWindow = _root.GetWindow(_root.CurrentChannel);
_root.ircSock.send(("WHOIS " + _root.SelectedUser) + newline);
}
this.gotoAndStop(1);
}
}
Instance of Symbol 82 MovieClip "time_btn" in Frame 2
onClipEvent (load) {
this.action = "TIME";
}
onClipEvent (mouseDown) {
if (!disabled) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.gotoAndStop(2);
}
}
}
onClipEvent (mouseUp) {
if (!this.disabled) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.ircSock.send(((((("PRIVMSG " + _root.SelectedUser) + " :") + "\x01") + "TIME") + "\x01") + newline);
}
this.gotoAndStop(1);
}
}
Instance of Symbol 82 MovieClip "finger_btn" in Frame 2
onClipEvent (load) {
this.action = "FINGER";
}
onClipEvent (mouseDown) {
if (!disabled) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.gotoAndStop(2);
}
}
}
onClipEvent (mouseUp) {
if (!this.disabled) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.ircSock.send(((((("PRIVMSG " + _root.SelectedUser) + " :") + "\x01") + "FINGER") + "\x01") + newline);
}
this.gotoAndStop(1);
}
}
Instance of Symbol 82 MovieClip "version_btn" in Frame 2
onClipEvent (load) {
this.action = "VERSION";
}
onClipEvent (mouseDown) {
if (!disabled) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.gotoAndStop(2);
}
}
}
onClipEvent (mouseUp) {
if (!this.disabled) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.ircSock.send(((((("PRIVMSG " + _root.SelectedUser) + " :") + "\x01") + "VERSION") + "\x01") + newline);
}
this.gotoAndStop(1);
}
}
Instance of Symbol 82 MovieClip "kick_btn" in Frame 2
onClipEvent (load) {
this.action = "KICK";
}
onClipEvent (mouseDown) {
if (!disabled) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.gotoAndStop(2);
}
}
}
onClipEvent (mouseUp) {
this.gotoAndStop(1);
if ((!disabled) && (_root.iAmOp(_root.CurrentChannel) != false)) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.topicbar.kick_scrn._visible = true;
_root.topicbar.kick_scrn.nick = _root.SelectedUser;
Selection.setFocus("_root.topicbar.kick_scrn.nick");
Selection.setSelection(_root.topicbar.kick_scrn.nick.length, _root.topicbar.kick_scrn.nick.length);
}
}
}
Instance of Symbol 82 MovieClip "query_btn" in Frame 2
onClipEvent (load) {
this.action = "QUERY";
}
onClipEvent (mouseDown) {
if (!disabled) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.gotoAndStop(2);
}
}
}
onClipEvent (mouseUp) {
if (!this.disabled) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (_root.GetWindow(_root.SelectedUser) == undefined) {
_root.AddChannel(_root.SelectedUser, "query");
}
_root.WindowMouseDown.apply(_root["window" + _root.GetWindow(_root.SelectedUser)]);
}
this.gotoAndStop(1);
}
}
Instance of Symbol 181 MovieClip "popup" in Frame 2
onClipEvent (load) {
function tweenTo(object, _h) {
object._height = object._height - ((object._height - _h) * 0.4);
}
this.speed = 10;
this.swapDepths(10000);
}
onClipEvent (enterFrame) {
if (this._alpha >= 0) {
this.data = "";
this._alpha = this._alpha - this.speed;
}
i = 0;
while (_root.UserArray[i]) {
if (_root["user" + i].hitTest(_root._xmouse, _root._ymouse)) {
this._alpha = 100;
this.data = _root["user" + i].info;
this._x = _root._xmouse;
this._y = _root._ymouse;
}
i++;
}
this.lines = this.data.split(newline).length;
this.tweenTo(this.bg, this.lines * 17);
this.tweenTo(data_txt, this.lines * 17);
}
Symbol 5 MovieClip [window] Frame 1
stop();
Symbol 5 MovieClip [window] Frame 2
stop();
Symbol 11 MovieClip [user] Frame 1
stop();
Symbol 11 MovieClip [user] Frame 2
uname = username;
stop();
Symbol 43 MovieClip Frame 1
stop();
MaxWidth = loader._width;
loader._width = 0;
onEnterFrame = function () {
percnt = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
masked_loadtxt.text = Math.round(percnt) + "% loaded";
unmasked_loadtxt.text = Math.round(percnt) + "% loaded";
loader._width = (MaxWidth / 100) * percnt;
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
nextFrame();
_root.myNick_txt.type = "input";
_root.myPass_txt.type = "input";
_root.myPass_txt.password = true;
(_root.flashirc.data.password == undefined) || ((_root.myPass_txt.text = _root.flashirc.data.password));
_root.login.enabled = true;
Selection.setFocus("_root.myNick_txt");
Selection.setSelection(_root.myNick_txt.length, _root.myNick_txt.length);
onEnterFrame = undefined;
}
};
Symbol 55 MovieClip Frame 1
stop();
Symbol 69 Button
on (press) {
startDrag (drag_btn, true, 0, (drag_btn._height / 2) + 1, 0, MaxDrag);
}
on (release) {
stopDrag();
}
on (releaseOutside) {
stopDrag();
}
Symbol 70 MovieClip Frame 1
MaxDrag = (_root.scroller._height - (drag_btn._height / 2)) + 2;
onEnterFrame = function () {
DataLines = _root.ircData.maxscroll + 10;
LineValue = (MaxDrag - 1) / DataLines;
line = Math.round((drag_btn._y - (drag_btn._height / 2)) / LineValue);
_root.ircData.scroll = line;
};
Symbol 72 Button
on (press) {
startDrag (drag_btn, true, 0, (drag_btn._height / 2) + 1, 0, MaxDrag);
drag_btn_held = true;
}
on (release, releaseOutside) {
stopDrag();
drag_btn_held = false;
}
Symbol 73 MovieClip Frame 1
MaxDrag = _root.UlistScroller._height - (drag_btn._height / 2);
drag_btn._y = drag_btn._height / 2;
drag_btn_held = false;
onMouseMove = function () {
if (drag_btn_held == false) {
return(undefined);
}
UserNum = _root["window" + _root.GetWindow(_root.CurrentChannel)].users.length;
LineValue = (MaxDrag - 1) / UserNum;
line = Math.round((drag_btn._y - (drag_btn._height / 2)) / LineValue);
if (line >= 0) {
_root.RefreshUlistLayout(line);
}
};
Symbol 82 MovieClip Frame 1
onEnterFrame = function () {
if (_root.SelectedUser != undefined) {
this.disabled = false;
this.screen._visible = false;
} else {
this.disabled = true;
this.screen._visible = true;
}
};
stop();
Symbol 82 MovieClip Frame 2
stop();
Symbol 89 Button
on (release) {
if (_root.CurrentChannel.toLowerCase() == _root.ircServ.toLowerCase()) {
return(undefined);
}
winnum = _root.GetWindow(_root.CurrentChannel);
if (_root["window" + winnum].type.toLowerCase() == "channel") {
_root.ircSock.send(("PART " + _root.CurrentChannel) + newline);
} else {
_root.myChannels = _root.remove(_root.myChannels, _root["window" + winnum].label);
}
if (_root["window" + (winnum + 1)]) {
_root.WindowMouseDown.apply(_root["window" + (winnum + 1)]);
} else {
_root.WindowMouseDown.apply(_root["window" + (winnum - 1)]);
}
_root.RefreshChannelLayout();
}
Symbol 92 Button
on (release) {
CurChanWin = _root.GetWindow(_root.CurrentChannel);
if (_root["window" + CurChanWin].type == "list") {
return(undefined);
}
if (_root.CurrentChannel == _root.ircServ) {
serverinfo._visible = true;
serverinfo.server = _root.ircServ;
return(undefined);
}
if (_root["window" + CurChanWin].type == "query") {
queryinfo._visible = true;
queryinfo.nick = _root["window" + CurChanWin].name;
Selection.setFocus("queryinfo.nick");
}
if (InfoWindow._visible == true) {
return(undefined);
}
bansetters = _root["window" + CurChanWin].bansetters;
banlist = _root["window" + CurChanWin].banlist;
InfoWindow.unban = new Array();
InfoWindow.ban = new Array();
InfoWindow._visible = true;
InfoWindow.BanPos = 0;
InfoWindow.channel = _root.CurrentChannel;
InfoWindow.topic = topic;
Selection.setFocus("InfoWindow.topic");
if (topic != "") {
InfoWindow.topic_info = "Set by " + topicsetby;
}
if (_root[("iAmOp[\"" + _root.CurrentChannel.toLowerCase()) + "\"]"] == true) {
InfoWindow.op_text = "You are a channel operator. You are allowed to make mode and topic changes.";
} else {
InfoWindow.op_text = "You are not a channel operator. Any changes you make will not effect the channel.";
}
Selection.setSelection(InfoWindow.topic.length, InfoWindow.topic.length);
RefreshBanList(0);
InfoWindow.ChanKey = _root.ChanKey(_root.CurrentChannel);
InfoWindow.MaxUsers = _root.ChanLimit(_root.CurrentChannel);
}
Symbol 100 Button
on (release, releaseOutside) {
_visible = false;
_root.toSend_txt.text = _root.LastMessage;
Selection.setFocus("_root.toSend_txt");
Selection.setSelection(toSend_txt.length, toSend_txt.length);
}
Symbol 101 Button
on (release) {
if (_root.iAmOp(_root.CurrentChannel) == true) {
if (_root["window" + _root.GetWindow(_root.CurrentChannel)].topic != topic) {
_root.ircSock.send(((("TOPIC " + channel) + " :") + _root.html2irc(topic)) + newline);
}
}
_visible = false;
_root.toSend_txt.text = _root.LastMessage;
Selection.setFocus("_root.toSend_txt");
Selection.setSelection(toSend_txt.length, toSend_txt.length);
}
Symbol 102 Button
on (release) {
_visible = false;
_root.toSend_txt.text = _root.LastMessage;
Selection.setFocus("_root.toSend_txt");
Selection.setSelection(toSend_txt.length, toSend_txt.length);
}
Symbol 104 Button
on (release) {
if (_root.iAmOp(_root.CurrentChannel) == true) {
_parent.ban_add_scrn._visible = true;
}
}
Symbol 105 Button
on (release) {
if ((selected_ban != undefined) && (_root.iAmOp(_root.CurrentChannel) == true)) {
_root.ircSock.send(((("MODE " + _root.CurrentChannel) + " -b ") + selected_ban) + newline);
_parent.bansetters = _root.removeMovieClip(_parent.banlist, selban_setter);
_parent.banlist = _root.remove(_parent.banlist, selected_ban);
_parent.RefreshBanList(BanPos);
}
}
Symbol 107 Button
on (press) {
if (BanPos > 0) {
BanPos--;
_parent.RefreshBanList(BanPos);
}
}
Symbol 108 Button
on (press) {
if (BanPos < (_root["window" + _parent.CurChanWin].banlist.length - 5)) {
BanPos++;
_parent.RefreshBanList(BanPos);
}
}
Symbol 110 MovieClip Frame 1
_visible = false;
Symbol 117 Button
on (release) {
_root.ircSock.send((((((("MODE " + _root.CurrentChannel) + " +b ") + nick) + "!") + ident) + "@") + host);
_parent.bansetters.push(_root.myNick);
_parent.banlist.push((((nick + "!") + ident) + "@") + host);
_parent.RefreshBanList(0);
_visible = false;
_root.toSend_txt.text = _root.LastMessage;
Selection.setFocus("_root.toSend_txt");
Selection.setSelection(toSend_txt.length, toSend_txt.length);
}
Symbol 120 MovieClip Frame 1
_visible = false;
Symbol 126 MovieClip Frame 1
_visible = false;
Symbol 130 Button
on (release) {
if (_root.iAmOp(_root.CurrentChannel)) {
_root.ircSock.send((((("KICK " + _root.CurrentChannel) + " ") + nick) + " :") + reason);
}
_visible = false;
_root.toSend_txt.text = _root.LastMessage;
Selection.setFocus("_root.toSend_txt");
Selection.setSelection(toSend_txt.length, toSend_txt.length);
}
Symbol 135 MovieClip Frame 1
_visible = false;
Symbol 138 Button
on (release) {
_visible = false;
if (away_rsn != "") {
_root.ircSock.send(("AWAY :" + away_rsn) + newline);
}
_root.toSend_txt.text = _root.LastMessage;
Selection.setFocus("_root.toSend_txt");
Selection.setSelection(toSend_txt.length, toSend_txt.length);
}
Symbol 141 MovieClip Frame 1
_visible = false;
Symbol 147 Button
on (release) {
if (_parent.chan_list.ChannelArray.length == 0) {
_root.ircSock.send("LIST\n");
_root.toSend_selected = true;
_root.toSend_txt.text = _root.LastMessage;
Selection.setFocus("_root.toSend_txt");
Selection.setSelection(_root.toSend_txt.length, _root.toSend_txt.length);
} else {
_parent.chan_list._visible = true;
}
HideMenu();
}
Symbol 148 Button
on (release) {
_parent.chanjoin_scrn._visible = true;
Selection.setFocus("_parent.chanjoin_scrn.channel");
HideMenu();
}
Symbol 149 Button
on (release) {
_root.ircSock.send("AWAY :\n");
Selection.setFocus("_root.toSend_txt");
HideMenu();
}
Symbol 150 Button
on (release) {
_parent.away_scrn._visible = true;
Selection.setFocus("_parent.away_scrn.away_rsn");
HideMenu();
}
Symbol 151 MovieClip Frame 1
function HideMenu() {
onEnterFrame = function () {
this._y = this._y - (0.2 * (this._y - (_parent.Menu_Y - this._height)));
if (Math.round(this._y) == (_parent.Menu_Y - this._height)) {
onEnterFrame = undefined;
}
};
}
Symbol 155 Button
on (release) {
if (Math.round(optmenu._y) == Math.round(Menu_Y)) {
optmenu.HideMenu();
} else {
optmenu.onEnterFrame = function () {
optmenu._y = optmenu._y + (0.2 * (Menu_Y - optmenu._y));
if (Math.round(optmenu._y) == Math.round(Menu_Y - optmenu._y)) {
optmenu.onEnterFrame = undefined;
}
};
}
_root.toSend_txt.text = _root.LastMessage;
Selection.setFocus("_root.toSend_txt");
Selection.setSelection(toSend_txt.length, toSend_txt.length);
}
Symbol 159 Button
on (release) {
_root.ircSock.send(((("JOIN " + channel) + " :") + chan_key) + newline);
_visible = false;
_root.toSend_txt.text = _root.LastMessage;
Selection.setFocus("_root.toSend_txt");
Selection.setSelection(toSend_txt.length, toSend_txt.length);
}
Symbol 163 MovieClip Frame 1
_visible = false;
Symbol 165 Button
on (press) {
LineValue = Maxbtm_drg / ChannelNo;
if ((drag_btn._y - LineValue) > Maxtop_drg) {
drag_btn._y = drag_btn._y - LineValue;
ScrollPos = Math.round((drag_btn._y - Maxtop_drg) / LineValue);
RefreshChannelView(ScrollPos);
}
}
Symbol 166 Button
on (press) {
LineValue = Maxbtm_drg / ChannelNo;
if ((drag_btn._y + LineValue) < Maxbtm_drg) {
drag_btn._y = drag_btn._y + LineValue;
ScrollPos = Math.round((drag_btn._y - Maxtop_drg) / LineValue);
RefreshChannelView(ScrollPos);
}
}
Symbol 168 Button
on (press) {
startDrag (drag_btn, true, 202.1, Maxtop_drg, 202.1, Maxbtm_drg);
dragging = true;
}
on (release, releaseOutside) {
dragging = false;
stopDrag();
}
Symbol 169 Button
on (press) {
_root.ircSock.send("LIST\n");
}
Symbol 172 Button
on (press) {
_visible = false;
_root.toSend_txt.text = _root.LastMessage;
Selection.setFocus("_root.toSend_txt");
Selection.setSelection(toSend_txt.length, toSend_txt.length);
}
Symbol 174 MovieClip Frame 1
function RefreshChannelView(pos) {
a = 0;
while (a < MaxChannels) {
if (this["list" + a]) {
this["list" + a].removeMovieClip();
}
a++;
}
a = pos;
while (ChannelArray[a] && ((a - pos) < MaxChannels)) {
attachMovie("list_btn", "list" + (a - pos), a - pos);
this["list" + (a - pos)].name = ChannelArray[a];
this["list" + (a - pos)].ucount = UserCount[a];
this["list" + (a - pos)].topic = ChanTopic[a];
this["list" + (a - pos)]._x = ChannelX;
this["list" + (a - pos)]._y = ChannelY + (this["list" + (a - pos)]._height * (a - pos));
this["list" + (a - pos)].stop();
this["list" + (a - pos)].btn.channel = ChannelArray[a];
this["list" + (a - pos)].btn.onPress = function () {
_root.ircSock.send(("JOIN " + this.channel) + newline);
};
a++;
}
ChannelNo = ChannelArray.length;
}
ChannelArray = new Array();
UserCount = new Array();
ChanTopic = new Array();
_visible = false;
ChannelX = -4.5;
ChannelY = -28.9;
Maxtop_drg = -8.1;
Maxbtm_drg = 79.9;
MaxChannels = 9;
onEnterFrame = function () {
if (dragging == true) {
LineValue = Maxbtm_drg / ChannelNo;
ScrollPos = Math.round((drag_btn._y - Maxtop_drg) / LineValue);
RefreshChannelView(ScrollPos);
}
};
Symbol 176 MovieClip Frame 1
function RefreshBanList(pos) {
if (banlist.length == 0) {
return(undefined);
}
a = 0;
while (InfoWindow["ban" + i]) {
InfoWindow["ban" + i].removeMovieClip();
a++;
}
maxpos = pos + 5;
i = 0;
while (i < 5) {
InfoWindow.attachMovie("ban", "ban" + i, i);
InfoWindow["ban" + i].onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
i = 0;
while (i < 5) {
InfoWindow["ban" + i].gotoAndStop(1);
i++;
}
this.gotoAndStop(2);
InfoWindow.selected_ban = this.ban;
InfoWindow.selban_setter = this.Banner;
InfoWindow.BanInfo = "Set by " + this.Banner;
}
};
InfoWindow["ban" + i]._x = _root.banlist_x;
InfoWindow["ban" + i]._y = (_root.banlist_y + (InfoWindow["ban" + i]._height * i)) - i;
InfoWindow["ban" + i].stop();
InfoWindow["ban" + i].ban = banlist[pos];
InfoWindow["ban" + i].Banner = bansetters[pos];
if (!banlist[pos + 1]) {
i = 5;
}
i++;
pos++;
}
}
Menu_Y = optmenu._y;
optmenu._y = Menu_Y - optmenu._height;
Symbol 181 MovieClip Frame 1
stop();
Symbol 182 Button
on (press) {
ScrollUpBTN_MouseDown = true;
}
on (release) {
ScrollUpBTN_MouseDown = false;
}
Symbol 183 Button
on (press) {
ScrollDownBTN_MouseDown = true;
}
on (release) {
ScrollDownBTN_MouseDown = false;
}
Symbol 194 MovieClip Frame 1
stop();
Symbol 195 Button
on (release) {
toSend = LastMessage;
SendMsg();
Selection.setFocus("toSend_txt");
}
Symbol 219 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 212
gotoAndStop (1);