coderanger
Member
If you are like me and auto-load in to chat you might sometimes miss important updates or announcements. Quickie fix to add the news feeds below the main map:

Code:
// relay/main.ash
void main() {
string main = visit_url();
string updates = visit_url("chatlaunch.php", false);
updates = create_matcher(".*(<center><b>Announcements:)", updates).replace_all("$1");
updates = create_matcher("(older trivial updates</a>).*", updates).replace_all("$1");
string trivial = create_matcher(".*(<center><b>Trivial Updates:)", updates).replace_all("$1");
updates = create_matcher("<center><b>Trivial Updates:.*", updates).replace_all("");
main = create_matcher('<td style="padding: 5px; border: 1px solid blue;">.*<tr><td height=4></td></tr>', main).replace_all("$0<tr><td style=\"padding: 5px; border: 1px solid blue;\"><table><tr><td style=\"vertical-align: top;\">"+updates+"</td><td style=\"vertical-align: top;\">"+trivial+"</td></tr></table></td></tr><tr><td height=4></td></tr>");
main.writeln();
}

Last edited: