// Ignorierfunktion
// by DarkModi
// 28. Oktober 2007 - V. 3
// Diese Zeile NICHT editieren!
ignoreList = {};
// User, die nicht ignorierbar sind
// Syntax: ignoreList["USERNAME"] = 0;
// Der Username muss in jedem Fall KLEINgeschrieben sein!
ignoreList["admin"] = 0;
ignoreList["henryfrettchen"] = 0;
ignoreList["paul"] = 0;
// Sollen Admins und Mods ignorieren können?
// 0 = nein, 1 = ja
modAdminCanIgnore = 1;
// Sollen Login/Out-Meldungen trotz Ignore angezeigt werden?
// 0 = nein, 1 = ja
showLogInOutAtIgnore = 0;
// AB HIER NICHTS MEHR ÄNDERN!!
chtLen = 0;
chtCon = document.getElementsByTagName("td");
function loopStream () {
while (chtLen < chtCon.length) {
var liDa = lineData(chtCon[chtLen]);
if (liDa && ignoreList[liDa[2].toLowerCase()] && liDa[0] < logInOutIgnore)
document.getElementsByTagName("tr")[chtLen].style.display = "none";
chtLen++;
}
}
function ignoreUser (user) {
if (!user.match(/\W/)) {
if (user != myNick) {
if (modAdminCanIgnore || myStatus < 2) {
var s = user.toLowerCase();
if (ignoreList[s] == null) {
ignoreList[s] = user;
var ignored = getCookie("ignoreList");
ignored = (ignored) ? ignored : "";
setCookie("ignoreList" + myNick, ignored + s + ",", new Date(2020, 0, 0));
} else if (!ignoreList[s]) {
document.write("</i><div style='font-weight: bold;'><span style='text-decoration:underline;'>Fehler:</span> "+user+" kann nicht ignoriert werden.</div>");
} else {
document.write("</i><div style='font-weight: bold;'><span style='text-decoration:underline;'>Fehler:</span> "+user+" wird bereits ignoriert.</div>");
}
} else {
document.write("</i><div style='font-weight: bold;'><span style='text-decoration:underline;'>Fehler:</span> Du bist "+stati[myStatus]+" und kannst deshalb die Ignorierfunktion nicht nutzen.</div>");
}
} else {
document.write("</i><div style='font-weight: bold;'><span style='text-decoration:underline;'>Fehler:</span> Du kannst dich nicht selbst ignorieren.</div>");
}
}
}
function unignoreUser (user, me) {
if (!user.match(/\W/)) {
var s = user.toLowerCase();
if (ignoreList[s]) {
delete ignoreList[s];
var ignored = getCookie("ignoreList" + myNick);
if (ignored)
setCookie("ignoreList" + myNick, ignored.replace(s + ",", ""), new Date(2020, 0, 0));
} else {
document.write("</i><div style='font-weight: bold;'><span style='text-decoration:underline;'>Fehler:</span> "+user+" wird nicht ignoriert.</div>");
}
}
}
function listIgnored (me) {
var ignored = "</i><div style='font-weight: bold;'><span style='text-decoration:underline;'>Ignorierte User:</span>";
for (var i in ignoreList) {
if (ignoreList
)
ignored += "<br />" + i;
}
ignored += "</div>";
document.write(ignored);
}
function getIgnoredFromCookie () {
var ignored = getCookie("ignoreList" + myNick);
if (ignored) {
ignored = ignored.split(",");
for (var i = 0; i < ignored.length; i++) {
if (ignored && ignoreList[ignored] == null)
ignoreList[ignored] = 1;
}
}
}
function intIgnore (strInt) {
if (typeof(efIsLoad) == "function") {
if (efIsLoad()) {
logInOutIgnore = (showLogInOutAtIgnore) ? 4 : 6;
getIgnoredFromCookie();
window.setInterval("loopStream();", strInt);
} else {
setTimeout("intIgnore("+strInt+");", 200);
}
} else {
document.write("<div style='font-size:20px;font-weight:bold;'><span style='text-decoration:underline;'>FEHLER:</span> Die <a href='http://www.wkforum.de/viewtopic.php?t=14238' target='_blank'>Grundscriptsammlung</a> ist nicht eingebaut oder nicht am Anfang der Ankündigung! Die Ignorierfunktion wurde daher nicht geladen.</div><br />");
}
}