You could use
getClan()
{
cT = getSubStr(self.name, 0, self.name.size);
if (cT[0] != "[")
return "";
for (i = 0; i < cT.size; i++)
{
if (cT[i] == "]")
break;
}
cT=getSubStr(cT, 1, i);
return cT;
}
To return the clantag and then use something like
If(getClan() == "someone")
{
Do stuff for the clan
}