Dedicated server banning

Posts 18 of 8 · Page 1 of 1
Dedicated server banning
Hello members of MPGH
(Unsure if this is the right section...forgive me!)
Recently I viewed the thread by BarackObamaCare about his Server Chat Announcement spammer and I have a small idea.

If you could remotely send messages to everyone from the server, wouldn't it be possible to remotely ban users too? Even if it was a dedicated server?

I am literally blowing a fuse at my brain looking at the NetworkBans and the DLL that the above thread supplied.

I really have no idea how this would work...does anyone have any clues?
S0hynHJ.png185 KB · 18 downloads
I tried to remotely send SpawnPlayers.reset() to every player, which should kill everyone on the server, but it had no effect and didn't even kill me. I don't think you can just send these commands, but there probably is a loop hole somewhere there.
Moved to correct.
public static void ban(string name, string id)
{
bans.Add(new NetworkBanned(name, id));
save();
}




public static void ban(string name, string id)
{
bans.Add(new NetworkBanned(name, id));
save();
}
If only I knew how to use that
public static void kick(NetworkPlayer player, string reason)
{
NetworkChat.sendNotification(player, reason);
NetworkChat.sendAlert(reason);
if (player == Network.player)
{
disconnect();
}
else
{
Network.CloseConnection(player, true);
}
}

public static void ban(NetworkPlayer player, string name, string id, string reason)
{
NetworkBans.ban(name, id);
kick(player, reason);
}


If only i knew how to use them too
Quote Originally Posted by xiEatNoodlezx View Post
public static void kick(NetworkPlayer player, string reason)
{
NetworkChat.sendNotification(player, reason);
NetworkChat.sendAlert(reason);
if (player == Network.player)
{
disconnect();
}
else
{
Network.CloseConnection(player, true);
}
}

public static void ban(NetworkPlayer player, string name, string id, string reason)
{
NetworkBans.ban(name, id);
kick(player, reason);
}


If only i knew how to use them too
The Code Works But will need some editing due to it just banning yourself and kicking yourself
Quote Originally Posted by BarackObamaCare View Post
The Code Works But will need some editing due to it just banning yourself and kicking yourself
...everyone knows what they are doing except me
Posts 18 of 8 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?