Fixed /region protect

This commit is contained in:
Lucas Nicodemus 2011-07-14 18:19:33 -06:00
parent c701164abc
commit d45c7a5753

View file

@ -150,7 +150,7 @@ namespace TShockAPI.DB
{ {
using (var com = database.CreateCommand()) using (var com = database.CreateCommand())
{ {
com.CommandText = "UPDATE Regions SET Protected=@bool WHERE RegionName=@name WorldID=@worldid"; com.CommandText = "UPDATE Regions SET Protected=@bool WHERE RegionName=@name AND WorldID=@worldid";
com.AddParameter("@name", name); com.AddParameter("@name", name);
if (state) if (state)
com.AddParameter("@bool", 1); com.AddParameter("@bool", 1);