Jump to content

reddwarf

Player
  • Content count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About reddwarf

  • Rank
    Newcomer

Recent Profile Visitors

536 profile views
  1. Did some more digging and got it working for all localisations of the Wow client using the hosts file. Source code for the proof of concept is below: HOSTS FILE breaking_news_server_ip status.wow-europe.com launcher.worldofwarcraft.com launcher.worldofwarcraft.co.kr launcher.battlenet.com.cn launcher.wowtaiwan.com.tw NGINX SERVER BLOCK server { listen 80; server_name status.wow-europe.com launcher.worldofwarcraft.com launcher.worldofwarcraft.co.kr launcher.battlenet.com.cn launcher.wowtaiwan.com.tw; autoindex off; access_log off; root /home/www/wow; location / { try_files /index.html /index.html; } } CRON SCHEDULED SCRIPT UPDATING STATIC INDEX.HTML (censored elysium server addresses) <?php // // Server status + twitter feed of @Elysium_dev // // initialize empty vars $status = ""; $output = ""; // initialize server ip:ports $data[] = array('server1','server_ip','port'); $data[] = array('server1','server_ip','port'); // get tcp socket status of each server foreach ($data as $d) { if (@fsockopen($d[1], $d[2], $errno, $errstr, 2)) $status .= '|cff00ff00'.$d[0].'|r '; // mark green if online else $status .= '|cffff0000'.$d[0].'|r '; // mark red if offline } // prepare status output $status = '<p>Status: '.$status.'</p>'; // fetch twitter feed $data = file_get_contents('https://mobile.twitter.com/elysium_dev'); if (!$data) die(""); // load and parse html $doc = new DOMDocument(); @$doc->loadHTML($data); // for all <p> tags, if it's a tweet then save content $list = $doc->getElementsByTagName("table"); $i=0; foreach($list as $p) { if (strstr($p->getAttribute("class"),"tweet")) { // tweet block // stop at first 6 tweets if ($i++ > 5 ) break; $tds = $p->getElementsByTagName("td"); foreach ($tds as $td) { if (strstr($td->getAttribute("class"),"timestamp")) { // timestamp block $output .= "<p>".$td->nodeValue; } if (strstr($td->getAttribute("class"),"tweet-content")) { $output .= " - ".trim($td->nodeValue)."</p><br />"; } } } } // final content to be written, combine server status ($status) + twitter feed ($output) $write = "SERVERALERT:\n<html><body>".$status.'<br />'.$output.'</body></html> '; file_put_contents('/home/www/wow/index.html',$write); ?> A special security consideration should be taken regarding the server hosting this file as it most likely cannot be hidden behind Cloudflare and therefore will be possibly exposed to a ddos attack vector.
  2. The real purpose of this thread was to get a feedback on how popular this would be and see if elysium devs would be willing to implement it. the technical side is easy
  3. You are partly correct. Some server projects achieve this by modifying client data which is against TOU. my approach was to modify the windows hosts file in order to convince that the blizzard hostname is hosted at a different ip (that is my server) I've got it working but it obviously is hosted on a non blizzard - non Elysium server which comes with certain risks ..
  4. Would Elysium be interested in running their own breaking news section ? This could be a feature aimed at advanced users who are comfortable with altering their Windows system. Hosting this on Elysium servers would also eliminate any security risks such as IP tracking or HTML tempering. I have a working proof of concept for the enEU wow client - currently showing status and last 6 twitter feeds from @Elysium_dev
  5. reddwarf

    I'm after 2 TBC ACE functions (/in & /echo)

    I've ended up coding it myself The code looks like this: Code for /echo command (example: /echo 20/5 outputs 4 function ECHO(s) DEFAULT_CHAT_FRAME:AddMessage(s); end SLASH_ECHO1 = "/echo" SlashCmdList["ECHO"] = function(msg, editBox) RunScript("ECHO("..msg..")"); end Code for /in command (example: /echo 30 DEFAULT_CHAT_FRAME:AddMessage("30 seconds have passed") ) Notice the command argument being in LUA form, you could script the playing of a sound, an emote, a whisper etc local lastChange = 0 local f = CreateFrame("Frame") SLASH_IN1 = "/in" SlashCmdList["IN"] = function(msg, editBox) local _,_,delay,action = string.find(msg, "^(%d+)[%s](.*)") lastChange = GetTime() f:SetScript('OnUpdate', function() if (lastChange + delay) < GetTime() then RunScript(action) f:SetScript('OnUpdate', nil) end end) end The 2 scripts above have to be in a .lua addon file under Addons folder I'll post a zipped addon file later
  6. reddwarf

    First Broken Tooth of the server

    tamed him 11:15 AM server time on spot 3 (angor fortress) on Zeth'kur
  7. heya, the Ace module for TBC introduces the following 2 commands: /echo evaluates the parameter and returns the output example: /echo 74/3 , /echo 45sin(0) /in schedules the parameter command in x seconds example: /in 10 /sit , /in 30 /me trap ready has anyone heard about any of these being ported to wow vanilla ?
×