SFLC search: Clears the pending messages from a SourceForge project list
Usage: sflc listname password For multiple lists use a comma separator between each list argument: sflc list1 password, list2 password Security Warning: Be aware that your password will remain in DQSD's history. To reduce (NOT eliminate) visibility of your password it is recommended you create an alias for this search which includes the paramaters (sflc list1 password,list2 password), or call it using the startupCommands preference variable (which runs upon DQSD startup). Would someone on the dev team please check this in for me? Thanks! Regards, Shawn K. Hall http://ReliableAnswers.com/ '// ======================================================== "Whenever you see a successful business, someone once made a courageous decision." -- Peter Drucker, writer and management consultant
<search function="sflc"> <name>SourceForge Lists Cleaner</name> <description>Clears the pending messages from a SourceForge project list <div class="helpboxDescLabels">Switches:</div> <table class="helpboxDescTable"> <tr><td>listname password[,listname password...]</td><td> - </td><td> Parse inline input in the form <b>listname password</b>, used when storing a settings profile is inconvenient. </td></tr> </table> <div class="helpboxDescLabels">Examples:</div> <table class="helpboxDescTable"> <tr><td>sflc project-users password</td></tr> <tr><td>sflc project-users password,project-devel password</td></tr> </table> <div class="helpboxDescLabels" style="color: red">Security warning:<br/> <table class="helpBoxDescTable"> <tr><td style="color: red">Be aware that your password will remain in DQSD's history. To reduce visibility of your password it is recommended to create an alias for this search which includes the paramaters, or call it using the <b>startupCommands</b> preference variable (which runs upon DQSD startup).</td></tr> </table> </div> </description> <category>Functions</category> <link>http://ReliableAnswers.com/x/dqsd/</link> <contributor>Shawn K. Hall</contributor> <script><![CDATA[ function sflc(q){ if( q == "?" ){ qsfind("sflc /function"); return false; } if( q == "" ){ qsfind("sflc /function"); return false; } var sStatus = ""; var s = ""; var sUrl = "https://lists.sourceforge.net/lists/admindb/"; var sList = ""; var sAuth = ""; var oPush = ""; try{ //obtain variables var fs = q.split(","); oPush = fs[0].replace(/^\s+/g,'').replace(/\s+$/g,'').split(" "); sList = oPush[0]; sAuth = oPush[1]; sUrl += sList; //attempt to obtain the current message list var sPost = "adminpw=" + escape( sAuth ); sPost += "&request_login=" + escape("Let me in..."); var xmlHttp = new ActiveXObject("Microsoft.XmlHttp"); xmlHttp.open("POST", sUrl, false); xmlHttp.send(sPost); //get the response content from the remote site var sBody = xmlHttp.responseText; var rx = /<INPUT[\s]*name="([\d]+)"[\s]*type="RADIO"[\s]*value="3"[\s]*>/g; var r; var i = 0; while ((r = rx.exec(sBody)) != null){ i++; s += "&" + r[1] + "=3"; } s = s.substr(1); //process form if (s != ""){ //building the post s += "&" + "submit=" + escape("Submit All Data"); var xmlHttp = new ActiveXObject("Microsoft.XmlHttp"); xmlHttp.open("POST", sUrl, false); xmlHttp.send(s); sStatus = "Cleared " + i + " pending message(s) from " + sList; }else{ //nothing in the form sStatus = "Nothing to do (" + sList + ")"; } }catch(e){ sStatus = "It didn't work!" + "\n" + e.number + "::" + e.description; } setSearchWindowText(sStatus, false); //next list(s) if (fs.length > 1) setTimeout("sflc('" + fs.slice(1).join(",") + "')", 1000); } ]]></script> </search>