public override void Unsubscribe(Google.ProtocolBuffers.IRpcController controller, bnet.protocol.presence.UnsubscribeRequest request, System.Action<bnet.protocol.NoData> done) { Logger.Trace("Unsubscribe()"); Logger.Debug("request:\n{0}", request.ToString()); switch (request.EntityId.GetHighIdType()) { case EntityIdHelper.HighIdType.AccountId: var account = AccountManager.GetAccountByEntityID(request.EntityId); // The client will probably make sure it doesn't unsubscribe to a null ID, but just to make sure.. if (account != null) account.RemoveSubscriber((MooNetClient)this.Client); break; case EntityIdHelper.HighIdType.ToonId: var toon = ToonManager.GetToonByLowID(request.EntityId.Low); if (toon != null) toon.RemoveSubscriber((MooNetClient)this.Client); break; default: Logger.Warn("Recieved an unhandled Presence.Unsubscribe request with type {0}", request.EntityId.GetHighIdType()); break; } var builder = bnet.protocol.NoData.CreateBuilder(); done(builder.Build()); }
public override void RemoveMember(Google.ProtocolBuffers.IRpcController controller, bnet.protocol.channel.RemoveMemberRequest request, System.Action<bnet.protocol.NoData> done) { Logger.Trace("RemoveMember"); Logger.Debug("request:\n{0}", request.ToString()); throw new System.NotImplementedException(); }