Clan Hall Whitelist

I was getting annoyed at the fiddliness of Dreadsylvania clanhopping, so I made this thingy (using some bits from Bale's clanhop script).

In the Clan Hall, a dropdown list shows all the clans you're whitelisted to.
Clicking the 'Go to Clan' button takes you directly to that clan's Clan Hall.
cMztmfu.png


To install:
Code:
svn checkout svn://svn.code.sf.net/p/dclsmafiascripts/code-0/clan_hall_whitelist
 
In my topmenu I generate a very similar dropdown using a method you might prefer since it just grabs the guts out of KoL's actual dropdown at clan_signup.php.

Code:
void addWhitelist(buffer results, string side) {
	string clanlist = visit_url("clan_signup.php");
	if(index_of(clanlist, "<select name=whichclan>") >= 0 && index_of(clanlist, "<input type=submit class=button value='Go to Clan'>") >= 0) {
		buffer whitelist;
		whitelist.append(substring(clanlist, index_of(clanlist, "<select name=whichclan>")+23, index_of(clanlist, "<input type=submit class=button value='Go to Clan'>")));
		results.replace_string("</body>", "<div style='position: absolute; top: 0px; "
			+ side + ": 0px;'><font size=-1><select style='max-width:"
			+ (side=="right"? "155": "100")
			+ "px;' onchange='if (this.selectedIndex>0) { top.mainpane.document.location.href=\"showclan.php?pwd="
			+ my_hash() + "&action=joinclan&confirm=on&whichclan=\" + this.options[this.selectedIndex].value; this.options[0].selected=true;}'><option>-change clan-</option>"
			+ whitelist + "</div></body>");
	}
}

Or you can even use my topmenu because when I'm switching dreadsylvania instances it is nice to be able to switch without having to go to your clan hall first.
 
Back
Top