links[i].href=userListUrl+"/" + username;
}
links[i].appendChild(document.createTextNode(username));
- links[i].className = status;
+ links[i].className = userStatus;
} else if (links[i].href.substring(0,forumScriptUrl.length)==
forumScriptUrl && links[i].href.indexOf("login=")!=-1) {
while (links[i].childNodes.length>0) {
var status="user";
var xhr=getXMLHttpRequest();
if(!xhr) return status;
-
+ // Strip http:// prefix from OpenID url
+ if (user.substring(0,7) == "http://") {
+ user=user.substring(7,user.length);
+ }
var hr=location.href.match(/^\w+:\/\/[^/]*\/([^?#]+)/);
if(hr==null) return status;
var depth=hr[1].split(/\//).length;
- var re=new RegExp("\n\[\s*(admins|moderators|banned)\s*\]\s*[^[]+\n"+user+"\n","m");
+ var re=new RegExp("\n\\\[\s*(admins|moderators|banned)\s*\\\]\s*[^[]*\n"+user+"\n","m");
for(var path="",i=0;i<depth;path+="../",i++) {
- xhr.open(GET, path+"perms.txt",false);
+ xhr.open("GET", path+"perms.txt",false);
xhr.send("");
if(xhr.status!=200) continue;
- var perms=("\n"+xhr.responsText+"\n").match(re);
+ var perms=("\n"+xhr.responseText+"\n").match(re);
if(perms!=null) {
if(perms[1]=="banned") return "banned";
if(perms[1]=="admins") return "admin";
status=="moderator";
}
- xhr.open(GET, path+".forum",false);
+ xhr.open("GET", path+".forum",false);
xhr.send("");
if(xhr.status==403 || xhr.status==200) break;
}