Hi,
I am wanting to make a !deaddmember command and i currently have this. But it is not working :s Any help?
I am wanting to make a !deaddmember command and i currently have this. But it is not working :s Any help?
<?php
case "!deaddmember":
if (StrMsg.Length > 1)
{
if (Connections[GetConnIdx(MSO.UCID)].IsAdmin == 1)
{
StreamReader ApR = new StreamReader(UserInfo + "\\groups\\member.txt");
string TempAPR = ApR.ReadToEnd();
ApR.Close();
StreamWriter Ap = new StreamWriter(UserInfo + "\\groups\\member.txt");
Ap.Write(TempAPR + "Member = None");
Ap.Flush();
Ap.Close();
InSim.Send_MST_Message("/msg ^2-^7 " + Msg.Remove(0, 11) + " has been removed from ^2member");
foreach (clsConnection C in Connections)
{
if (C.Username == Msg.Remove(0, 11))
{
C.IsMember = 0;
}
}
}
else
{
InSim.Send_MTC_MessageToConnection("^1You are not allowed to use this command!", MSO.UCID, 0);
}
}
break;
?>