case "!setadmin":
if (StrMsg.Length > 1)
{
if (Connections[GetConnIdx(MSO.UCID)].IsAdmin == 1)
{
if (Connections[GetConnIdx(MSO.UCID)].InsimAdmin == 0)
{
StreamReader ApR = new StreamReader(UserBase + "\\groups\\Admin.txt");
string TempAPR = ApR.ReadToEnd();
ApR.Close();
StreamWriter Ap = new StreamWriter(Base + "\\groups\\Admin.txt");
Ap.WriteLine(TempAPR + "Admin = " + Msg.Remove(0, 10));
Ap.Flush();
Ap.Close();
foreach (clsConnection C in Connections)
{
if (C.Username == Msg.Remove(0, 10))
{
C.Admin = 1;
InSim.Send_MST_Message("/msg ^7 " + C.PlayerName + "^7 got Admin rights!");
}
}
}
else
{
InSim.Send_MTC_MessageToConnection("^1Warning:^7 This user is already a Admin!", MSO.UCID, 0);
}
}
}
else
{
InSim.Send_MTC_MessageToConnection("^1Command Error. Please try again", MSO.UCID, 0);
}
break;