public static bool CanMessage(Mobile from, Mobile to)
{
if (from == to)
return false;
if (from.AccessLevel > to.AccessLevel)
return true;
Data df = Data.GetData(from);
Data dt = Data.GetData(to);
if (df.Banned || dt.Banned)
return false;
if (df.FriendsOnly && !df.Friends.Contains(to))
return false;
if (dt.FriendsOnly && !dt.Friends.Contains(from))
return false;
if (df.Ignores.Contains(to))
return false;
if (dt.Ignores.Contains(from))
return false;
if (dt.Messages.Count >= Data.MaxMsgs && !dt.WhenFull)
return false;
return true;
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.