Exemplo n.º 1
0
 void ProcessMessage(ClientConnection client, InviteToParty message)
 {
     if (World.Party[client.AuthenticatedUsername] == null)
     {
         client.LogMessage("You are not the leader of a party");
         return;
     }
     var target = World.Users[message.User];
     if (target == null)
         client.LogMessage("Invalid target");
     else
     {
         World.InvitedToParty[target.AuthenticatedUsername]
             .Add(client.AuthenticatedUsername, Global.Now);
         // TODO: probably want a graphical thing or something for invites
         target.LogMessage("You have been invited to party '" + client.AuthenticatedUsername + "'");
     }
 }