//Accept Applications
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
string AcceptApplications(boolean AcceptAll)
{
string outstring="";
matcher APPCHECK=create_matcher("y <b>(\\d+)</b> p", visit_url("clan_office.php"));
if(APPCHECK.find())
{
outstring="There are "+APPCHECK.group( 1 )+" new member applications:) <br />";
if (AcceptAll==true)
{
int dudes=0;
matcher Applicants = create_matcher("who=(\\d+)\">(.+?)<", visit_url("clan_applications.php"));
while (Applicants.find())
{
visit_url("clan_applications.php?request"+Applicants.group( 1 )+"=1&action=process");
outstring=outstring+"Accepted "+Applicants.group( 2 )+" into the clan! <br />";
dudes=dudes+1;
}
outstring=outstring+"Bot Welcomed "+to_string(dudes)+" new members! <br />";
}
}
else
outstring="There are no new member applications:( <br />";
outstring="<B><FONT color=#365f91>"+outstring+"</B></FONT><br />";
return outstring;
}